add no_werror patch again, fix xscale cflags
[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_BUILD_DIR:=$(BUILD_DIR)/iproute2-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=http://developer.osdl.org/dev/iproute2/download/
18 PKG_MD5SUM:=04f57a6d366d36426d276178b600f5c5
19 PKG_CAT:=zcat
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/ip
24 SECTION:=base
25 CATEGORY:=Network
26 TITLE:=A routing control utility
27 endef
28
29 define Package/tc
30 $(call Package/ip)
31 TITLE:=A traffic control utility
32 endef
33
34 define Build/Configure
35 $(SED) "s:-O2:${TARGET_CFLAGS}:g" $(PKG_BUILD_DIR)/Makefile
36 $(SED) "s,-I/usr/include/db3,," $(PKG_BUILD_DIR)/Makefile
37 $(SED) "s,^KERNEL_INCLUDE.*,KERNEL_INCLUDE=$(LINUX_DIR)/include," \
38 $(PKG_BUILD_DIR)/Makefile
39 $(SED) "s,^LIBC_INCLUDE.*,LIBC_INCLUDE=$(STAGING_DIR)/include," \
40 $(PKG_BUILD_DIR)/Makefile
41 # For now disable compiling of the misc directory because it seems to fail
42 rm -rf $(PKG_BUILD_DIR)/misc
43 $(SED) "s, misc,," $(PKG_BUILD_DIR)/Makefile
44 endef
45
46 define Build/Compile
47 $(MAKE) -j1 -C $(PKG_BUILD_DIR)/netem HOSTCC="$(HOSTCC)" CFLAGS="-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I ../include -DRESOLVE_HOSTNAMES"
48 $(MAKE) -j1 -C $(PKG_BUILD_DIR) $(TARGET_CONFIGURE_OPTS) KERNEL_INCLUDE=$(LINUX_DIR)/include all tc/tc ip/ip
49 endef
50
51 define Package/ip/install
52 install -d -m0755 $(1)/usr/sbin
53 install -m0755 $(PKG_BUILD_DIR)/ip/ip $(1)/usr/sbin/
54 endef
55
56 define Package/tc/install
57 install -d -m0755 $(1)/usr/sbin
58 install -m0755 $(PKG_BUILD_DIR)/tc/tc $(1)/usr/sbin/
59 endef
60
61 $(eval $(call BuildPackage,ip))
62 $(eval $(call BuildPackage,tc))
This page took 0.044055 seconds and 5 git commands to generate.