DESTDIR=$(TARGET_DIR) PREFIX=/usr -C $(@D)/lib $(ZSTD_INSTALL_LIBS)
endef
-# note: no 'HAVE_...' options for host library build only
+# note: only limited 'HAVE_...' options for host library build only
+HOST_ZSTD_OPTS = HAVE_THREAD=1
+
define HOST_ZSTD_BUILD_CMDS
- $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) \
- -C $(@D)/lib libzstd.a libzstd
- $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) \
+ $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) $(HOST_ZSTD_OPTS) \
+ -C $(@D)/lib libzstd.a-mt libzstd-mt
+ $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) $(HOST_ZSTD_OPTS) \
-C $(@D) zstd
endef
define HOST_ZSTD_INSTALL_CMDS
- $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) \
+ $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) $(HOST_ZSTD_OPTS) \
DESTDIR=$(HOST_DIR) PREFIX=/usr -C $(@D)/lib install
- $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) \
+ $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) $(HOST_ZSTD_OPTS) \
DESTDIR=$(HOST_DIR) PREFIX=/usr -C $(@D)/programs install
endef