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