Makefile 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #
  2. # Copyright (C) 2007-2009 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:=0.9.17
  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:=427841093ac11c5cbc025a3e13aac139
  14. PKG_BUILD_DEPENDS:=mac80211
  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:=@!TARGET_avr32 @!TARGET_etrax +libnl-tiny
  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. -I$(STAGING_DIR)/usr/include/mac80211 \
  32. $(TARGET_CPPFLAGS) \
  33. -DCONFIG_LIBNL20 \
  34. -D_GNU_SOURCE
  35. MAKE_FLAGS += \
  36. CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
  37. LDFLAGS="$(TARGET_LDFLAGS)" \
  38. NL1FOUND="" NL2FOUND=Y \
  39. NLLIBNAME="libnl-tiny" \
  40. LIBS="-lm -lnl-tiny" \
  41. V=1
  42. ifneq ($(CONFIG_LINUX_2_6),)
  43. define Package/iw/install
  44. $(INSTALL_DIR) $(1)/usr/sbin
  45. $(INSTALL_BIN) $(PKG_BUILD_DIR)/iw $(1)/usr/sbin/
  46. endef
  47. endif
  48. $(eval $(call BuildPackage,iw))