clean up shfs menuconfig
[openwrt.git] / openwrt / package / iproute2 / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=iproute2
6 PKG_VERSION:=2.6.9
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=4b3f335b0139cb909c6a2ae8bf72e548
9
10 PKG_SOURCE_URL:=http://developer.osdl.org/dev/iproute2/download/
11 PKG_SOURCE:=$(PKG_NAME)-2.6.9-041019.tar.gz
12 PKG_BUILD_DIR:=$(BUILD_DIR)/iproute2-2.6.9
13 PKG_CAT:=zcat
14
15 PKG_IP:=$(PACKAGE_DIR)/ip_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
16 PKG_IP_DIR:=$(PKG_BUILD_DIR)/ipkg/ip
17
18 PKG_TC:=$(PACKAGE_DIR)/tc_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
19 PKG_TC_DIR:=$(PKG_BUILD_DIR)/ipkg/tc
20
21 .NOTPARALLEL:
22
23 $(DL_DIR)/$(PKG_SOURCE):
24 $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL)
25
26 $(PKG_BUILD_DIR)/.patched: $(DL_DIR)/$(PKG_SOURCE)
27 $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
28 $(PATCH) $(PKG_BUILD_DIR) ./patches
29 $(SED) "s:-O2:${TARGET_CFLAGS}:g" $(PKG_BUILD_DIR)/Makefile
30 touch $(PKG_BUILD_DIR)/.patched
31
32 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.patched
33 $(SED) "s,-I/usr/include/db3,," $(PKG_BUILD_DIR)/Makefile
34 $(SED) "s,^KERNEL_INCLUDE.*,KERNEL_INCLUDE=$(LINUX_DIR)/include," \
35 $(PKG_BUILD_DIR)/Makefile
36 $(SED) "s,^LIBC_INCLUDE.*,LIBC_INCLUDE=$(STAGING_DIR)/include," \
37 $(PKG_BUILD_DIR)/Makefile
38 # For now disable compiling of the misc directory because it seems to fail
39 rm -rf $(PKG_BUILD_DIR)/misc
40 $(SED) "s, misc,," $(PKG_BUILD_DIR)/Makefile
41 touch $(PKG_BUILD_DIR)/.configured
42
43 $(PKG_BUILD_DIR)/tc/tc: $(PKG_BUILD_DIR)/.configured
44 $(MAKE) -j1 -C $(PKG_BUILD_DIR) $(TARGET_CONFIGURE_OPTS) KERNEL_INCLUDE=$(LINUX_DIR)/include all tc/tc
45
46 $(PKG_BUILD_DIR)/ip/ip: $(PKG_BUILD_DIR)/.configured
47 $(MAKE) -j1 -C $(PKG_BUILD_DIR) $(TARGET_CONFIGURE_OPTS) KERNEL_INCLUDE=$(LINUX_DIR)/include all ip/ip
48
49
50 $(PKG_IP): $(PKG_BUILD_DIR)/ip/ip $(PACKAGE_DIR)
51 $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_IP_DIR) ip.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
52 mkdir -p $(PKG_IP_DIR)/usr/sbin
53 cp $< $(PKG_IP_DIR)/usr/sbin/
54 $(STRIP) $(PKG_IP_DIR)/usr/sbin/*
55 $(IPKG_BUILD) $(PKG_IP_DIR) $(PACKAGE_DIR)
56
57 $(IPKG_STATE_DIR)/info/ip.list: $(PKG_IP)
58 $(IPKG) install $(PKG_IP)
59
60 $(PKG_TC): $(PKG_BUILD_DIR)/tc/tc $(PACKAGE_DIR)
61 $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_TC_DIR) tc.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
62 mkdir -p $(PKG_TC_DIR)/usr/sbin
63 cp $< $(PKG_TC_DIR)/usr/sbin/
64 $(STRIP) $(PKG_TC_DIR)/usr/sbin/*
65 $(IPKG_BUILD) $(PKG_TC_DIR) $(PACKAGE_DIR)
66
67 $(IPKG_STATE_DIR)/info/tc.list: $(PKG_TC)
68 $(IPKG) install $(PKG_TC)
69
70 $(PACKAGE_DIR):
71 mkdir -p $(PACKAGE_DIR)
72
73 TARGETS:=
74 ifneq ($(BR2_PACKAGE_IPROUTE2_IP),)
75 TARGETS += $(PKG_IP)
76 endif
77 ifneq ($(BR2_PACKAGE_IPROUTE2_TC),)
78 TARGETS += $(PKG_TC)
79 endif
80
81 ifeq ($(BR2_PACKAGE_IPROUTE2_IP),y)
82 INSTALL_TARGETS += $(IPKG_STATE_DIR)/info/ip.list
83 endif
84 ifeq ($(BR2_PACKAGE_IPROUTE2_TC),y)
85 INSTALL_TARGETS += $(IPKG_STATE_DIR)/info/tc.list
86 endif
87
88 source: $(DL_DIR)/$(PKG_SOURCE)
89 prepare: $(PKG_BUILD_DIR)/.patched
90 compile: $(TARGETS)
91 install: $(INSTALL_TARGETS)
92
93 clean:
94 rm -rf $(PKG_BUILD_DIR)
95 rm -f $(PKG_IP) $(PKG_TC)
This page took 0.043187 seconds and 5 git commands to generate.