1 #############################################################
5 #############################################################
7 IPROUTE2_DIR
=$(BUILD_DIR
)/iproute2
9 #IPROUTE2_SOURCE_URL=ftp://ftp.inr.ac.ru/ip-routing/
10 #IPROUTE2_SOURCE=iproute2-2.4.7-now-ss020116-try.tar.gz
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
18 IPROUTE2_IPKTARGET
=iproute.ipk
19 IPROUTE2_IPKSRC
:=iproute-pkg.tgz
20 IPROUTE2_IPKSITE
:=http
://openwrt.rozeware.bc.ca
/ipkg-dev
23 $(DL_DIR
)/$(IPROUTE2_SOURCE
):
24 $(WGET
) -P
$(DL_DIR
) $(IPROUTE2_SOURCE_URL
)$(IPROUTE2_SOURCE
)
26 $(DL_DIR
)/$(IPROUTE2_PATCH
):
27 $(WGET
) -P
$(DL_DIR
) $(IPROUTE2_SOURCE_URL
)/$(IPROUTE2_PATCH
)
29 $(DL_DIR
)/$(IPROUTE2_IPKSRC
):
30 $(WGET
) -P
$(DL_DIR
) $(IPROUTE2_IPKSITE
)/$(IPROUTE2_IPKSRC
)
33 iproute2-source
: $(DL_DIR
)/$(IPROUTE2_SOURCE
) #$(DL_DIR)/$(IPROUTE2_PATCH)
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
)
41 $(SED
) "s:-O2:${TARGET_CFLAGS}:g" $(IPROUTE2_DIR
)/Makefile
43 @
# needed on atleast i386.. however breaks on mipsel
44 $(SED
) 's:-I\.\./include-glibc::g' $(IPROUTE2_DIR
)/Makefile
46 touch
$(IPROUTE2_DIR
)/.unpacked
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
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
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
/
67 cp
-af
$(IPROUTE2_DIR
)/tc
/tc
$(TARGET_DIR
)/usr
/sbin
/ && \
68 $(STRIP
) $(TARGET_DIR
)/usr
/sbin
/tc
70 iproute2
: $(TARGET_DIR
)/usr
/sbin
/tc
73 $(MAKE
) DESTDIR
=$(TARGET_DIR
) CC
=$(TARGET_CC
) -C
$(IPROUTE2_DIR
) uninstall
74 -$(MAKE
) -C
$(IPROUTE2_DIR
) clean
77 rm -rf
$(IPROUTE2_DIR
)
79 iproute2-ipk
: $(IPROUTE2_IPKTARGET
)
81 $(IPROUTE2_IPKTARGET
): $(IPROUTE2_DIR
)/ipkg
/rules
82 (cd
$(IPROUTE2_DIR
); ipkg-buildpackage
)
84 $(IPROUTE2_DIR
)/ipkg
/rules
: $(IPROUTE2_DIR
)/tc
/tc
$(DL_DIR
)/$(IPROUTE2_IPKSRC
)
85 tar -C
$(IPROUTE2_DIR
) -zxf
$(DL_DIR
)/$(IPROUTE2_IPKSRC
)