add y354C's patch for maximum nat connections in netfilter
[openwrt.git] / openwrt / package / libelf / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME := libelf
6 PKG_VERSION := 0.8.5
7 PKG_RELEASE := 1
8 PKG_MD5SUM := c1daf069367871350ece779b7de20047
9
10 PKG_SOURCE_SITE := http://www.mr511.de/software/
11 PKG_SOURCE_FILE := $(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_SOURCE_CAT := zcat
13 PKG_SOURCE_DIR := $(PKG_NAME)-$(PKG_VERSION)
14 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_SOURCE_DIR)
15 PKG_IPK := $(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
16 PKG_IPK_DIR :=$(PKG_BUILD_DIR)/ipkg/
17
18 .NOTPARALLEL:
19
20 $(DL_DIR)/$(PKG_SOURCE_FILE):
21 mkdir -p $(DL_DIR)
22 $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE_FILE) $(PKG_MD5SUM) $(PKG_SOURCE_SITE)
23
24 $(PKG_BUILD_DIR)/.unpacked: $(DL_DIR)/$(PKG_SOURCE_FILE)
25 mkdir -p $(TOOL_BUILD_DIR)
26 $(PKG_SOURCE_CAT) $(DL_DIR)/$(PKG_SOURCE_FILE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
27 touch $(PKG_BUILD_DIR)/.unpacked
28
29 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.unpacked
30 (cd $(PKG_BUILD_DIR); \
31 echo "mr_cv_target_elf=$${mr_cv_target_elf=yes}" > config.cache; \
32 $(TARGET_CONFIGURE_OPTS) \
33 ./configure \
34 --target=$(GNU_TARGET_NAME) \
35 --host=$(GNU_TARGET_NAME) \
36 --build=$(GNU_HOST_NAME) \
37 --prefix=/ \
38 --sysconfdir=/etc \
39 );
40 touch $(PKG_BUILD_DIR)/.configured
41
42 $(PKG_BUILD_DIR)/lib/libelf.so.$(LIBELF_VER): $(PKG_BUILD_DIR)/.configured
43 $(MAKE) -j1 CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld ARCH=$(ARCH) \
44 -C $(PKG_BUILD_DIR)
45
46 $(STAGING_DIR)/lib/libelf.so: $(PKG_BUILD_DIR)/lib/libelf.so.$(LIBELF_VER)
47 $(MAKE) -j1 CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld ARCH=$(ARCH) \
48 -C $(PKG_BUILD_DIR)/lib instroot="$(STAGING_DIR)" install
49
50
51 $(PKG_IPK): $(PKG_BUILD_DIR)/lib/libelf.so.$(LIBELF_VER)
52 $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_IPK_DIR) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
53 mkdir -p $(PKG_IPK_DIR)/usr/lib
54 cp -a $(PKG_BUILD_DIR)/lib/libelf.so* $(PKG_IPK_DIR)/usr/lib/
55 $(STRIP) $(PKG_IPK_DIR)/usr/lib/*
56 mkdir -p $(PACKAGE_DIR)
57 $(IPKG_BUILD) $(PKG_IPK_DIR) $(PACKAGE_DIR)
58
59 $(IPKG_STATE_DIR)/info/$(PKG_NAME).list: $(PKG_IPK)
60 $(IPKG) install $(PKG_IPK)
61
62 source: $(DL_DIR)/$(PKG_SOURCE_FILE)
63 prepare: $(PKG_BUILD_DIR)/.unpacked
64 compile: $(STAGING_DIR)/lib/libelf.so $(PKG_IPK)
65 install: $(PKG_ZLIB) $(IPKG_STATE_DIR)/info/$(PKG_NAME).list
66
67 clean:
68 rm -rf $(PKG_BUILD_DIR)
69 rm -f $(STAGING_DIR)/lib/$(PKG_NAME)*
70 rm -f $(PACKAGE_DIR)/$(PKG_NAME)\*.ipk
This page took 0.049808 seconds and 5 git commands to generate.