wireless_tools.mk 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. ################################################################################
  2. #
  3. # wireless_tools
  4. #
  5. ################################################################################
  6. WIRELESS_TOOLS_VERSION_MAJOR = 30
  7. WIRELESS_TOOLS_VERSION = $(WIRELESS_TOOLS_VERSION_MAJOR).pre9
  8. WIRELESS_TOOLS_SITE = https://hewlettpackard.github.io/wireless-tools
  9. WIRELESS_TOOLS_SOURCE = wireless_tools.$(WIRELESS_TOOLS_VERSION).tar.gz
  10. WIRELESS_TOOLS_LICENSE = GPL-2.0
  11. WIRELESS_TOOLS_LICENSE_FILES = COPYING
  12. WIRELESS_TOOLS_CPE_ID_VERSION = $(WIRELESS_TOOLS_VERSION_MAJOR)
  13. WIRELESS_TOOLS_CPE_ID_UPDATE = pre9
  14. WIRELESS_TOOLS_INSTALL_STAGING = YES
  15. ifeq ($(BR2_PACKAGE_WIRELESS_TOOLS_IWCONFIG),y)
  16. WIRELESS_TOOLS_BUILD_TARGETS = iwmulticall
  17. WIRELESS_TOOLS_INSTALL_TARGETS = install-iwmulticall
  18. endif
  19. ifeq ($(BR2_PACKAGE_WIRELESS_TOOLS_IFRENAME),y)
  20. WIRELESS_TOOLS_BUILD_TARGETS += ifrename
  21. endif
  22. ifeq ($(BR2_PACKAGE_WIRELESS_TOOLS_LIB),y)
  23. WIRELESS_TOOLS_BUILD_TARGETS += libiw.so.$(WIRELESS_TOOLS_VERSION_MAJOR)
  24. WIRELESS_TOOLS_INSTALL_TARGETS += install-dynamic
  25. define WIRELESS_TOOLS_INSTALL_STAGING_CMDS
  26. $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) PREFIX="$(STAGING_DIR)" LDCONFIG=/bin/true \
  27. install-dynamic
  28. $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) PREFIX="$(STAGING_DIR)/usr" install-hdr
  29. endef
  30. endif
  31. define WIRELESS_TOOLS_BUILD_CMDS
  32. $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \
  33. $(WIRELESS_TOOLS_BUILD_TARGETS)
  34. endef
  35. define WIRELESS_TOOLS_INSTALL_TARGET_CMDS
  36. $(if $(WIRELESS_TOOLS_INSTALL_TARGETS),
  37. $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) PREFIX="$(TARGET_DIR)" \
  38. LDCONFIG=/bin/true $(WIRELESS_TOOLS_INSTALL_TARGETS))
  39. $(if $(BR2_PACKAGE_WIRELESS_TOOLS_IFRENAME),
  40. $(INSTALL) -D -m 755 $(@D)/ifrename $(TARGET_DIR)/sbin/ifrename)
  41. endef
  42. $(eval $(generic-package))