Makefile 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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.9
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@KERNEL/software/network/iw
  13. PKG_HASH:=324cc805fad52cba2c16b9ab569906889fb645cc962aac4cfda1db85d2de97ce
  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. echo "#!/bin/sh" > $(PKG_BUILD_DIR)/version.sh
  27. chmod +x $(PKG_BUILD_DIR)/version.sh
  28. endef
  29. TARGET_CPPFLAGS:= \
  30. -I$(STAGING_DIR)/usr/include/libnl-tiny \
  31. $(TARGET_CPPFLAGS) \
  32. -DCONFIG_LIBNL20 \
  33. -D_GNU_SOURCE
  34. MAKE_FLAGS += \
  35. CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -ffunction-sections -fdata-sections" \
  36. LDFLAGS="$(TARGET_LDFLAGS) -Wl,--gc-sections" \
  37. NL1FOUND="" NL2FOUND=Y \
  38. NLLIBNAME="libnl-tiny" \
  39. LIBS="-lm -lnl-tiny" \
  40. V=1
  41. define Package/iw/install
  42. $(INSTALL_DIR) $(1)/usr/sbin
  43. $(INSTALL_BIN) $(PKG_BUILD_DIR)/iw $(1)/usr/sbin/
  44. endef
  45. $(eval $(call BuildPackage,iw))