aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2022-09-25 00:22:24 -0700
committerHauke Mehrtens <hauke@hauke-m.de>2023-11-21 00:38:36 +0100
commite453767535edd27aabb45038c967fab98fcc2d58 (patch)
tree81e5509fce4068ba8cb5823ae2e880887f6ec5a7 /tools
parent3e511a7a23215d4a986c876db28bef9beab42b70 (diff)
downloadupstream-e453767535edd27aabb45038c967fab98fcc2d58.tar.gz
upstream-e453767535edd27aabb45038c967fab98fcc2d58.tar.bz2
upstream-e453767535edd27aabb45038c967fab98fcc2d58.zip
tools/zlib: switch to configure script
A future commit will make tools/cmake use this. Signed-off-by: Rosen Penev <rosenp@gmail.com> (cherry picked from commit d602e7a969922121800e8f24d81cecdaab3aae75)
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile3
-rw-r--r--tools/zlib/Makefile26
2 files changed, 14 insertions, 15 deletions
diff --git a/tools/Makefile b/tools/Makefile
index c18c2b4242..57a6530ba4 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -74,7 +74,6 @@ $(curdir)/quilt/compile := $(curdir)/autoconf/compile $(curdir)/findutils/compil
$(curdir)/sdcc/compile := $(curdir)/bison/compile
$(curdir)/squashfs/compile := $(curdir)/lzma-old/compile
$(curdir)/squashfskit4/compile := $(curdir)/xz/compile $(curdir)/zlib/compile
-$(curdir)/zlib/compile := $(curdir)/cmake/compile
$(curdir)/zstd/compile := $(curdir)/meson/compile
ifneq ($(HOST_OS),Linux)
@@ -86,7 +85,7 @@ ifeq ($(HOST_OS),Darwin)
endif
ifneq ($(CONFIG_CCACHE)$(CONFIG_SDK),)
-$(foreach tool, $(filter-out xz zstd pkgconf patch ninja meson libressl cmake,$(tools-y)), $(eval $(curdir)/$(tool)/compile += $(curdir)/ccache/compile))
+$(foreach tool, $(filter-out zstd zlib xz pkgconf patch ninja meson libressl cmake,$(tools-y)), $(eval $(curdir)/$(tool)/compile += $(curdir)/ccache/compile))
tools-y += ccache
$(curdir)/ccache/compile := $(curdir)/cmake/compile $(curdir)/zstd/compile
endif
diff --git a/tools/zlib/Makefile b/tools/zlib/Makefile
index c83cc6d55b..6fea7ebab4 100644
--- a/tools/zlib/Makefile
+++ b/tools/zlib/Makefile
@@ -19,23 +19,23 @@ PKG_LICENSE:=Zlib
PKG_LICENSE_FILES:=README
PKG_CPE_ID:=cpe:/a:gnu:zlib
+HOST_BUILD_PARALLEL:=1
+
include $(INCLUDE_DIR)/host-build.mk
-include $(INCLUDE_DIR)/cmake.mk
-HOST_CFLAGS +=-fPIC
+HOSTCC := $(HOSTCC_NOCACHE)
+HOST_CFLAGS += $(HOST_FPIC)
-define Host/Install
- $(CP) $(HOST_BUILD_DIR)/libz.a $(STAGING_DIR_HOST)/lib/
- $(CP) $(HOST_BUILD_DIR)/zconf.h $(STAGING_DIR_HOST)/include/
- $(CP) $(HOST_BUILD_DIR)/zlib.h $(STAGING_DIR_HOST)/include/
- $(CP) $(HOST_BUILD_DIR)/zlib.pc $(STAGING_DIR_HOST)/lib/pkgconfig/
-endef
+HOST_CONFIGURE_ARGS = \
+ --prefix=$(STAGING_DIR_HOST) \
+ --sysconfdir=$(STAGING_DIR_HOST)/etc \
+ --localstatedir=$(STAGING_DIR_HOST)/var \
+ --libdir=$(STAGING_DIR_HOST)/lib \
+ --includedir=$(STAGING_DIR_HOST)/include \
+ --static
-define Host/Clean
- rm -f $(STAGING_DIR_HOST)/lib/libz.a
- rm -f $(STAGING_DIR_HOST)/include/zconf.h
- rm -f $(STAGING_DIR_HOST)/include/zlib.h
- rm -f $(STAGING_DIR_HOST)/lib/pkgconfig//zlib.pc
+define Host/Uninstall
+ -$(call Host/Compile/Default,uninstall)
endef
$(eval $(call HostBuild))