[package] fix USB modules build on octeon
[openwrt.git] / package / wireless-tools / Makefile
1 #
2 # Copyright (C) 2006-2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=wireless-tools
11 PKG_VERSION:=29
12 PKG_MINOR:=
13 PKG_RELEASE:=4
14
15 PKG_SOURCE:=wireless_tools.$(PKG_VERSION)$(PKG_MINOR).tar.gz
16 PKG_SOURCE_URL:=http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux
17 PKG_MD5SUM:=e06c222e186f7cc013fd272d023710cb
18 TAR_OPTIONS += || true
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/wireless_tools.$(PKG_VERSION)
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/wireless-tools/Default
25 URL:=http://hplabs.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html
26 endef
27
28 define Package/wireless-tools
29 $(call Package/wireless-tools/Default)
30 SECTION:=net
31 CATEGORY:=Base system
32 TITLE:=Tools for manipulating Linux Wireless Extensions
33 endef
34
35 define Package/wireless-tools/description
36 This package contains a collection of tools for configuring wireless
37 adapters implementing the "Linux Wireless Extensions".
38 endef
39
40 define Package/libiw
41 $(call Package/wireless-tools/Default)
42 SECTION:=libs
43 CATEGORY:=Libraries
44 TITLE:=Library for manipulating Linux Wireless Extensions
45 endef
46
47 define Package/libiw/description
48 This package contains a library for manipulating
49 "Linux Wireless Extensions".
50 endef
51
52 define Build/Compile
53 rm -rf $(PKG_INSTALL_DIR)
54 mkdir -p $(PKG_INSTALL_DIR)
55 $(MAKE) -C $(PKG_BUILD_DIR) \
56 $(TARGET_CONFIGURE_OPTS) \
57 CFLAGS="$(TARGET_CFLAGS) -I." \
58 BUILD_WE_ESSENTIAL=y \
59 LIBS="-lm -Wl,--gc-sections" \
60 libiw.so.$(PKG_VERSION) iwmulticall
61 $(MAKE) -C $(PKG_BUILD_DIR) \
62 PREFIX="$(PKG_INSTALL_DIR)" \
63 INSTALL_DIR="$(PKG_INSTALL_DIR)/usr/sbin" \
64 INSTALL_LIB="$(PKG_INSTALL_DIR)/usr/lib" \
65 install-iwmulticall
66 endef
67
68 define Build/InstallDev
69 mkdir -p $(1)/usr/include
70 $(CP) $(PKG_BUILD_DIR)/{iwlib,wireless}.h $(1)/usr/include/
71 mkdir -p $(1)/usr/lib
72 $(CP) $(PKG_BUILD_DIR)/libiw.so* $(1)/usr/lib/
73 ln -sf libiw.so.$(PKG_VERSION) $(1)/usr/lib/libiw.so
74 endef
75
76 define Package/wireless-tools/install
77 $(INSTALL_DIR) $(1)/usr/sbin
78 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/iwconfig $(1)/usr/sbin/
79 ln -sf iwconfig $(1)/usr/sbin/iwlist
80 ln -sf iwconfig $(1)/usr/sbin/iwpriv
81 endef
82
83 define Package/libiw/install
84 $(INSTALL_DIR) $(1)/usr/lib
85 $(CP) $(PKG_BUILD_DIR)/libiw.so.* $(1)/usr/lib/
86 endef
87
88 $(eval $(call BuildPackage,wireless-tools))
89 $(eval $(call BuildPackage,libiw))
This page took 0.044165 seconds and 5 git commands to generate.