From 39b58ab1642cb1b41275194738a8dbc8164c579a Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 5 Jul 2022 20:56:38 +0200 Subject: [PATCH] - zlib: rework build --- package/zlib/zlib.mk | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/package/zlib/zlib.mk b/package/zlib/zlib.mk index c0131740..53260b0e 100644 --- a/package/zlib/zlib.mk +++ b/package/zlib/zlib.mk @@ -10,6 +10,7 @@ ZLIB_SOURCE = zlib-$(ZLIB_VERSION).tar.xz ZLIB_SITE = https://sourceforge.net/projects/libpng/files/zlib/$(ZLIB_VERSION) ZLIB_CONF_ENV = \ + $(TARGET_CONFIGURE_ENV) \ mandir=$(REMOVE_mandir) ZLIB_CONF_OPTS = \ @@ -17,15 +18,13 @@ ZLIB_CONF_OPTS = \ --shared \ --uname=Linux -zlib: | $(TARGET_DIR) - $(call PREPARE) +define ZLIB_CONFIGURE_CMDS $(CHDIR)/$($(PKG)_DIR); \ - $(TARGET_CONFIGURE_ENV) \ - $($(PKG)_CONF_ENV) \ - ./configure $($(PKG)_CONF_OPTS); \ - $(MAKE); \ - $(MAKE) install DESTDIR=$(TARGET_DIR) - $(call TARGET_FOLLOWUP) + $($(PKG)_CONF_ENV) ./configure $($(PKG)_CONF_OPTS) +endef + +zlib: | $(TARGET_DIR) + $(call autotools-package) # ----------------------------------------------------------------------------- @@ -34,21 +33,18 @@ HOST_ZLIB_DIR = $(ZLIB_DIR) HOST_ZLIB_SOURCE = $(ZLIB_SOURCE) HOST_ZLIB_SITE = $(ZLIB_SITE) -#HOST_ZLIB_CONF_ENV = \ -# libdir=$(HOST_DIR)/lib \ -# includedir=$(HOST_DIR)/include +HOST_ZLIB_CONF_ENV = \ + $(HOST_CONFIGURE_ENV) HOST_ZLIB_CONF_OPTS = \ --prefix="" \ --shared \ --uname=Linux -host-zlib: | $(HOST_DIR) - $(call PREPARE) +define HOST_ZLIB_CONFIGURE_CMDS $(CHDIR)/$($(PKG)_DIR); \ - $(HOST_CONFIGURE_ENV) \ - $($(PKG)_CONF_ENV) \ - ./configure $($(PKG)_CONF_OPTS); \ - $(MAKE); \ - $(MAKE) install DESTDIR=$(HOST_DIR) - $(call HOST_FOLLOWUP) + $($(PKG)_CONF_ENV) ./configure $($(PKG)_CONF_OPTS) +endef + +host-zlib: | $(HOST_DIR) + $(call host-autotools-package)