ifup is now a standalone script
[openwrt.git] / obsolete-buildroot / make / iproute2.mk
1 #############################################################
2 #
3 # iproute2
4 #
5 #############################################################
6
7 IPROUTE2_DIR=$(BUILD_DIR)/iproute2
8
9 #IPROUTE2_SOURCE_URL=ftp://ftp.inr.ac.ru/ip-routing/
10 #IPROUTE2_SOURCE=iproute2-2.4.7-now-ss020116-try.tar.gz
11
12 #Use the debian source for now, as the .ru site has availability problems
13 IPROUTE2_SOURCE_URL=http://ftp.debian.org/debian/pool/main/i/iproute/
14 IPROUTE2_SOURCE=iproute_20010824.orig.tar.gz
15 IPROUTE2_PATCH:=iproute_20010824-8.diff.gz
16 IPROUTE2_PATCH_2:=iproute2-cross-ar-20010824.patch
17
18 IPROUTE2_IPKTARGET=iproute.ipk
19 IPROUTE2_IPKSRC:=iproute-pkg.tgz
20 IPROUTE2_IPKSITE:=http://openwrt.rozeware.bc.ca/ipkg-dev
21
22
23 $(DL_DIR)/$(IPROUTE2_SOURCE):
24 $(WGET) -P $(DL_DIR) $(IPROUTE2_SOURCE_URL)$(IPROUTE2_SOURCE)
25
26 $(DL_DIR)/$(IPROUTE2_PATCH):
27 $(WGET) -P $(DL_DIR) $(IPROUTE2_SOURCE_URL)/$(IPROUTE2_PATCH)
28
29 $(DL_DIR)/$(IPROUTE2_IPKSRC):
30 $(WGET) -P $(DL_DIR) $(IPROUTE2_IPKSITE)/$(IPROUTE2_IPKSRC)
31
32
33 iproute2-source: $(DL_DIR)/$(IPROUTE2_SOURCE) #$(DL_DIR)/$(IPROUTE2_PATCH)
34
35 $(IPROUTE2_DIR)/.unpacked: $(DL_DIR)/$(IPROUTE2_SOURCE) #$(DL_DIR)/$(IPROUTE2_PATCH)
36 rm -rf $(IPROUTE2_DIR).orig $(IPROUTE2_DIR)
37 zcat $(DL_DIR)/$(IPROUTE2_SOURCE) | tar -C $(BUILD_DIR) -xvf -
38 #zcat $(DL_DIR)/$(IPROUTE2_PATCH) | patch -p1 -d $(IPROUTE2_DIR)
39 cat $(SOURCE_DIR)/$(IPROUTE2_PATCH_2) | patch -p1 -d $(IPROUTE2_DIR)
40 # fun sed hacks.
41 $(SED) "s:-O2:${TARGET_CFLAGS}:g" $(IPROUTE2_DIR)/Makefile
42 ifeq ($(ARCH),i386)
43 @# needed on atleast i386.. however breaks on mipsel
44 $(SED) 's:-I\.\./include-glibc::g' $(IPROUTE2_DIR)/Makefile
45 endif
46 touch $(IPROUTE2_DIR)/.unpacked
47
48 $(IPROUTE2_DIR)/.configured: $(IPROUTE2_DIR)/.unpacked
49 $(SED) "s,-I/usr/include/db3,," $(IPROUTE2_DIR)/Makefile
50 $(SED) "s,^KERNEL_INCLUDE.*,KERNEL_INCLUDE=$(LINUX_DIR)/include," \
51 $(IPROUTE2_DIR)/Makefile
52 $(SED) "s,^LIBC_INCLUDE.*,LIBC_INCLUDE=$(STAGING_DIR)/include," \
53 $(IPROUTE2_DIR)/Makefile
54 # For now disable compiling of the misc directory because it seems to fail
55 rm -rf $(IPROUTE2_DIR)/misc
56 $(SED) "s, misc,," $(IPROUTE2_DIR)/Makefile
57 touch $(IPROUTE2_DIR)/.configured
58
59 $(IPROUTE2_DIR)/tc/tc: $(IPROUTE2_DIR)/.configured
60 $(MAKE) -C $(IPROUTE2_DIR) $(TARGET_CONFIGURE_OPTS) KERNEL_INCLUDE=$(LINUX_DIR)/include
61 $(STRIP) $(IPROUTE2_DIR)/tc/tc
62
63 $(TARGET_DIR)/usr/sbin/tc: $(IPROUTE2_DIR)/tc/tc
64 @# Make sure our $(TARGET_DIR)/usr/sbin/ exists.
65 -mkdir -p $(TARGET_DIR)/usr/sbin/
66 @# Copy The tc binary
67 cp -af $(IPROUTE2_DIR)/tc/tc $(TARGET_DIR)/usr/sbin/ && \
68 $(STRIP) $(TARGET_DIR)/usr/sbin/tc
69
70 iproute2: $(TARGET_DIR)/usr/sbin/tc
71
72 iproute2-clean:
73 $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(IPROUTE2_DIR) uninstall
74 -$(MAKE) -C $(IPROUTE2_DIR) clean
75
76 iproute2-dirclean:
77 rm -rf $(IPROUTE2_DIR)
78
79 iproute2-ipk: $(IPROUTE2_IPKTARGET)
80
81 $(IPROUTE2_IPKTARGET): $(IPROUTE2_DIR)/ipkg/rules
82 (cd $(IPROUTE2_DIR); $(IPKG_BUILDPACKAGE) )
83
84 $(IPROUTE2_DIR)/ipkg/rules: $(IPROUTE2_DIR)/tc/tc $(DL_DIR)/$(IPROUTE2_IPKSRC)
85 tar -C $(IPROUTE2_DIR) -zxf $(DL_DIR)/$(IPROUTE2_IPKSRC)
86
This page took 0.049552 seconds and 5 git commands to generate.