Root/package/iw/Makefile

1#
2# Copyright (C) 2007-2011 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=iw
11PKG_VERSION:=3.3
12PKG_RELEASE:=1
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15PKG_SOURCE_URL:=http://wireless.kernel.org/download/iw/
16PKG_MD5SUM:=146ad14cdeb39fb88b21efdbb28787d1
17
18include $(INCLUDE_DIR)/package.mk
19
20define Package/iw
21  SECTION:=net
22  CATEGORY:=Network
23  TITLE:=cfg80211 interface configuration utility
24  URL:=http://wireless.kernel.org/en/users/Documentation/iw
25  DEPENDS:= +libnl-tiny @(!(TARGET_avr32||TARGET_etrax)||BROKEN)
26endef
27
28define Build/Configure
29    echo "const char iw_version[] = \"$(PKG_VERSION)\";" > $(PKG_BUILD_DIR)/version.c
30    rm -f $(PKG_BUILD_DIR)/version.sh
31    touch $(PKG_BUILD_DIR)/version.sh
32    chmod +x $(PKG_BUILD_DIR)/version.sh
33endef
34
35TARGET_CPPFLAGS:= \
36    -I$(STAGING_DIR)/usr/include/libnl-tiny \
37    $(TARGET_CPPFLAGS) \
38    -DCONFIG_LIBNL20 \
39    -D_GNU_SOURCE
40
41MAKE_FLAGS += \
42    CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
43    LDFLAGS="$(TARGET_LDFLAGS)" \
44    NL1FOUND="" NL2FOUND=Y \
45    NLLIBNAME="libnl-tiny" \
46    LIBS="-lm -lnl-tiny" \
47    V=1
48
49define Package/iw/install
50    $(INSTALL_DIR) $(1)/usr/sbin
51    $(INSTALL_BIN) $(PKG_BUILD_DIR)/iw $(1)/usr/sbin/
52endef
53
54$(eval $(call BuildPackage,iw))
55

Archive Download this file



interactive