2 # Copyright (C) 2007-2011 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.xz
15 PKG_SOURCE_URL
:=@KERNEL
/software
/network
/iw
16 PKG_HASH
:=f01671c0074bfdec082a884057edba1b9efd35c89eda554638496f03b769ad89
18 PKG_BUILD_DIR
:=$(BUILD_DIR
)/iw-
$(BUILD_VARIANT
)/$(PKG_NAME
)-$(PKG_VERSION
)
19 PKG_MAINTAINER
:=Felix Fietkau
<nbd@nbd.name
>
22 include $(INCLUDE_DIR
)/package.mk
27 TITLE
:=cfg80211 interface configuration utility
28 URL
:=http
://wireless.kernel.org
/en
/users
/Documentation
/iw
33 define Package
/iw-full
35 TITLE
+= (full version
)
40 define Build
/Configure
41 echo
"const char iw_version[] = \"$(PKG_VERSION)\";" > $(PKG_BUILD_DIR
)/version.c
42 echo
"#!/bin/sh" > $(PKG_BUILD_DIR
)/version.sh
43 chmod
+x
$(PKG_BUILD_DIR
)/version.sh
47 -I
$(STAGING_DIR
)/usr
/include/libnl-tiny \
53 ifeq ($(BUILD_VARIANT
),full
)
54 TARGET_CPPFLAGS
+= -DIW_FULL
55 MAKE_FLAGS
+= IW_FULL
=1
59 CFLAGS
="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -ffunction-sections -fdata-sections" \
60 LDFLAGS
="$(TARGET_LDFLAGS) -Wl,--gc-sections -flto" \
61 NL1FOUND
="" NL2FOUND
=Y \
62 NLLIBNAME
="libnl-tiny" \
63 LIBS
="-lm -lnl-tiny" \
66 define Package
/iw
/install
67 $(INSTALL_DIR
) $(1)/usr
/sbin
68 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/iw
$(1)/usr
/sbin
/
71 Package
/iw-full
/install=$(Package
/iw
/install)
73 $(eval
$(call BuildPackage
,iw
))
74 $(eval
$(call BuildPackage
,iw-full
))