source: trunk/package/zlib/Makefile @ 23085

Last change on this file since 23085 was 23085, checked in by acoul, 6 years ago

package/zlib: fix Darwin compile failure (closes #7963)

  • Property svn:copyright set to Copyright (C) 2006 OpenWrt.org
  • Property svn:eol-style set to native
File size: 1.5 KB
Line 
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
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=zlib
11PKG_VERSION:=1.2.5
12PKG_RELEASE:=1
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15PKG_SOURCE_URL:=http://www.zlib.net @SF/libpng
16PKG_MD5SUM:=be1e89810e66150f5b0327984d8625a0
17
18PKG_BUILD_PARALLEL:=1
19
20include $(INCLUDE_DIR)/package.mk
21
22define Package/zlib
23  SECTION:=libs
24  CATEGORY:=Libraries
25  TITLE:=Library implementing the deflate compression method
26  URL:=http://www.zlib.net/
27endef
28
29define Build/Configure
30        (cd $(PKG_BUILD_DIR); \
31                $(TARGET_CONFIGURE_OPTS) \
32                LDSHARED="$(TARGET_CC) -shared -Wl,-soname,libz.so.1" \
33                CFLAGS="$(TARGET_CFLAGS) $(FPIC)" \
34                ./configure \
35                        --prefix=/usr \
36                        --shared \
37                        --uname=Linux \
38        );
39endef
40
41define Build/Compile
42        $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
43                $(TARGET_CONFIGURE_OPTS) \
44                CFLAGS="$(TARGET_CFLAGS)" \
45                libz.a libz.so.$(PKG_VERSION)
46        mkdir -p $(PKG_INSTALL_DIR)
47        $(MAKE) -C $(PKG_BUILD_DIR) \
48                DESTDIR="$(PKG_INSTALL_DIR)" \
49                install
50endef
51
52define Build/InstallDev
53        mkdir -p $(1)/usr/include
54        $(CP)   $(PKG_INSTALL_DIR)/usr/include/z{conf,lib}.h \
55                $(1)/usr/include/
56        mkdir -p $(1)/usr/lib
57        $(CP)   $(PKG_INSTALL_DIR)/usr/lib/libz.{a,so*} \
58                $(1)/usr/lib/
59endef
60
61# libz.so is needed for openssl (zlib-dynamic)
62define Package/zlib/install
63        $(INSTALL_DIR) $(1)/usr/lib
64        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.so $(1)/usr/lib/
65        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.so.* $(1)/usr/lib/
66endef
67
68$(eval $(call BuildPackage,zlib))
Note: See TracBrowser for help on using the repository browser.