make kernel_menuconfig work without target toolchain
[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 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/iproute2-$(PKG_VERSION)
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/iproute2/Default
25 SECTION:=net
26 CATEGORY:=Network
27 URL:=http://linux-net.osdl.org/index.php/Iproute2
28 endef
29
30 define Package/ip
31 $(call Package/iproute2/Default)
32 TITLE:=Routing control utility
33 endef
34
35 define Package/tc
36 $(call Package/iproute2/Default)
37 TITLE:=Traffic control utility
38 endef
39
40 define Build/Configure
41 $(SED) "s:-O2:${TARGET_CFLAGS}:g" $(PKG_BUILD_DIR)/Makefile
42 $(SED) "s,-I/usr/include/db3,," $(PKG_BUILD_DIR)/Makefile
43 $(SED) "s,^KERNEL_INCLUDE.*,KERNEL_INCLUDE=$(LINUX_DIR)/include," \
44 $(PKG_BUILD_DIR)/Makefile
45 $(SED) "s,^LIBC_INCLUDE.*,LIBC_INCLUDE=$(STAGING_DIR)/include," \
46 $(PKG_BUILD_DIR)/Makefile
47 # For now disable compiling of the misc directory because it seems to fail
48 rm -rf $(PKG_BUILD_DIR)/misc
49 $(SED) "s, misc,," $(PKG_BUILD_DIR)/Makefile
50 endef
51
52 define Build/Compile
53 $(MAKE) -C $(PKG_BUILD_DIR)/netem HOSTCC="$(HOSTCC)" CFLAGS="-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I ../include -DRESOLVE_HOSTNAMES"
54 $(MAKE) -C $(PKG_BUILD_DIR) $(TARGET_CONFIGURE_OPTS) KERNEL_INCLUDE=$(LINUX_DIR)/include all tc/tc ip/ip
55 endef
56
57 define Package/ip/install
58 $(INSTALL_DIR) $(1)/usr/sbin
59 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ip/ip $(1)/usr/sbin/
60 endef
61
62 define Package/tc/install
63 $(INSTALL_DIR) $(1)/usr/sbin
64 $(INSTALL_BIN) $(PKG_BUILD_DIR)/tc/tc $(1)/usr/sbin/
65 endef
66
67 $(eval $(call BuildPackage,ip))
68 $(eval $(call BuildPackage,tc))
This page took 0.0568 seconds and 5 git commands to generate.