Fix typo
[openwrt.git] / openwrt / package / zlib / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME := zlib
4 PKG_VERSION := 1.2.2
5 PKG_RELEASE := 1
6
7 PKG_SOURCE_SITE := http://www.zlib.net/
8 PKG_SOURCE_FILE := $(PKG_NAME)-$(PKG_VERSION).tar.gz
9 PKG_SOURCE_CAT := zcat
10 PKG_SOURCE_DIR := $(PKG_NAME)-$(PKG_VERSION)
11 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_SOURCE_DIR)
12 PKG_IPK := $(PACKAGE_DIR)/zlib_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
13
14
15 $(DL_DIR)/$(PKG_SOURCE_FILE):
16 mkdir -p $(DL_DIR)
17 $(WGET) -P $(DL_DIR) $(PKG_SOURCE_SITE)/$(PKG_SOURCE_FILE)
18
19 $(PKG_BUILD_DIR)/.patched: $(DL_DIR)/$(PKG_SOURCE_FILE)
20 mkdir -p $(TOOL_BUILD_DIR)
21 $(PKG_SOURCE_CAT) $(DL_DIR)/$(PKG_SOURCE_FILE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
22 $(PATCH) $(PKG_BUILD_DIR) . $(PKG_NAME).patch
23 touch $(PKG_BUILD_DIR)/.patched
24
25 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.patched
26 (cd $(PKG_BUILD_DIR); \
27 $(TARGET_CONFIGURE_OPTS) \
28 ./configure \
29 --prefix=/ \
30 --shared)
31 touch $(PKG_BUILD_DIR)/.configured
32
33 $(PKG_BUILD_DIR)/libz.so: $(PKG_BUILD_DIR)/.configured
34 $(MAKE) -C $(PKG_BUILD_DIR) \
35 $(TARGET_CONFIGURE_OPTS) \
36 CFLAGS="$(TARGET_CFLAGS) $(CFLAGS_LARGEFILE)" \
37 libz.a libz.so
38
39 $(STAGING_DIR)/lib/libz.so: $(PKG_BUILD_DIR)/libz.so
40 $(MAKE) -C $(PKG_BUILD_DIR) \
41 DESTDIR="$(STAGING_DIR)" \
42 install
43
44 $(PKG_IPK): $(STAGING_DIR)/lib/libz.so
45 mkdir -p $(PACKAGE_DIR)
46 $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_BUILD_DIR)/ipkg/zlib zlib.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
47 mkdir -p $(PKG_BUILD_DIR)/ipkg/zlib/usr/lib
48 cp -a $(PKG_BUILD_DIR)/libz.so* $(PKG_BUILD_DIR)/ipkg/zlib/usr/lib
49 $(STRIP) $(PKG_BUILD_DIR)/ipkg/zlib/usr/lib/*
50 $(IPKG_BUILD) $(PKG_BUILD_DIR)/ipkg/zlib $(PACKAGE_DIR)
51
52 $(IPKG_STATE_DIR)/info/zlib.list: $(PKG_IPK)
53 $(IPKG) install $(PKG_IPK)
54
55 source: $(DL_DIR)/$(PKG_SOURCE_FILE)
56 prepare: $(PKG_BUILD_DIR)/.patched
57 compile: $(STAGING_DIR)/lib/libz.so $(PKG_IPK)
58 install: $(PKG_ZLIB) $(IPKG_STATE_DIR)/info/zlib.list
59
60 clean:
61 rm -rf $(PKG_BUILD_DIR)
62 rm -f $(STAGING_DIR)/lib/libz* $(STAGING_DIR)/include/zlib*
63 rm -f $(PACKAGE_DIR)/zlib\*.ipk
64
This page took 0.049921 seconds and 5 git commands to generate.