aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/utils/iw/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'package/network/utils/iw/Makefile')
-rw-r--r--package/network/utils/iw/Makefile17
1 files changed, 17 insertions, 0 deletions
diff --git a/package/network/utils/iw/Makefile b/package/network/utils/iw/Makefile
index 912fc3e28d..a11768268c 100644
--- a/package/network/utils/iw/Makefile
+++ b/package/network/utils/iw/Makefile
@@ -15,6 +15,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/software/network/iw
PKG_HASH:=f01671c0074bfdec082a884057edba1b9efd35c89eda554638496f03b769ad89
+PKG_BUILD_DIR:=$(BUILD_DIR)/iw-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_LICENSE:=GPL-2.0
@@ -26,6 +27,14 @@ define Package/iw
TITLE:=cfg80211 interface configuration utility
URL:=http://wireless.kernel.org/en/users/Documentation/iw
DEPENDS:= +libnl-tiny
+ VARIANT:=tiny
+endef
+
+define Package/iw-full
+ $(Package/iw)
+ TITLE += (full version)
+ VARIANT:=full
+ PROVIDES:=iw
endef
define Build/Configure
@@ -40,6 +49,11 @@ TARGET_CPPFLAGS:= \
-DCONFIG_LIBNL20 \
-D_GNU_SOURCE
+ifeq ($(BUILD_VARIANT),full)
+ TARGET_CPPFLAGS += -DIW_FULL
+ MAKE_FLAGS += IW_FULL=1
+endif
+
MAKE_FLAGS += \
CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -ffunction-sections -fdata-sections" \
LDFLAGS="$(TARGET_LDFLAGS) -Wl,--gc-sections" \
@@ -53,4 +67,7 @@ define Package/iw/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/iw $(1)/usr/sbin/
endef
+Package/iw-full/install=$(Package/iw/install)
+
$(eval $(call BuildPackage,iw))
+$(eval $(call BuildPackage,iw-full))