prereq: gnu make 4 required for latest glibc
[openadk.git] / package / zlib / Makefile
blob10ba76375fb5a8ba4afa9441a78c78eec62dadec
1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
4 include $(ADK_TOPDIR)/rules.mk
6 PKG_NAME:= zlib
7 PKG_VERSION:= 1.2.11
8 PKG_RELEASE:= 2
9 PKG_HASH:= 4ff941449631ace0d4d203e3483be9dbc9da454084111f97ea0a2114e19bf066
10 PKG_DESCR:= implementation of the deflate compression method
11 PKG_SECTION:= libs/comp
12 PKG_URL:= http://www.zlib.net/
13 PKG_SITES:= http://zlib.net/
14 PKG_OPTS:= dev
16 include $(ADK_TOPDIR)/mk/host.mk
17 include $(ADK_TOPDIR)/mk/package.mk
19 $(eval $(call HOST_template,ZLIB,zlib,$(PKG_VERSION)-$(PKG_RELEASE)))
20 $(eval $(call PKG_template,ZLIB,zlib,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION),$(PKG_OPTS)))
22 ifeq ($(ADK_TARGET_USE_STATIC_AND_SHARED_LIBS),y)
23 TARGET_CFLAGS:= $(filter-out -static,$(TARGET_CFLAGS))
24 TARGET_LDFLAGS:=$(filter-out -static,$(TARGET_LDFLAGS))
25 endif
27 HOST_STYLE:= auto
28 HOST_CONFIG_STYLE:= manual
29 HOST_CONFIGURE_ENV+= uname=Linux
31 CONFIG_STYLE:= manual
32 CONFIGURE_ENV+= uname=Linux
34 ifeq ($(ADK_TARGET_BINFMT_FLAT)$(ADK_TARGET_USE_STATIC_LIBS_ONLY),)
35 CONFIGURE_OPTS:= --shared
36 else
37 CONFIGURE_OPTS:= --static
38 endif
40 host-configure:
41 (cd $(WRKBUILD); \
42 uname="Linux" \
43 $(HOST_CONFIGURE_OPTS) \
44 CFLAGS="$(HOST_CFLAGS) -fPIC" \
45 CPPFLAGS="-I$(STAGING_HOST_DIR)/usr/include" \
46 LDFLAGS="-L$(STAGING_HOST_DIR)/usr/lib" \
47 ./configure \
48 --prefix=/usr \
49 --shared \
52 do-configure:
53 (cd $(WRKBUILD); \
54 uname="Linux" \
55 $(TARGET_CONFIGURE_OPTS) \
56 CFLAGS="$(TARGET_CFLAGS) -fPIC" \
57 CPPFLAGS="-I$(STAGING_TARGET_DIR)/usr/include" \
58 LDFLAGS="-L$(STAGING_TARGET_DIR)/usr/lib" \
59 ./configure \
60 --prefix=/usr \
61 $(CONFIGURE_OPTS) \
64 zlib-install:
65 $(INSTALL_DIR) $(IDIR_ZLIB)/usr/lib
66 $(CP) $(WRKINST)/usr/lib/libz.so* $(IDIR_ZLIB)/usr/lib
68 include ${ADK_TOPDIR}/mk/host-bottom.mk
69 include $(ADK_TOPDIR)/mk/pkg-bottom.mk