Makefile 1.3 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:=3.10
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=https://www.kernel.org/pub/software/network/iw
  13. PKG_MD5SUM:=0dc736963455937278b10fe8a2157e47
  14. PKG_MAINTAINER:=Felix Fietkau <[email protected]>
  15. include $(INCLUDE_DIR)/package.mk
  16. define Package/iw
  17. SECTION:=net
  18. CATEGORY:=Network
  19. TITLE:=cfg80211 interface configuration utility
  20. URL:=http://wireless.kernel.org/en/users/Documentation/iw
  21. DEPENDS:= +libnl-tiny @(!TARGET_avr32||BROKEN)
  22. endef
  23. define Build/Configure
  24. echo "const char iw_version[] = \"$(PKG_VERSION)\";" > $(PKG_BUILD_DIR)/version.c
  25. rm -f $(PKG_BUILD_DIR)/version.sh
  26. touch $(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)" \
  36. LDFLAGS="$(TARGET_LDFLAGS)" \
  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))