wpa_supplicant_conf.mk 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. #
  2. # Copyright (C) 2010 The Android Open Source Project
  3. #
  4. # This software may be distributed under the terms of the BSD license.
  5. # See README for more details.
  6. #
  7. # Include this makefile to generate your hardware specific wpa_supplicant.conf
  8. # Requires: WIFI_DRIVER_SOCKET_IFACE
  9. LOCAL_PATH := $(call my-dir)
  10. ########################
  11. include $(CLEAR_VARS)
  12. LOCAL_MODULE := wpa_supplicant.conf
  13. LOCAL_MODULE_CLASS := ETC
  14. LOCAL_MODULE_TAGS := optional
  15. LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/wifi
  16. include $(BUILD_SYSTEM)/base_rules.mk
  17. WPA_SUPPLICANT_CONF_TEMPLATE := $(LOCAL_PATH)/wpa_supplicant_template.conf
  18. WPA_SUPPLICANT_CONF_SCRIPT := $(LOCAL_PATH)/wpa_supplicant_conf.sh
  19. $(LOCAL_BUILT_MODULE): PRIVATE_WIFI_DRIVER_SOCKET_IFACE := $(WIFI_DRIVER_SOCKET_IFACE)
  20. $(LOCAL_BUILT_MODULE): PRIVATE_WPA_SUPPLICANT_CONF_TEMPLATE := $(WPA_SUPPLICANT_CONF_TEMPLATE)
  21. $(LOCAL_BUILT_MODULE): PRIVATE_WPA_SUPPLICANT_CONF_SCRIPT := $(WPA_SUPPLICANT_CONF_SCRIPT)
  22. $(LOCAL_BUILT_MODULE) : $(WPA_SUPPLICANT_CONF_TEMPLATE) $(WPA_SUPPLICANT_CONF_SCRIPT)
  23. @echo Target wpa_supplicant.conf: $@
  24. @mkdir -p $(dir $@)
  25. $(hide) WIFI_DRIVER_SOCKET_IFACE="$(PRIVATE_WIFI_DRIVER_SOCKET_IFACE)" \
  26. bash $(PRIVATE_WPA_SUPPLICANT_CONF_SCRIPT) $(PRIVATE_WPA_SUPPLICANT_CONF_TEMPLATE) > $@
  27. ########################