Home | History | Annotate | Download | only in wpa_supplicant
      1 #
      2 # Copyright (C) 2010 The Android Open Source Project
      3 #
      4 # Licensed under the Apache License, Version 2.0 (the "License");
      5 # you may not use this file except in compliance with the License.
      6 # You may obtain a copy of the License at
      7 #
      8 #      http://www.apache.org/licenses/LICENSE-2.0
      9 #
     10 # Unless required by applicable law or agreed to in writing, software
     11 # distributed under the License is distributed on an "AS IS" BASIS,
     12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13 # See the License for the specific language governing permissions and
     14 # limitations under the License.
     15 #
     16 
     17 # Include this makefile to generate your hardware specific wpa_supplicant.conf
     18 # Requires: WIFI_DRIVER_SOCKET_IFACE
     19 
     20 LOCAL_PATH := $(call my-dir)
     21 
     22 ########################
     23 include $(CLEAR_VARS)
     24 
     25 LOCAL_MODULE := wpa_supplicant.conf
     26 LOCAL_MODULE_CLASS := ETC
     27 LOCAL_MODULE_TAGS := optional
     28 LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/wifi
     29 
     30 include $(BUILD_SYSTEM)/base_rules.mk
     31 
     32 WPA_SUPPLICANT_CONF_TEMPLATE := $(LOCAL_PATH)/wpa_supplicant.conf
     33 WPA_SUPPLICANT_CONF_SCRIPT := $(LOCAL_PATH)/wpa_supplicant_conf.sh
     34 $(LOCAL_BUILT_MODULE): PRIVATE_WIFI_DRIVER_SOCKET_IFACE := $(WIFI_DRIVER_SOCKET_IFACE)
     35 $(LOCAL_BUILT_MODULE): PRIVATE_WPA_SUPPLICANT_CONF_TEMPLATE := $(WPA_SUPPLICANT_CONF_TEMPLATE)
     36 $(LOCAL_BUILT_MODULE): PRIVATE_WPA_SUPPLICANT_CONF_SCRIPT := $(WPA_SUPPLICANT_CONF_SCRIPT)
     37 $(LOCAL_BUILT_MODULE) : $(WPA_SUPPLICANT_CONF_TEMPLATE) $(WPA_SUPPLICANT_CONF_SCRIPT)
     38 	@echo Target wpa_supplicant.conf: $@
     39 	@mkdir -p $(dir $@)
     40 	$(hide) WIFI_DRIVER_SOCKET_IFACE="$(PRIVATE_WIFI_DRIVER_SOCKET_IFACE)" \
     41 		bash $(PRIVATE_WPA_SUPPLICANT_CONF_SCRIPT) $(PRIVATE_WPA_SUPPLICANT_CONF_TEMPLATE) > $@
     42 
     43 ########################
     44