Makefile 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=iw
  9. PKG_VERSION:=4.3
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=https://www.kernel.org/pub/software/network/iw
  13. PKG_MD5SUM:=7adec72e91ebdd9c55429fa34a23a6f5
  14. PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
  15. PKG_LICENSE:=GPL-2.0
  16. include $(INCLUDE_DIR)/package.mk
  17. define Package/iw
  18. SECTION:=net
  19. CATEGORY:=Network
  20. TITLE:=cfg80211 interface configuration utility
  21. URL:=http://wireless.kernel.org/en/users/Documentation/iw
  22. DEPENDS:= +libnl-tiny
  23. endef
  24. define Build/Configure
  25. echo "const char iw_version[] = \"$(PKG_VERSION)\";" > $(PKG_BUILD_DIR)/version.c
  26. rm -f $(PKG_BUILD_DIR)/version.sh
  27. touch $(PKG_BUILD_DIR)/version.sh
  28. chmod +x $(PKG_BUILD_DIR)/version.sh
  29. endef
  30. TARGET_CPPFLAGS:= \
  31. -I$(STAGING_DIR)/usr/include/libnl-tiny \
  32. $(TARGET_CPPFLAGS) \
  33. -DCONFIG_LIBNL20 \
  34. -D_GNU_SOURCE
  35. MAKE_FLAGS += \
  36. CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -ffunction-sections -fdata-sections" \
  37. LDFLAGS="$(TARGET_LDFLAGS) -Wl,--gc-sections" \
  38. NL1FOUND="" NL2FOUND=Y \
  39. NLLIBNAME="libnl-tiny" \
  40. LIBS="-lm -lnl-tiny" \
  41. V=1
  42. define Package/iw/install
  43. $(INSTALL_DIR) $(1)/usr/sbin
  44. $(INSTALL_BIN) $(PKG_BUILD_DIR)/iw $(1)/usr/sbin/
  45. endef
  46. $(eval $(call BuildPackage,iw))