2008-07-06 18:23:29 +00:00
|
|
|
#
|
2011-05-22 12:02:35 +00:00
|
|
|
# Copyright (C) 2007-2011 OpenWrt.org
|
2007-11-30 11:30:37 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=iw
|
2018-02-24 10:43:28 +00:00
|
|
|
PKG_VERSION:=4.14
|
2012-02-07 11:28:21 +00:00
|
|
|
PKG_RELEASE:=1
|
2007-11-30 11:30:37 +00:00
|
|
|
|
2014-02-05 20:52:34 +00:00
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
2016-05-24 13:16:03 +00:00
|
|
|
PKG_SOURCE_URL:=@KERNEL/software/network/iw
|
2018-02-24 10:43:28 +00:00
|
|
|
PKG_HASH:=f01671c0074bfdec082a884057edba1b9efd35c89eda554638496f03b769ad89
|
2007-11-30 11:30:37 +00:00
|
|
|
|
2018-10-03 06:57:00 +00:00
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/iw-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
2016-06-07 06:58:31 +00:00
|
|
|
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
2014-11-02 12:20:54 +00:00
|
|
|
PKG_LICENSE:=GPL-2.0
|
2012-10-08 11:41:02 +00:00
|
|
|
|
2007-11-30 11:30:37 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/iw
|
|
|
|
SECTION:=net
|
|
|
|
CATEGORY:=Network
|
|
|
|
TITLE:=cfg80211 interface configuration utility
|
2008-09-21 14:51:44 +00:00
|
|
|
URL:=http://wireless.kernel.org/en/users/Documentation/iw
|
2015-03-24 10:07:40 +00:00
|
|
|
DEPENDS:= +libnl-tiny
|
2018-10-03 06:57:00 +00:00
|
|
|
VARIANT:=tiny
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iw-full
|
|
|
|
$(Package/iw)
|
|
|
|
TITLE += (full version)
|
|
|
|
VARIANT:=full
|
|
|
|
PROVIDES:=iw
|
2007-11-30 11:30:37 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Configure
|
2009-04-25 14:53:42 +00:00
|
|
|
echo "const char iw_version[] = \"$(PKG_VERSION)\";" > $(PKG_BUILD_DIR)/version.c
|
2017-09-29 06:26:00 +00:00
|
|
|
echo "#!/bin/sh" > $(PKG_BUILD_DIR)/version.sh
|
2009-04-30 14:38:30 +00:00
|
|
|
chmod +x $(PKG_BUILD_DIR)/version.sh
|
2007-11-30 11:30:37 +00:00
|
|
|
endef
|
|
|
|
|
2009-04-30 14:38:30 +00:00
|
|
|
TARGET_CPPFLAGS:= \
|
|
|
|
-I$(STAGING_DIR)/usr/include/libnl-tiny \
|
|
|
|
$(TARGET_CPPFLAGS) \
|
2009-05-04 16:13:46 +00:00
|
|
|
-DCONFIG_LIBNL20 \
|
2018-07-11 17:21:08 +00:00
|
|
|
-D_GNU_SOURCE \
|
|
|
|
-flto
|
2009-04-30 14:38:30 +00:00
|
|
|
|
2018-10-03 06:57:00 +00:00
|
|
|
ifeq ($(BUILD_VARIANT),full)
|
|
|
|
TARGET_CPPFLAGS += -DIW_FULL
|
|
|
|
MAKE_FLAGS += IW_FULL=1
|
|
|
|
endif
|
|
|
|
|
2007-11-30 11:30:37 +00:00
|
|
|
MAKE_FLAGS += \
|
2013-12-13 11:02:05 +00:00
|
|
|
CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -ffunction-sections -fdata-sections" \
|
2018-07-11 17:21:08 +00:00
|
|
|
LDFLAGS="$(TARGET_LDFLAGS) -Wl,--gc-sections -flto" \
|
2009-04-30 14:38:30 +00:00
|
|
|
NL1FOUND="" NL2FOUND=Y \
|
|
|
|
NLLIBNAME="libnl-tiny" \
|
|
|
|
LIBS="-lm -lnl-tiny" \
|
|
|
|
V=1
|
2007-11-30 11:30:37 +00:00
|
|
|
|
2010-06-26 20:44:28 +00:00
|
|
|
define Package/iw/install
|
2007-11-30 11:30:37 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/iw $(1)/usr/sbin/
|
2010-06-26 20:44:28 +00:00
|
|
|
endef
|
2007-11-30 11:30:37 +00:00
|
|
|
|
2018-10-03 06:57:00 +00:00
|
|
|
Package/iw-full/install=$(Package/iw/install)
|
|
|
|
|
2007-11-30 11:30:37 +00:00
|
|
|
$(eval $(call BuildPackage,iw))
|
2018-10-03 06:57:00 +00:00
|
|
|
$(eval $(call BuildPackage,iw-full))
|