airlink generation fix, thanks st9_
[openwrt.git] / package / iproute2 / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=iproute2
12 PKG_VERSION:=2.6.15-060110
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://developer.osdl.org/dev/iproute2/download/
17 PKG_MD5SUM:=04f57a6d366d36426d276178b600f5c5
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/iproute2/Default
22 SECTION:=net
23 CATEGORY:=Network
24 URL:=http://linux-net.osdl.org/index.php/Iproute2
25 endef
26
27 define Package/ip
28 $(call Package/iproute2/Default)
29 TITLE:=Routing control utility
30 endef
31
32 define Package/tc
33 $(call Package/iproute2/Default)
34 TITLE:=Traffic control utility
35 endef
36
37 define Build/Configure
38 $(SED) "s:-O2:${TARGET_CFLAGS}:g" $(PKG_BUILD_DIR)/Makefile
39 $(SED) "s,-I/usr/include/db3,," $(PKG_BUILD_DIR)/Makefile
40 $(SED) "s,^KERNEL_INCLUDE.*,KERNEL_INCLUDE=$(LINUX_DIR)/include," \
41 $(PKG_BUILD_DIR)/Makefile
42 $(SED) "s,^LIBC_INCLUDE.*,LIBC_INCLUDE=$(STAGING_DIR)/include," \
43 $(PKG_BUILD_DIR)/Makefile
44 # For now disable compiling of the misc directory because it seems to fail
45 rm -rf $(PKG_BUILD_DIR)/misc
46 $(SED) "s, misc,," $(PKG_BUILD_DIR)/Makefile
47 endef
48
49 define Build/Compile
50 $(MAKE) -C $(PKG_BUILD_DIR)/netem HOSTCC="$(HOSTCC)" CFLAGS="-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I ../include -DRESOLVE_HOSTNAMES"
51 $(MAKE) -C $(PKG_BUILD_DIR) $(TARGET_CONFIGURE_OPTS) KERNEL_INCLUDE=$(LINUX_DIR)/include all tc/tc ip/ip
52 endef
53
54 define Package/ip/install
55 $(INSTALL_DIR) $(1)/usr/sbin
56 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ip/ip $(1)/usr/sbin/
57 endef
58
59 define Package/tc/install
60 $(INSTALL_DIR) $(1)/usr/sbin
61 $(INSTALL_BIN) $(PKG_BUILD_DIR)/tc/tc $(1)/usr/sbin/
62 endef
63
64 $(eval $(call BuildPackage,ip))
65 $(eval $(call BuildPackage,tc))
This page took 0.043609 seconds and 5 git commands to generate.