1 #############################################################
5 #############################################################
7 IPROUTE2_DIR
=$(BUILD_DIR
)/iproute2
8 IP_IPK_DIR
=$(BUILD_DIR
)/ip-2.0
-ipk
9 TC_IPK_DIR
=$(BUILD_DIR
)/tc-2.0
-ipk
11 #IPROUTE2_SOURCE_URL=ftp://ftp.inr.ac.ru/ip-routing/
12 #IPROUTE2_SOURCE=iproute2-2.4.7-now-ss020116-try.tar.gz
14 #Use the debian source for now, as the .ru site has availability problems
15 IPROUTE2_SOURCE_URL
=http
://ftp.debian.org
/debian
/pool
/main
/i
/iproute
/
16 IPROUTE2_SOURCE
=iproute_20010824.orig.
tar.gz
17 IPROUTE2_PATCH
:=iproute_20010824-8.diff.gz
18 IPROUTE2_PATCH_2
:=iproute2-
*.patch
21 $(DL_DIR
)/$(IPROUTE2_SOURCE
):
22 $(WGET
) -P
$(DL_DIR
) $(IPROUTE2_SOURCE_URL
)$(IPROUTE2_SOURCE
)
24 $(DL_DIR
)/$(IPROUTE2_PATCH
):
25 $(WGET
) -P
$(DL_DIR
) $(IPROUTE2_SOURCE_URL
)/$(IPROUTE2_PATCH
)
28 iproute2-source
: $(DL_DIR
)/$(IPROUTE2_SOURCE
) #$(DL_DIR)/$(IPROUTE2_PATCH)
30 $(IPROUTE2_DIR
)/.unpacked
: $(DL_DIR
)/$(IPROUTE2_SOURCE
) #$(DL_DIR)/$(IPROUTE2_PATCH)
31 rm -rf
$(IPROUTE2_DIR
).orig
$(IPROUTE2_DIR
)
32 zcat
$(DL_DIR
)/$(IPROUTE2_SOURCE
) |
tar -C
$(BUILD_DIR
) -xvf
-
33 #zcat $(DL_DIR)/$(IPROUTE2_PATCH) | patch -p1 -d $(IPROUTE2_DIR)
34 $(SOURCE_DIR
)/patch-kernel.sh
$(IPROUTE2_DIR
) $(SOURCE_DIR
) $(IPROUTE2_PATCH_2
)
36 $(SED
) "s:-O2:${TARGET_CFLAGS}:g" $(IPROUTE2_DIR
)/Makefile
38 @
# needed on atleast i386.. however breaks on mipsel
39 $(SED
) 's:-I\.\./include-glibc::g' $(IPROUTE2_DIR
)/Makefile
41 touch
$(IPROUTE2_DIR
)/.unpacked
43 $(IPROUTE2_DIR
)/.configured
: $(IPROUTE2_DIR
)/.unpacked
44 $(SED
) "s,-I/usr/include/db3,," $(IPROUTE2_DIR
)/Makefile
45 $(SED
) "s,^KERNEL_INCLUDE.*,KERNEL_INCLUDE=$(LINUX_DIR)/include," \
46 $(IPROUTE2_DIR
)/Makefile
47 $(SED
) "s,^LIBC_INCLUDE.*,LIBC_INCLUDE=$(STAGING_DIR)/include," \
48 $(IPROUTE2_DIR
)/Makefile
49 # For now disable compiling of the misc directory because it seems to fail
50 rm -rf
$(IPROUTE2_DIR
)/misc
51 $(SED
) "s, misc,," $(IPROUTE2_DIR
)/Makefile
52 touch
$(IPROUTE2_DIR
)/.configured
54 $(IPROUTE2_DIR
)/tc
/tc
: $(IPROUTE2_DIR
)/.configured
55 $(MAKE
) -C
$(IPROUTE2_DIR
) $(TARGET_CONFIGURE_OPTS
) KERNEL_INCLUDE
=$(LINUX_DIR
)/include
57 $(TARGET_DIR
)/usr
/sbin
/tc
: $(IPROUTE2_DIR
)/tc
/tc
58 @
# Make sure our $(TARGET_DIR)/usr/sbin/ exists.
59 -mkdir
-p
$(TARGET_DIR
)/usr
/sbin
/
61 cp
-af
$(IPROUTE2_DIR
)/tc
/tc
$(TARGET_DIR
)/usr
/sbin
/ && \
62 $(STRIP
) $(TARGET_DIR
)/usr
/sbin
/tc
64 iproute2
: $(TARGET_DIR
)/usr
/sbin
/tc
67 $(MAKE
) DESTDIR
=$(TARGET_DIR
) CC
=$(TARGET_CC
) -C
$(IPROUTE2_DIR
) uninstall
68 -$(MAKE
) -C
$(IPROUTE2_DIR
) clean
71 rm -rf
$(IPROUTE2_DIR
) $(IP_IPK_DIR
) $(TC_IPK_DIR
)
74 iproute2-ipk
: $(IPROUTE2_DIR
)/tc
/tc
75 mkdir
-p
$(IP_IPK_DIR
)
76 mkdir
-p
$(TC_IPK_DIR
)
77 cp
-a
$(OPENWRT_IPK_DIR
)/iproute
/ip
/CONTROL
$(IP_IPK_DIR
)/CONTROL
78 cp
-a
$(OPENWRT_IPK_DIR
)/iproute
/tc
/CONTROL
$(TC_IPK_DIR
)/CONTROL
79 mkdir
-p
$(IP_IPK_DIR
)/usr
/sbin
80 mkdir
-p
$(TC_IPK_DIR
)/usr
/sbin
81 install -m
755 $(IPROUTE2_DIR
)/ip
/ip
$(IP_IPK_DIR
)/usr
/sbin
/
82 install -m
755 $(IPROUTE2_DIR
)/tc
/tc
$(TC_IPK_DIR
)/usr
/sbin
/
83 $(STRIP
) $(IP_IPK_DIR
)/usr
/sbin
/ip
84 $(STRIP
) $(TC_IPK_DIR
)/usr
/sbin
/tc
85 cd
$(BUILD_DIR
); $(IPKG_BUILD
) $(IP_IPK_DIR
)
86 cd
$(BUILD_DIR
); $(IPKG_BUILD
) $(TC_IPK_DIR
)