1fa638d39d7f2fb0c21637be323f706f98512243
[openwrt.git] / package / iproute2 / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=iproute2
6 PKG_VERSION:=2.6.15-060110
7 PKG_RELEASE:=1
8
9 PKG_BUILD_DIR:=$(BUILD_DIR)/iproute2-$(PKG_VERSION)
10 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
11 PKG_SOURCE_URL:=http://developer.osdl.org/dev/iproute2/download/
12 PKG_MD5SUM:=04f57a6d366d36426d276178b600f5c5
13 PKG_CAT:=zcat
14
15 include $(TOPDIR)/package/rules.mk
16
17 define Package/ip
18 SECTION:=base
19 CATEGORY:=Network
20 DEPENDS:=iproute2
21 TITLE:=A routing control utility
22 endef
23
24 define Package/tc
25 $(call Package/ip)
26 TITLE:=A traffic control utility
27 endef
28
29 define Build/Configure
30 $(SED) "s:-O2:${TARGET_CFLAGS}:g" $(PKG_BUILD_DIR)/Makefile
31 $(SED) "s,-I/usr/include/db3,," $(PKG_BUILD_DIR)/Makefile
32 $(SED) "s,^KERNEL_INCLUDE.*,KERNEL_INCLUDE=$(LINUX_DIR)/include," \
33 $(PKG_BUILD_DIR)/Makefile
34 $(SED) "s,^LIBC_INCLUDE.*,LIBC_INCLUDE=$(STAGING_DIR)/include," \
35 $(PKG_BUILD_DIR)/Makefile
36 # For now disable compiling of the misc directory because it seems to fail
37 rm -rf $(PKG_BUILD_DIR)/misc
38 $(SED) "s, misc,," $(PKG_BUILD_DIR)/Makefile
39 endef
40
41 define Build/Compile
42 $(MAKE) -j1 -C $(PKG_BUILD_DIR)/netem HOSTCC=$(HOSTCC) CFLAGS="-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I ../include -DRESOLVE_HOSTNAMES"
43 $(MAKE) -j1 -C $(PKG_BUILD_DIR) $(TARGET_CONFIGURE_OPTS) KERNEL_INCLUDE=$(LINUX_DIR)/include all tc/tc ip/ip
44 endef
45
46 define Package/ip/install
47 install -d -m0755 $(1)/usr/sbin
48 install -m0755 $(PKG_BUILD_DIR)/ip/ip $(1)/usr/sbin/
49 endef
50
51 define Package/tc/install
52 install -d -m0755 $(1)/usr/sbin
53 install -m0755 $(PKG_BUILD_DIR)/tc/tc $(1)/usr/sbin/
54 endef
55
56 $(eval $(call BuildPackage,ip))
57 $(eval $(call BuildPackage,tc))
This page took 0.037836 seconds and 3 git commands to generate.