kumquat-buildroot/make/iproute2.mk

58 lines
2.0 KiB
Makefile
Raw Normal View History

2003-06-04 20:36:51 +02:00
#############################################################
#
# iproute2
#
#############################################################
IPROUTE2_DIR=$(BUILD_DIR)/iproute2
#IPROUTE2_SOURCE_URL=ftp://ftp.inr.ac.ru/ip-routing/
#IPROUTE2_SOURCE=iproute2-2.4.7-now-ss020116-try.tar.gz
#Use the debian source for now, as the .ru site has availability problems
IPROUTE2_SOURCE_URL=http://ftp.debian.org/debian/pool/main/i/iproute/
IPROUTE2_SOURCE=iproute_20010824.orig.tar.gz
IPROUTE2_PATCH:=iproute_20010824-8.diff.gz
2003-06-04 20:36:51 +02:00
$(DL_DIR)/$(IPROUTE2_SOURCE):
$(WGET) -P $(DL_DIR) $(IPROUTE2_SOURCE_URL)$(IPROUTE2_SOURCE)
$(DL_DIR)/$(IPROUTE2_PATCH):
$(WGET) -P $(DL_DIR) $(IPROUTE2_SOURCE_URL)/$(IPROUTE2_PATCH)
2003-06-04 20:36:51 +02:00
iproute2-source: $(DL_DIR)/$(IPROUTE2_SOURCE) #$(DL_DIR)/$(IPROUTE2_PATCH)
2003-06-04 20:36:51 +02:00
2003-06-20 22:13:08 +02:00
$(IPROUTE2_DIR)/.unpacked: $(DL_DIR)/$(IPROUTE2_SOURCE) #$(DL_DIR)/$(IPROUTE2_PATCH)
rm -rf $(IPROUTE2_DIR).orig $(IPROUTE2_DIR)
2003-06-04 20:36:51 +02:00
zcat $(DL_DIR)/$(IPROUTE2_SOURCE) | tar -C $(BUILD_DIR) -xvf -
#zcat $(DL_DIR)/$(IPROUTE2_PATCH) | patch -p1 -d $(IPROUTE2_DIR)
touch $(IPROUTE2_DIR)/.unpacked
2003-06-04 20:36:51 +02:00
$(IPROUTE2_DIR)/.configured: $(IPROUTE2_DIR)/.unpacked
perl -pi -e "s,-I/usr/include/db3,," $(IPROUTE2_DIR)/Makefile
2003-06-04 20:36:51 +02:00
perl -pi -e "s,^KERNEL_INCLUDE.*,KERNEL_INCLUDE=$(LINUX_DIR)/include," \
$(IPROUTE2_DIR)/Makefile
2003-06-04 20:36:51 +02:00
perl -pi -e "s,^LIBC_INCLUDE.*,LIBC_INCLUDE=$(STAGING_DIR)/include," \
$(IPROUTE2_DIR)/Makefile
2003-06-04 20:36:51 +02:00
# For now disable compiling of the misc directory because it seems to fail
rm -rf $(IPROUTE2_DIR)/misc
perl -pi -e "s, misc,," $(IPROUTE2_DIR)/Makefile
touch $(IPROUTE2_DIR)/.configured
2003-06-04 20:36:51 +02:00
$(IPROUTE2_DIR)/tc/tc: $(IPROUTE2_DIR)/.configured
$(MAKE) -C $(IPROUTE2_DIR) KERNEL_INCLUDE=$(LINUX_SOURCE_DIR)/include CC=$(TARGET_CC)
2003-06-04 20:36:51 +02:00
$(TARGET_DIR)/usr/sbin/tc: $(IPROUTE2_DIR)/tc/tc
2003-06-04 20:36:51 +02:00
# Copy The tc binary
cp -af $(IPROUTE2_DIR)/tc/tc $(TARGET_DIR)/usr/sbin/
2003-06-04 20:36:51 +02:00
iproute2: $(TARGET_DIR)/usr/sbin/tc
iproute2-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(IPROUTE2_DIR) uninstall
-$(MAKE) -C $(IPROUTE2_DIR) clean
2003-06-04 20:36:51 +02:00
iproute2-dirclean:
rm -rf $(IPROUTE2_DIR)
2003-06-04 20:36:51 +02:00