• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
11LOCAL_PATH := $(call my-dir)
12
13########################
14include $(CLEAR_VARS)
15
16LOCAL_MODULE := wpa_supplicant.conf
17LOCAL_LICENSE_KINDS := SPDX-license-identifier-BSD SPDX-license-identifier-BSD-3-Clause SPDX-license-identifier-ISC legacy_unencumbered
18LOCAL_LICENSE_CONDITIONS := notice unencumbered
19LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../COPYING $(LOCAL_PATH)/../NOTICE
20LOCAL_MODULE_CLASS := ETC
21LOCAL_MODULE_TAGS := optional
22LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/wifi
23
24include $(BUILD_SYSTEM)/base_rules.mk
25
26WPA_SUPPLICANT_CONF_TEMPLATE := $(LOCAL_PATH)/wpa_supplicant_template.conf
27WPA_SUPPLICANT_CONF_SCRIPT := $(LOCAL_PATH)/wpa_supplicant_conf.sh
28$(LOCAL_BUILT_MODULE): PRIVATE_WIFI_DRIVER_SOCKET_IFACE := $(WIFI_DRIVER_SOCKET_IFACE)
29$(LOCAL_BUILT_MODULE): PRIVATE_WPA_SUPPLICANT_CONF_TEMPLATE := $(WPA_SUPPLICANT_CONF_TEMPLATE)
30$(LOCAL_BUILT_MODULE): PRIVATE_WPA_SUPPLICANT_CONF_SCRIPT := $(WPA_SUPPLICANT_CONF_SCRIPT)
31$(LOCAL_BUILT_MODULE) : $(WPA_SUPPLICANT_CONF_TEMPLATE) $(WPA_SUPPLICANT_CONF_SCRIPT)
32	@echo Target wpa_supplicant.conf: $@
33	@mkdir -p $(dir $@)
34	$(hide) WIFI_DRIVER_SOCKET_IFACE="$(PRIVATE_WIFI_DRIVER_SOCKET_IFACE)" \
35		bash $(PRIVATE_WPA_SUPPLICANT_CONF_SCRIPT) $(PRIVATE_WPA_SUPPLICANT_CONF_TEMPLATE) > $@
36
37########################
38