zstd: add host libzstd support
authorPeter Seiderer <ps.report@gmx.net>
Mon, 16 Apr 2018 19:39:49 +0000 (21:39 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Wed, 25 Apr 2018 21:36:48 +0000 (23:36 +0200)
For the host only the libzstd library is built (no need for host-lz4
host-xz host-zlib dependencies because they affect only the cmdline
tool).

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
[Thomas: use '-C $(@D)/lib' instead of '-C $(@D) lib' at build time,
to be consistent with what is done at install time, as suggested by
Yann E. Morin.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/zstd/zstd.mk

index c0fa88026c3219d96ecca84805d41e01a3d78657..5376e86c4395af9092f457c596f8ea5ff6439dba 100644 (file)
@@ -46,4 +46,16 @@ define ZSTD_INSTALL_TARGET_CMDS
                DESTDIR=$(TARGET_DIR) PREFIX=/usr -C $(@D)/programs install
 endef
 
+# note: no 'HAVE_...' options for host library build only
+define HOST_ZSTD_BUILD_CMDS
+       $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) \
+               -C $(@D)/lib
+endef
+
+define HOST_ZSTD_INSTALL_CMDS
+       $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) \
+               DESTDIR=$(HOST_DIR) PREFIX=/usr -C $(@D)/lib install
+endef
+
 $(eval $(generic-package))
+$(eval $(host-generic-package))