Makefile 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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.3
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=http://wireless.kernel.org/download/iw/
  13. PKG_MD5SUM:=146ad14cdeb39fb88b21efdbb28787d1
  14. include $(INCLUDE_DIR)/package.mk
  15. define Package/iw
  16. SECTION:=net
  17. CATEGORY:=Network
  18. TITLE:=cfg80211 interface configuration utility
  19. URL:=http://wireless.kernel.org/en/users/Documentation/iw
  20. DEPENDS:= +libnl-tiny @(!(TARGET_avr32||TARGET_etrax)||BROKEN)
  21. endef
  22. define Build/Configure
  23. echo "const char iw_version[] = \"$(PKG_VERSION)\";" > $(PKG_BUILD_DIR)/version.c
  24. rm -f $(PKG_BUILD_DIR)/version.sh
  25. touch $(PKG_BUILD_DIR)/version.sh
  26. chmod +x $(PKG_BUILD_DIR)/version.sh
  27. endef
  28. TARGET_CPPFLAGS:= \
  29. -I$(STAGING_DIR)/usr/include/libnl-tiny \
  30. $(TARGET_CPPFLAGS) \
  31. -DCONFIG_LIBNL20 \
  32. -D_GNU_SOURCE
  33. MAKE_FLAGS += \
  34. CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
  35. LDFLAGS="$(TARGET_LDFLAGS)" \
  36. NL1FOUND="" NL2FOUND=Y \
  37. NLLIBNAME="libnl-tiny" \
  38. LIBS="-lm -lnl-tiny" \
  39. V=1
  40. define Package/iw/install
  41. $(INSTALL_DIR) $(1)/usr/sbin
  42. $(INSTALL_BIN) $(PKG_BUILD_DIR)/iw $(1)/usr/sbin/
  43. endef
  44. $(eval $(call BuildPackage,iw))