add tcpdump depend on libpcap
[openwrt.git] / 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 $(DL_DIR)/$(PKG_SOURCE_FILE):
19 mkdir -p $(DL_DIR)
20 $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE_FILE) $(PKG_MD5SUM) $(PKG_SOURCE_SITE)
21
22 $(PKG_BUILD_DIR)/.unpacked: $(DL_DIR)/$(PKG_SOURCE_FILE)
23 mkdir -p $(TOOL_BUILD_DIR)
24 $(PKG_SOURCE_CAT) $(DL_DIR)/$(PKG_SOURCE_FILE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
25 touch $(PKG_BUILD_DIR)/.unpacked
26
27 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.unpacked
28 (cd $(PKG_BUILD_DIR); \
29 echo "mr_cv_target_elf=$${mr_cv_target_elf=yes}" > config.cache; \
30 $(TARGET_CONFIGURE_OPTS) \
31 ./configure \
32 --target=$(GNU_TARGET_NAME) \
33 --host=$(GNU_TARGET_NAME) \
34 --build=$(GNU_HOST_NAME) \
35 --prefix=/ \
36 --sysconfdir=/etc \
37 );
38 touch $(PKG_BUILD_DIR)/.configured
39
40 $(PKG_BUILD_DIR)/lib/libelf.so.$(LIBELF_VER): $(PKG_BUILD_DIR)/.configured
41 $(MAKE) CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld ARCH=$(ARCH) \
42 -C $(PKG_BUILD_DIR)
43
44 $(STAGING_DIR)/lib/libelf.so: $(PKG_BUILD_DIR)/lib/libelf.so.$(LIBELF_VER)
45 $(MAKE) CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld ARCH=$(ARCH) \
46 -C $(PKG_BUILD_DIR)/lib instroot="$(STAGING_DIR)" install
47
48
49 $(PKG_IPK): $(PKG_BUILD_DIR)/lib/libelf.so.$(LIBELF_VER)
50 $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_IPK_DIR) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
51 mkdir -p $(PKG_IPK_DIR)/usr/lib
52 cp -a $(PKG_BUILD_DIR)/lib/libelf.so* $(PKG_IPK_DIR)/usr/lib/
53 $(STRIP) $(PKG_IPK_DIR)/usr/lib/*
54 mkdir -p $(PACKAGE_DIR)
55 $(IPKG_BUILD) $(PKG_IPK_DIR) $(PACKAGE_DIR)
56
57 $(IPKG_STATE_DIR)/info/$(PKG_NAME).list: $(PKG_IPK)
58 $(IPKG) install $(PKG_IPK)
59
60 source: $(DL_DIR)/$(PKG_SOURCE_FILE)
61 prepare: $(PKG_BUILD_DIR)/.unpacked
62 compile: $(STAGING_DIR)/lib/libelf.so $(PKG_IPK)
63 install: $(PKG_ZLIB) $(IPKG_STATE_DIR)/info/$(PKG_NAME).list
64
65 clean:
66 rm -rf $(PKG_BUILD_DIR)
67 rm -f $(STAGING_DIR)/lib/$(PKG_NAME)*
68 rm -f $(PACKAGE_DIR)/$(PKG_NAME)\*.ipk
This page took 0.041369 seconds and 5 git commands to generate.