hostap.mk 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #############################################################
  2. #
  3. # hostap
  4. #
  5. #############################################################
  6. HOSTAP_SOURCE_URL=http://hostap.epitest.fi/cgi-bin/viewcvs.cgi/hostap/hostap.tar.gz?tarball=1
  7. HOSTAP_SOURCE=hostap.tar.gz
  8. HOSTAP_DIR=$(BUILD_DIR)/hostap-snapshot
  9. $(DL_DIR)/$(HOSTAP_SOURCE):
  10. $(WGET) -P $(DL_DIR) $(HOSTAP_SOURCE_URL) -O $(DL_DIR)/$(HOSTAP_SOURCE)
  11. hostap-source: $(DL_DIR)/$(HOSTAP_SOURCE)
  12. $(HOSTAP_DIR)/.unpacked: $(DL_DIR)/$(HOSTAP_SOURCE)
  13. zcat $(DL_DIR)/$(HOSTAP_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
  14. mv -f $(BUILD_DIR)/hostap $(HOSTAP_DIR)
  15. touch $(HOSTAP_DIR)/.unpacked
  16. $(HOSTAP_DIR)/.configured: $(HOSTAP_DIR)/.unpacked
  17. #$(SED) "s,/.*#define PRISM2_DOWNLOAD_SUPPORT.*/,#define PRISM2_DOWNLOAD_SUPPORT,g" \
  18. # $(HOSTAP_DIR)/driver/modules/hostap_config.h
  19. touch $(HOSTAP_DIR)/.configured
  20. $(HOSTAP_DIR)/utils/hostap_crypt_conf: $(HOSTAP_DIR)/.configured
  21. $(MAKE) -C $(HOSTAP_DIR)/utils CC=$(TARGET_CC) CFLAGS="-Os -Wall $(TARGET_CFLAGS) -I../driver/modules"
  22. $(MAKE) -C $(HOSTAP_DIR)/hostapd CC=$(TARGET_CC) CFLAGS="-Os -Wall $(TARGET_CFLAGS) -I../driver/modules -I../utils"
  23. touch -c $(HOSTAP_DIR)/driver/modules/hostap.o
  24. $(TARGET_DIR)//usr/bin/hostap_crypt_conf: $(HOSTAP_DIR)/utils/hostap_crypt_conf
  25. # Make the dir
  26. -rm -rf $(HOSTAP_TARGET_MODULE_DIR)
  27. -mkdir -p $(HOSTAP_TARGET_MODULE_DIR)
  28. # Copy the pcmcia-cs conf file
  29. -mkdir -p $(TARGET_DIR)/etc/pcmcia
  30. cp -af $(HOSTAP_DIR)/driver/etc/hostap_cs.conf $(TARGET_DIR)/etc/pcmcia/
  31. # Copy The Utils
  32. cp -af $(HOSTAP_DIR)/utils/hostap_crypt_conf $(TARGET_DIR)/usr/bin/
  33. cp -af $(HOSTAP_DIR)/utils/hostap_diag $(TARGET_DIR)/usr/bin/
  34. cp -af $(HOSTAP_DIR)/utils/prism2_param $(TARGET_DIR)/usr/bin/
  35. cp -af $(HOSTAP_DIR)/utils/prism2_srec $(TARGET_DIR)/usr/bin/
  36. # Copy hostapd
  37. cp -af $(HOSTAP_DIR)/hostapd/hostapd $(TARGET_DIR)/usr/sbin/
  38. hostap: pcmcia $(TARGET_DIR)//usr/bin/hostap_crypt_conf
  39. hostap-clean:
  40. $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(HOSTAP_DIR) uninstall
  41. -$(MAKE) -C $(HOSTAP_DIR) clean
  42. hostap-dirclean:
  43. rm -rf $(HOSTAP_DIR)
  44. #############################################################
  45. #
  46. # Toplevel Makefile options
  47. #
  48. #############################################################
  49. ifeq ($(strip $(BR2_PACKAGE_HOSTAP)),y)
  50. TARGETS+=hostap
  51. endif