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 8 # Include this makefile to generate your hardware specific wpa_supplicant.conf 9 # Requires: WIFI_DRIVER_SOCKET_IFACE 10 11 LOCAL_PATH := $(call my-dir) 12 13 ######################## 14 include $(CLEAR_VARS) 15 16 LOCAL_MODULE := wpa_supplicant.conf 17 LOCAL_MODULE_CLASS := ETC 18 LOCAL_MODULE_TAGS := optional 19 LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/wifi 20 21 include $(BUILD_SYSTEM)/base_rules.mk 22 23 WPA_SUPPLICANT_CONF_TEMPLATE := $(LOCAL_PATH)/wpa_supplicant_template.conf 24 WPA_SUPPLICANT_CONF_SCRIPT := $(LOCAL_PATH)/wpa_supplicant_conf.sh 25 $(LOCAL_BUILT_MODULE): PRIVATE_WIFI_DRIVER_SOCKET_IFACE := $(WIFI_DRIVER_SOCKET_IFACE) 26 $(LOCAL_BUILT_MODULE): PRIVATE_WPA_SUPPLICANT_CONF_TEMPLATE := $(WPA_SUPPLICANT_CONF_TEMPLATE) 27 $(LOCAL_BUILT_MODULE): PRIVATE_WPA_SUPPLICANT_CONF_SCRIPT := $(WPA_SUPPLICANT_CONF_SCRIPT) 28 $(LOCAL_BUILT_MODULE) : $(WPA_SUPPLICANT_CONF_TEMPLATE) $(WPA_SUPPLICANT_CONF_SCRIPT) 29 @echo Target wpa_supplicant.conf: $@ 30 @mkdir -p $(dir $@) 31 $(hide) WIFI_DRIVER_SOCKET_IFACE="$(PRIVATE_WIFI_DRIVER_SOCKET_IFACE)" \ 32 bash $(PRIVATE_WPA_SUPPLICANT_CONF_SCRIPT) $(PRIVATE_WPA_SUPPLICANT_CONF_TEMPLATE) > $@ 33 34 ######################## 35