Resync x86_64 kernel config and make uml build ext2 images by default
[openwrt.git] / package / zlib / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=zlib
12 PKG_VERSION:=1.2.3
13 PKG_RELEASE:=3
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://www.zlib.net @SF/zlib
17 PKG_MD5SUM:=dee233bf288ee795ac96a98cc2e369b6
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/zlib
22 SECTION:=libs
23 CATEGORY:=Libraries
24 TITLE:=Library implementing the deflate compression method
25 URL:=http://www.zlib.net/
26 endef
27
28 define Build/Configure
29 (cd $(PKG_BUILD_DIR); \
30 $(TARGET_CONFIGURE_OPTS) \
31 LDSHARED="$(TARGET_CC) -shared -Wl,-soname,libz.so.1" \
32 CFLAGS="$(TARGET_CFLAGS) $(CFLAGS_LARGEFILE)" \
33 UNAME_S="Linux" \
34 ./configure \
35 --prefix=/usr \
36 --shared \
37 );
38 endef
39
40 define Build/Compile
41 $(MAKE) -C $(PKG_BUILD_DIR) \
42 $(TARGET_CONFIGURE_OPTS) \
43 CFLAGS="$(TARGET_CFLAGS) $(CFLAGS_LARGEFILE)" \
44 libz.a libz.so
45 mkdir -p $(PKG_INSTALL_DIR)
46 $(MAKE) -C $(PKG_BUILD_DIR) \
47 DESTDIR="$(PKG_INSTALL_DIR)" \
48 install
49 endef
50
51 define Build/InstallDev
52 mkdir -p $(STAGING_DIR)/usr/include
53 $(CP) $(PKG_INSTALL_DIR)/usr/include/z{conf,lib}.h \
54 $(STAGING_DIR)/usr/include/
55 mkdir -p $(STAGING_DIR)/usr/lib
56 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.{a,so*} \
57 $(STAGING_DIR)/usr/lib/
58 endef
59
60 define Build/UninstallDev
61 rm -rf $(STAGING_DIR)/usr/include/z{conf,lib}.h \
62 $(STAGING_DIR)/usr/lib/libz.{a,so*}
63 endef
64
65 define Package/zlib/install
66 $(INSTALL_DIR) $(1)/usr/lib
67 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.so.* $(1)/usr/lib/
68 endef
69
70 $(eval $(call BuildPackage,zlib))
This page took 0.046723 seconds and 5 git commands to generate.