hostap.mk 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #############################################################
  2. #
  3. # hostap
  4. #
  5. # Note! Host AP driver was added into the main kernel tree in Linux v2.6.14.
  6. # The version in the kernel tree should be used instead of this external
  7. # hostap-driver package.
  8. # The external releases are only for older kernel versions and all
  9. # the future development will be in the main kernel tree.
  10. #
  11. #############################################################
  12. HOSTAP_VERSION=0.4.9
  13. HOSTAP_SOURCE=hostap-driver-$(HOSTAP_VERSION).tar.gz
  14. HOSTAP_SITE=http://hostap.epitest.fi/releases
  15. HOSTAP_DIR=$(BUILD_DIR)/hostapd-$(HOSTAP_VERSION)
  16. $(DL_DIR)/$(HOSTAP_SOURCE):
  17. $(call DOWNLOAD,$(HOSTAP_SITE),$(HOSTAP_SOURCE))
  18. hostap-source: $(DL_DIR)/$(HOSTAP_SOURCE)
  19. $(HOSTAP_DIR)/.unpacked: $(DL_DIR)/$(HOSTAP_SOURCE)
  20. $(ZCAT) $(DL_DIR)/$(HOSTAP_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
  21. mv -f $(BUILD_DIR)/hostap $(HOSTAP_DIR)
  22. touch $@
  23. $(HOSTAP_DIR)/.configured: $(HOSTAP_DIR)/.unpacked
  24. #$(SED) "s,/.*#define PRISM2_DOWNLOAD_SUPPORT.*/,#define PRISM2_DOWNLOAD_SUPPORT,g" \
  25. # $(HOSTAP_DIR)/driver/modules/hostap_config.h
  26. touch $@
  27. $(HOSTAP_DIR)/utils/hostap_crypt_conf: $(HOSTAP_DIR)/.configured
  28. $(MAKE) -C $(HOSTAP_DIR)/utils \
  29. CC=$(TARGET_CC) \
  30. CFLAGS="-Os -Wall $(TARGET_CFLAGS) -I../driver/modules"
  31. $(MAKE) -C $(HOSTAP_DIR)/hostapd \
  32. CC=$(TARGET_CC) \
  33. CFLAGS="-Os -Wall $(TARGET_CFLAGS) -I../driver/modules -I../utils"
  34. touch -c $(HOSTAP_DIR)/driver/modules/hostap.o
  35. $(TARGET_DIR)//usr/bin/hostap_crypt_conf: $(HOSTAP_DIR)/utils/hostap_crypt_conf
  36. # Make the dir
  37. rm -rf $(HOSTAP_TARGET_MODULE_DIR)
  38. mkdir -p $(HOSTAP_TARGET_MODULE_DIR)
  39. # Copy the pcmcia-cs conf file
  40. mkdir -p $(TARGET_DIR)/etc/pcmcia
  41. cp -af $(HOSTAP_DIR)/driver/etc/hostap_cs.conf $(TARGET_DIR)/etc/pcmcia/
  42. # Copy The Utils
  43. cp -af $(HOSTAP_DIR)/utils/hostap_crypt_conf $(TARGET_DIR)/usr/bin/
  44. cp -af $(HOSTAP_DIR)/utils/hostap_diag $(TARGET_DIR)/usr/bin/
  45. cp -af $(HOSTAP_DIR)/utils/prism2_param $(TARGET_DIR)/usr/bin/
  46. cp -af $(HOSTAP_DIR)/utils/prism2_srec $(TARGET_DIR)/usr/bin/
  47. # Copy hostapd
  48. cp -af $(HOSTAP_DIR)/hostapd/hostapd $(TARGET_DIR)/usr/sbin/
  49. hostap: pcmcia $(TARGET_DIR)//usr/bin/hostap_crypt_conf
  50. hostap-clean:
  51. $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(HOSTAP_DIR) uninstall
  52. -$(MAKE) -C $(HOSTAP_DIR) clean
  53. hostap-dirclean:
  54. rm -rf $(HOSTAP_DIR)
  55. #############################################################
  56. #
  57. # Toplevel Makefile options
  58. #
  59. #############################################################
  60. ifeq ($(BR2_PACKAGE_HOSTAP),y)
  61. TARGETS+=hostap
  62. endif