Fix lib search pathes, fix rpath in modules
[openwrt.git] / openwrt / package / zlib / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=zlib
6 PKG_VERSION:=1.2.2
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=1b8aab042d40979e456194c468fd72c5
9
10 PKG_SOURCE_URL:=http://www.zlib.net/
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
12 PKG_CAT:=bzcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
15 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
16
17 include $(TOPDIR)/package/rules.mk
18
19 $(eval $(call PKG_template,ZLIB,zlib,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
20
21 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
22 (cd $(PKG_BUILD_DIR); \
23 $(TARGET_CONFIGURE_OPTS) \
24 ./configure \
25 --prefix=/usr \
26 --shared \
27 );
28 touch $@
29
30 $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured
31 $(MAKE) -C $(PKG_BUILD_DIR) \
32 $(TARGET_CONFIGURE_OPTS) \
33 CFLAGS="$(TARGET_CFLAGS) $(CFLAGS_LARGEFILE)" \
34 libz.a libz.so
35 mkdir -p $(PKG_INSTALL_DIR)
36 $(MAKE) -C $(PKG_BUILD_DIR) \
37 DESTDIR="$(PKG_INSTALL_DIR)" \
38 install
39 touch $@
40
41 $(IPKG_ZLIB):
42 install -m0755 -d $(IDIR_ZLIB)/usr/lib
43 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libz.so.* $(IDIR_ZLIB)/usr/lib/
44 $(RSTRIP) $(IDIR_ZLIB)
45 $(IPKG_BUILD) $(IDIR_ZLIB) $(PACKAGE_DIR)
46
47 $(STAGING_DIR)/usr/lib/libz.so: $(PKG_BUILD_DIR)/.built
48 mkdir -p $(STAGING_DIR)/usr/include
49 cp -fpR $(PKG_INSTALL_DIR)/usr/include/z{conf,lib}.h $(STAGING_DIR)/usr/include
50 mkdir -p $(STAGING_DIR)/usr/lib
51 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libz.{a,so*} $(STAGING_DIR)/usr/lib
52 touch $(STAGING_DIR)/usr/lib/libz.so
53
54 install-dev: $(STAGING_DIR)/usr/lib/libz.so
55
56 uninstall-dev:
57 rm -rf $(STAGING_DIR)/usr/include/z{conf,lib}.h
58 rm -rf $(STAGING_DIR)/usr/lib/libz.{a,so*}
59
60 compile: install-dev
61 clean: uninstall-dev
This page took 0.042294 seconds and 5 git commands to generate.