xref: /freebsd/contrib/wpa/wpa_supplicant/Android.mk (revision a90b9d0159070121c221b966469c3e36d912bf82)
1780fb4a2SCy Schubert#
2780fb4a2SCy Schubert# Copyright (C) 2008 The Android Open Source Project
3780fb4a2SCy Schubert#
4780fb4a2SCy Schubert# This software may be distributed under the terms of the BSD license.
5780fb4a2SCy Schubert# See README for more details.
6780fb4a2SCy Schubert#
7780fb4a2SCy Schubert
8780fb4a2SCy SchubertLOCAL_PATH := $(call my-dir)
9780fb4a2SCy SchubertPKG_CONFIG ?= pkg-config
10780fb4a2SCy Schubert
11780fb4a2SCy Schubertifneq ($(BOARD_WPA_SUPPLICANT_DRIVER),)
12780fb4a2SCy Schubert  CONFIG_DRIVER_$(BOARD_WPA_SUPPLICANT_DRIVER) := y
13780fb4a2SCy Schubertendif
14780fb4a2SCy Schubert
15780fb4a2SCy Schubertinclude $(LOCAL_PATH)/android.config
16780fb4a2SCy Schubert
17780fb4a2SCy Schubert# To ignore possible wrong network configurations
18780fb4a2SCy SchubertL_CFLAGS = -DWPA_IGNORE_CONFIG_ERRORS
19780fb4a2SCy Schubert
20780fb4a2SCy SchubertL_CFLAGS += -DVERSION_STR_POSTFIX=\"-$(PLATFORM_VERSION)\"
21780fb4a2SCy Schubert
22780fb4a2SCy Schubert# Set Android log name
23780fb4a2SCy SchubertL_CFLAGS += -DANDROID_LOG_NAME=\"wpa_supplicant\"
24780fb4a2SCy Schubert
25780fb4a2SCy Schubert# Disable unused parameter warnings
26780fb4a2SCy SchubertL_CFLAGS += -Wno-unused-parameter
27780fb4a2SCy Schubert
28780fb4a2SCy Schubert# Set Android extended P2P functionality
29780fb4a2SCy SchubertL_CFLAGS += -DANDROID_P2P
30780fb4a2SCy Schubert
31780fb4a2SCy Schubertifeq ($(BOARD_WPA_SUPPLICANT_PRIVATE_LIB),)
32780fb4a2SCy SchubertL_CFLAGS += -DANDROID_LIB_STUB
33780fb4a2SCy Schubertendif
34780fb4a2SCy Schubert
35c1d255d3SCy Schubertifneq ($(BOARD_WPA_SUPPLICANT_PRIVATE_LIB_EVENT),)
36c1d255d3SCy SchubertL_CFLAGS += -DANDROID_LIB_EVENT
37c1d255d3SCy Schubertendif
38c1d255d3SCy Schubert
39780fb4a2SCy Schubert# Disable roaming in wpa_supplicant
40780fb4a2SCy Schubertifdef CONFIG_NO_ROAMING
41780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_NO_ROAMING
42780fb4a2SCy Schubertendif
43780fb4a2SCy Schubert
44780fb4a2SCy Schubert# Use Android specific directory for control interface sockets
45780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_CTRL_IFACE_CLIENT_DIR=\"/data/misc/wifi/sockets\"
46780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_CTRL_IFACE_DIR=\"/data/misc/wifi/sockets\"
47780fb4a2SCy Schubert
48780fb4a2SCy Schubert# Use Android specific directory for wpa_cli command completion history
49780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_WPA_CLI_HISTORY_DIR=\"/data/misc/wifi\"
50780fb4a2SCy Schubert
51780fb4a2SCy Schubert# To force sizeof(enum) = 4
52780fb4a2SCy Schubertifeq ($(TARGET_ARCH),arm)
53780fb4a2SCy SchubertL_CFLAGS += -mabi=aapcs-linux
54780fb4a2SCy Schubertendif
55780fb4a2SCy Schubert
56780fb4a2SCy Schubert# C++ flags for binder interface
57780fb4a2SCy SchubertL_CPPFLAGS := -std=c++11 -Wall -Werror
58780fb4a2SCy Schubert# TODO: Remove these allowed warnings later.
59780fb4a2SCy SchubertL_CPPFLAGS += -Wno-unused-variable -Wno-unused-parameter
60780fb4a2SCy SchubertL_CPPFLAGS += -Wno-unused-private-field
61780fb4a2SCy Schubert
62780fb4a2SCy SchubertINCLUDES = $(LOCAL_PATH)
63780fb4a2SCy SchubertINCLUDES += $(LOCAL_PATH)/src
64780fb4a2SCy SchubertINCLUDES += $(LOCAL_PATH)/src/common
65780fb4a2SCy Schubert# INCLUDES += $(LOCAL_PATH)/src/crypto # To force proper includes
66780fb4a2SCy SchubertINCLUDES += $(LOCAL_PATH)/src/drivers
67780fb4a2SCy SchubertINCLUDES += $(LOCAL_PATH)/src/eap_common
68780fb4a2SCy SchubertINCLUDES += $(LOCAL_PATH)/src/eapol_supp
69780fb4a2SCy SchubertINCLUDES += $(LOCAL_PATH)/src/eap_peer
70780fb4a2SCy SchubertINCLUDES += $(LOCAL_PATH)/src/eap_server
71780fb4a2SCy SchubertINCLUDES += $(LOCAL_PATH)/src/hlr_auc_gw
72780fb4a2SCy SchubertINCLUDES += $(LOCAL_PATH)/src/l2_packet
73780fb4a2SCy SchubertINCLUDES += $(LOCAL_PATH)/src/radius
74780fb4a2SCy SchubertINCLUDES += $(LOCAL_PATH)/src/rsn_supp
75780fb4a2SCy SchubertINCLUDES += $(LOCAL_PATH)/src/tls
76780fb4a2SCy SchubertINCLUDES += $(LOCAL_PATH)/src/utils
77780fb4a2SCy SchubertINCLUDES += $(LOCAL_PATH)/src/wps
78*a90b9d01SCy SchubertINCLUDES += $(LOCAL_PATH)/src/pasn
79780fb4a2SCy SchubertINCLUDES += system/security/keystore/include
80780fb4a2SCy Schubertifdef CONFIG_DRIVER_NL80211
81780fb4a2SCy Schubertifneq ($(wildcard external/libnl),)
82780fb4a2SCy SchubertINCLUDES += external/libnl/include
83780fb4a2SCy Schubertelse
84780fb4a2SCy SchubertINCLUDES += external/libnl-headers
85780fb4a2SCy Schubertendif
86780fb4a2SCy Schubertendif
87780fb4a2SCy Schubert
88780fb4a2SCy Schubertifdef CONFIG_FIPS
89780fb4a2SCy SchubertCONFIG_NO_RANDOM_POOL=
90780fb4a2SCy Schubertendif
91780fb4a2SCy Schubert
92780fb4a2SCy SchubertOBJS = config.c
93780fb4a2SCy SchubertOBJS += notify.c
94780fb4a2SCy SchubertOBJS += bss.c
95780fb4a2SCy SchubertOBJS += eap_register.c
96780fb4a2SCy SchubertOBJS += src/utils/common.c
97c1d255d3SCy SchubertOBJS += src/utils/config.c
98780fb4a2SCy SchubertOBJS += src/utils/wpa_debug.c
99780fb4a2SCy SchubertOBJS += src/utils/wpabuf.c
10085732ac8SCy SchubertOBJS += src/utils/bitfield.c
101c1d255d3SCy SchubertOBJS += src/utils/ip_addr.c
102c1d255d3SCy SchubertOBJS += src/utils/crc32.c
103*a90b9d01SCy SchubertOBJS += src/common/ptksa_cache.c
104*a90b9d01SCy SchubertOBJS += src/rsn_supp/pmksa_cache.c
105c1d255d3SCy SchubertOBJS += twt.c
106780fb4a2SCy SchubertOBJS_p = wpa_passphrase.c
107780fb4a2SCy SchubertOBJS_p += src/utils/common.c
108780fb4a2SCy SchubertOBJS_p += src/utils/wpa_debug.c
109780fb4a2SCy SchubertOBJS_p += src/utils/wpabuf.c
110780fb4a2SCy SchubertOBJS_c = wpa_cli.c src/common/wpa_ctrl.c
111780fb4a2SCy SchubertOBJS_c += src/utils/wpa_debug.c
112780fb4a2SCy SchubertOBJS_c += src/utils/common.c
113780fb4a2SCy SchubertOBJS_c += src/common/cli.c
114780fb4a2SCy SchubertOBJS_d =
115780fb4a2SCy SchubertOBJS_priv =
116780fb4a2SCy Schubert
117780fb4a2SCy Schubertifndef CONFIG_OS
118780fb4a2SCy Schubertifdef CONFIG_NATIVE_WINDOWS
119780fb4a2SCy SchubertCONFIG_OS=win32
120780fb4a2SCy Schubertelse
121780fb4a2SCy SchubertCONFIG_OS=unix
122780fb4a2SCy Schubertendif
123780fb4a2SCy Schubertendif
124780fb4a2SCy Schubert
125780fb4a2SCy Schubertifeq ($(CONFIG_OS), internal)
126780fb4a2SCy SchubertL_CFLAGS += -DOS_NO_C_LIB_DEFINES
127780fb4a2SCy Schubertendif
128780fb4a2SCy Schubert
129780fb4a2SCy SchubertOBJS += src/utils/os_$(CONFIG_OS).c
130780fb4a2SCy SchubertOBJS_p += src/utils/os_$(CONFIG_OS).c
131780fb4a2SCy SchubertOBJS_c += src/utils/os_$(CONFIG_OS).c
132780fb4a2SCy Schubert
133780fb4a2SCy Schubertifdef CONFIG_WPA_TRACE
134780fb4a2SCy SchubertL_CFLAGS += -DWPA_TRACE
135780fb4a2SCy SchubertOBJS += src/utils/trace.c
136780fb4a2SCy SchubertOBJS_p += src/utils/trace.c
137780fb4a2SCy SchubertOBJS_c += src/utils/trace.c
138780fb4a2SCy SchubertLDFLAGS += -rdynamic
139780fb4a2SCy SchubertL_CFLAGS += -funwind-tables
140780fb4a2SCy Schubertifdef CONFIG_WPA_TRACE_BFD
141780fb4a2SCy SchubertL_CFLAGS += -DWPA_TRACE_BFD
142780fb4a2SCy SchubertLIBS += -lbfd
143780fb4a2SCy SchubertLIBS_p += -lbfd
144780fb4a2SCy SchubertLIBS_c += -lbfd
145780fb4a2SCy Schubertendif
146780fb4a2SCy Schubertendif
147780fb4a2SCy Schubert
148780fb4a2SCy Schubertifndef CONFIG_ELOOP
149780fb4a2SCy SchubertCONFIG_ELOOP=eloop
150780fb4a2SCy Schubertendif
151780fb4a2SCy SchubertOBJS += src/utils/$(CONFIG_ELOOP).c
152780fb4a2SCy SchubertOBJS_c += src/utils/$(CONFIG_ELOOP).c
153780fb4a2SCy Schubert
154780fb4a2SCy Schubertifdef CONFIG_ELOOP_POLL
155780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_ELOOP_POLL
156780fb4a2SCy Schubertendif
157780fb4a2SCy Schubert
158780fb4a2SCy Schubertifdef CONFIG_ELOOP_EPOLL
159780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_ELOOP_EPOLL
160780fb4a2SCy Schubertendif
161780fb4a2SCy Schubert
162780fb4a2SCy Schubertifdef CONFIG_EAPOL_TEST
163780fb4a2SCy SchubertL_CFLAGS += -Werror -DEAPOL_TEST
164780fb4a2SCy Schubertendif
165780fb4a2SCy Schubert
166780fb4a2SCy Schubertifdef CONFIG_HT_OVERRIDES
167780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_HT_OVERRIDES
168780fb4a2SCy Schubertendif
169780fb4a2SCy Schubert
170780fb4a2SCy Schubertifdef CONFIG_VHT_OVERRIDES
171780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_VHT_OVERRIDES
172780fb4a2SCy Schubertendif
173780fb4a2SCy Schubert
174c1d255d3SCy Schubertifdef CONFIG_HE_OVERRIDES
175c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_HE_OVERRIDES
176c1d255d3SCy Schubertendif
177c1d255d3SCy Schubert
178780fb4a2SCy Schubertifndef CONFIG_BACKEND
179780fb4a2SCy SchubertCONFIG_BACKEND=file
180780fb4a2SCy Schubertendif
181780fb4a2SCy Schubert
182780fb4a2SCy Schubertifeq ($(CONFIG_BACKEND), file)
183780fb4a2SCy SchubertOBJS += config_file.c
184780fb4a2SCy Schubertifndef CONFIG_NO_CONFIG_BLOBS
185780fb4a2SCy SchubertNEED_BASE64=y
186780fb4a2SCy Schubertendif
187780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_BACKEND_FILE
188780fb4a2SCy Schubertendif
189780fb4a2SCy Schubert
190780fb4a2SCy Schubertifeq ($(CONFIG_BACKEND), winreg)
191780fb4a2SCy SchubertOBJS += config_winreg.c
192780fb4a2SCy Schubertendif
193780fb4a2SCy Schubert
194780fb4a2SCy Schubertifeq ($(CONFIG_BACKEND), none)
195780fb4a2SCy SchubertOBJS += config_none.c
196780fb4a2SCy Schubertendif
197780fb4a2SCy Schubert
198780fb4a2SCy Schubertifdef CONFIG_NO_CONFIG_WRITE
199780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_NO_CONFIG_WRITE
200780fb4a2SCy Schubertendif
201780fb4a2SCy Schubert
202780fb4a2SCy Schubertifdef CONFIG_NO_CONFIG_BLOBS
203780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_NO_CONFIG_BLOBS
204780fb4a2SCy Schubertendif
205780fb4a2SCy Schubert
206780fb4a2SCy Schubertifdef CONFIG_NO_SCAN_PROCESSING
207780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_NO_SCAN_PROCESSING
208780fb4a2SCy Schubertendif
209780fb4a2SCy Schubert
210780fb4a2SCy Schubertifdef CONFIG_SUITEB
211780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_SUITEB
212780fb4a2SCy Schubertendif
213780fb4a2SCy Schubert
214780fb4a2SCy Schubertifdef CONFIG_SUITEB192
215780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_SUITEB192
216780fb4a2SCy SchubertNEED_SHA384=y
217780fb4a2SCy Schubertendif
218780fb4a2SCy Schubert
2194bc52338SCy Schubertifdef CONFIG_OCV
2204bc52338SCy SchubertL_CFLAGS += -DCONFIG_OCV
2214bc52338SCy SchubertOBJS += src/common/ocv.c
222780fb4a2SCy Schubertendif
223780fb4a2SCy Schubert
224780fb4a2SCy Schubertifdef CONFIG_IEEE80211R
225780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_IEEE80211R
226780fb4a2SCy SchubertOBJS += src/rsn_supp/wpa_ft.c
227780fb4a2SCy Schubertendif
228780fb4a2SCy Schubert
229780fb4a2SCy Schubertifdef CONFIG_MESH
230780fb4a2SCy SchubertNEED_80211_COMMON=y
231780fb4a2SCy SchubertNEED_AES_SIV=y
232780fb4a2SCy SchubertCONFIG_SAE=y
233780fb4a2SCy SchubertCONFIG_AP=y
234780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_MESH
235780fb4a2SCy SchubertOBJS += mesh.c
236780fb4a2SCy SchubertOBJS += mesh_mpm.c
237780fb4a2SCy SchubertOBJS += mesh_rsn.c
238780fb4a2SCy Schubertendif
239780fb4a2SCy Schubert
240780fb4a2SCy Schubertifdef CONFIG_SAE
241780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_SAE
242780fb4a2SCy SchubertOBJS += src/common/sae.c
243c1d255d3SCy Schubertifdef CONFIG_SAE_PK
244c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_SAE_PK
245*a90b9d01SCy SchubertNEED_AES_SIV=y
246c1d255d3SCy SchubertOBJS += src/common/sae_pk.c
247c1d255d3SCy Schubertendif
248780fb4a2SCy SchubertNEED_ECC=y
249780fb4a2SCy SchubertNEED_DH_GROUPS=y
250c1d255d3SCy SchubertNEED_HMAC_SHA256_KDF=y
251206b73d0SCy SchubertNEED_DRAGONFLY=y
252c1d255d3SCy Schubertifdef CONFIG_TESTING_OPTIONS
253c1d255d3SCy SchubertNEED_DH_GROUPS_ALL=y
254c1d255d3SCy Schubertendif
255780fb4a2SCy Schubertendif
256780fb4a2SCy Schubert
25785732ac8SCy Schubertifdef CONFIG_DPP
25885732ac8SCy SchubertL_CFLAGS += -DCONFIG_DPP
25985732ac8SCy SchubertOBJS += src/common/dpp.c
260c1d255d3SCy SchubertOBJS += src/common/dpp_auth.c
261c1d255d3SCy SchubertOBJS += src/common/dpp_backup.c
262c1d255d3SCy SchubertOBJS += src/common/dpp_crypto.c
263c1d255d3SCy SchubertOBJS += src/common/dpp_pkex.c
264c1d255d3SCy SchubertOBJS += src/common/dpp_reconfig.c
265c1d255d3SCy SchubertOBJS += src/common/dpp_tcp.c
26685732ac8SCy SchubertOBJS += dpp_supplicant.c
26785732ac8SCy SchubertNEED_AES_SIV=y
26885732ac8SCy SchubertNEED_HMAC_SHA256_KDF=y
26985732ac8SCy SchubertNEED_HMAC_SHA384_KDF=y
27085732ac8SCy SchubertNEED_HMAC_SHA512_KDF=y
27185732ac8SCy SchubertNEED_SHA384=y
27285732ac8SCy SchubertNEED_SHA512=y
273c1d255d3SCy SchubertNEED_ECC=y
27485732ac8SCy SchubertNEED_JSON=y
27585732ac8SCy SchubertNEED_GAS_SERVER=y
27685732ac8SCy SchubertNEED_BASE64=y
277c1d255d3SCy SchubertNEED_ASN1=y
2784bc52338SCy Schubertifdef CONFIG_DPP2
2794bc52338SCy SchubertL_CFLAGS += -DCONFIG_DPP2
2804bc52338SCy Schubertendif
28132a95656SCy Schubertifdef CONFIG_DPP3
28232a95656SCy SchubertL_CFLAGS += -DCONFIG_DPP3
28332a95656SCy Schubertendif
28485732ac8SCy Schubertendif
28585732ac8SCy Schubert
286*a90b9d01SCy Schubertifdef CONFIG_NAN_USD
287*a90b9d01SCy SchubertOBJS += src/common/nan_de.c
288*a90b9d01SCy SchubertOBJS += nan_usd.c
289*a90b9d01SCy SchubertL_CFLAGS += -DCONFIG_NAN_USD
290*a90b9d01SCy Schubertendif
291*a90b9d01SCy Schubert
29285732ac8SCy Schubertifdef CONFIG_OWE
29385732ac8SCy SchubertL_CFLAGS += -DCONFIG_OWE
29485732ac8SCy SchubertNEED_ECC=y
29585732ac8SCy SchubertNEED_HMAC_SHA256_KDF=y
29685732ac8SCy SchubertNEED_HMAC_SHA384_KDF=y
29785732ac8SCy SchubertNEED_HMAC_SHA512_KDF=y
29885732ac8SCy SchubertNEED_SHA384=y
29985732ac8SCy SchubertNEED_SHA512=y
30085732ac8SCy Schubertendif
30185732ac8SCy Schubert
30285732ac8SCy Schubertifdef CONFIG_FILS
30385732ac8SCy SchubertL_CFLAGS += -DCONFIG_FILS
30485732ac8SCy SchubertNEED_SHA384=y
30585732ac8SCy SchubertNEED_AES_SIV=y
30685732ac8SCy Schubertifdef CONFIG_FILS_SK_PFS
30785732ac8SCy SchubertL_CFLAGS += -DCONFIG_FILS_SK_PFS
30885732ac8SCy SchubertNEED_ECC=y
30985732ac8SCy Schubertendif
31085732ac8SCy Schubertendif
31185732ac8SCy Schubert
31285732ac8SCy Schubertifdef CONFIG_MBO
31385732ac8SCy SchubertCONFIG_WNM=y
31485732ac8SCy Schubertendif
31585732ac8SCy Schubert
316*a90b9d01SCy Schubertifdef CONFIG_BGSCAN_SIMPLE
317*a90b9d01SCy SchubertCONFIG_WNM=y
318*a90b9d01SCy Schubertendif
319*a90b9d01SCy Schubert
320780fb4a2SCy Schubertifdef CONFIG_WNM
321780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_WNM
322780fb4a2SCy SchubertOBJS += wnm_sta.c
323780fb4a2SCy Schubertendif
324780fb4a2SCy Schubert
325780fb4a2SCy Schubertifdef CONFIG_TDLS
326780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_TDLS
327780fb4a2SCy SchubertOBJS += src/rsn_supp/tdls.c
328780fb4a2SCy Schubertendif
329780fb4a2SCy Schubert
330780fb4a2SCy Schubertifdef CONFIG_TDLS_TESTING
331780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_TDLS_TESTING
332780fb4a2SCy Schubertendif
333780fb4a2SCy Schubert
33485732ac8SCy Schubertifdef CONFIG_PMKSA_CACHE_EXTERNAL
33585732ac8SCy SchubertL_CFLAGS += -DCONFIG_PMKSA_CACHE_EXTERNAL
336780fb4a2SCy Schubertendif
337780fb4a2SCy Schubert
338780fb4a2SCy Schubertifndef CONFIG_NO_WPA
339780fb4a2SCy SchubertOBJS += src/rsn_supp/wpa.c
340780fb4a2SCy SchubertOBJS += src/rsn_supp/preauth.c
341780fb4a2SCy SchubertOBJS += src/rsn_supp/wpa_ie.c
342780fb4a2SCy SchubertOBJS += src/common/wpa_common.c
343780fb4a2SCy SchubertNEED_AES=y
344780fb4a2SCy SchubertNEED_SHA1=y
345780fb4a2SCy SchubertNEED_MD5=y
346780fb4a2SCy SchubertNEED_RC4=y
347780fb4a2SCy Schubertelse
348780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_NO_WPA
349780fb4a2SCy Schubertendif
350780fb4a2SCy Schubert
351780fb4a2SCy Schubertifdef CONFIG_IBSS_RSN
352780fb4a2SCy SchubertNEED_RSN_AUTHENTICATOR=y
353780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_IBSS_RSN
354780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_NO_VLAN
355780fb4a2SCy SchubertOBJS += ibss_rsn.c
356780fb4a2SCy Schubertendif
357780fb4a2SCy Schubert
358780fb4a2SCy Schubertifdef CONFIG_P2P
359780fb4a2SCy SchubertOBJS += p2p_supplicant.c
360780fb4a2SCy SchubertOBJS += p2p_supplicant_sd.c
361780fb4a2SCy SchubertOBJS += src/p2p/p2p.c
362780fb4a2SCy SchubertOBJS += src/p2p/p2p_utils.c
363780fb4a2SCy SchubertOBJS += src/p2p/p2p_parse.c
364780fb4a2SCy SchubertOBJS += src/p2p/p2p_build.c
365780fb4a2SCy SchubertOBJS += src/p2p/p2p_go_neg.c
366780fb4a2SCy SchubertOBJS += src/p2p/p2p_sd.c
367780fb4a2SCy SchubertOBJS += src/p2p/p2p_pd.c
368780fb4a2SCy SchubertOBJS += src/p2p/p2p_invitation.c
369780fb4a2SCy SchubertOBJS += src/p2p/p2p_dev_disc.c
370780fb4a2SCy SchubertOBJS += src/p2p/p2p_group.c
371780fb4a2SCy SchubertOBJS += src/ap/p2p_hostapd.c
372780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_P2P
373780fb4a2SCy SchubertNEED_GAS=y
374780fb4a2SCy SchubertNEED_OFFCHANNEL=y
375780fb4a2SCy SchubertCONFIG_WPS=y
376780fb4a2SCy SchubertCONFIG_AP=y
377780fb4a2SCy Schubertifdef CONFIG_P2P_STRICT
378780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_P2P_STRICT
379780fb4a2SCy Schubertendif
380780fb4a2SCy Schubertifdef CONFIG_WIFI_DISPLAY
381780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_WIFI_DISPLAY
382780fb4a2SCy SchubertOBJS += wifi_display.c
383780fb4a2SCy Schubertendif
3844b72b91aSCy Schubertendif
385780fb4a2SCy Schubert
386c1d255d3SCy Schubertifdef CONFIG_PASN
387c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_PASN
388c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_PTKSA_CACHE
389c1d255d3SCy SchubertNEED_HMAC_SHA256_KDF=y
390c1d255d3SCy SchubertNEED_HMAC_SHA384_KDF=y
391c1d255d3SCy SchubertNEED_SHA256=y
392c1d255d3SCy SchubertNEED_SHA384=y
393*a90b9d01SCy SchubertOBJS += src/pasn/pasn_initiator.c
394*a90b9d01SCy SchubertOBJS += src/pasn/pasn_common.c
395c1d255d3SCy SchubertOBJS += pasn_supplicant.c
396c1d255d3SCy Schubertendif
397c1d255d3SCy Schubert
398780fb4a2SCy Schubertifdef CONFIG_HS20
399780fb4a2SCy SchubertOBJS += hs20_supplicant.c
400780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_HS20
401780fb4a2SCy SchubertCONFIG_INTERWORKING=y
402780fb4a2SCy Schubertendif
403780fb4a2SCy Schubert
404780fb4a2SCy Schubertifdef CONFIG_INTERWORKING
405780fb4a2SCy SchubertOBJS += interworking.c
406780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_INTERWORKING
407780fb4a2SCy SchubertNEED_GAS=y
408780fb4a2SCy Schubertendif
409780fb4a2SCy Schubert
410780fb4a2SCy Schubertifdef CONFIG_FST
411780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_FST
412780fb4a2SCy SchubertOBJS += src/fst/fst.c
413780fb4a2SCy SchubertOBJS += src/fst/fst_session.c
414780fb4a2SCy SchubertOBJS += src/fst/fst_iface.c
415780fb4a2SCy SchubertOBJS += src/fst/fst_group.c
416780fb4a2SCy SchubertOBJS += src/fst/fst_ctrl_aux.c
417780fb4a2SCy Schubertifdef CONFIG_FST_TEST
418780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_FST_TEST
419780fb4a2SCy Schubertendif
420780fb4a2SCy Schubertifdef CONFIG_CTRL_IFACE
421780fb4a2SCy SchubertOBJS += src/fst/fst_ctrl_iface.c
422780fb4a2SCy Schubertendif
423780fb4a2SCy Schubertendif
424780fb4a2SCy Schubert
425c1d255d3SCy Schubertifdef CONFIG_WEP
426c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_WEP
427c1d255d3SCy Schubertendif
428c1d255d3SCy Schubert
429c1d255d3SCy Schubertifdef CONFIG_NO_TKIP
430c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_NO_TKIP
431c1d255d3SCy Schubertendif
432c1d255d3SCy Schubert
433*a90b9d01SCy Schubertifdef CONFIG_NO_RRM
434*a90b9d01SCy SchubertL_CFLAGS += -DCONFIG_NO_RRM
435*a90b9d01SCy Schubertelse
436*a90b9d01SCy SchubertOBJS += rrm.c
437*a90b9d01SCy Schubertifdef CONFIG_AP
438*a90b9d01SCy SchubertOBJS += src/ap/rrm.c
439*a90b9d01SCy Schubertendif
440*a90b9d01SCy SchubertOBJS += op_classes.c
441*a90b9d01SCy Schubertendif
442*a90b9d01SCy Schubert
443*a90b9d01SCy Schubertifdef CONFIG_NO_WMM_AC
444*a90b9d01SCy SchubertL_CFLAGS += -DCONFIG_NO_WMM_AC
445*a90b9d01SCy Schubertelse
446*a90b9d01SCy SchubertOBJS += wmm_ac.c
447*a90b9d01SCy Schubertendif
448*a90b9d01SCy Schubert
449*a90b9d01SCy Schubertifdef CONFIG_NO_ROBUST_AV
450*a90b9d01SCy SchubertL_CFLAGS += -DCONFIG_NO_ROBUST_AV
451*a90b9d01SCy Schubertelse
452*a90b9d01SCy SchubertOBJS += robust_av.c
453*a90b9d01SCy Schubertendif
454*a90b9d01SCy Schubert
455780fb4a2SCy Schubert
456780fb4a2SCy Schubertinclude $(LOCAL_PATH)/src/drivers/drivers.mk
457780fb4a2SCy Schubert
458780fb4a2SCy Schubertifdef CONFIG_AP
459780fb4a2SCy SchubertOBJS_d += $(DRV_BOTH_OBJS)
460780fb4a2SCy SchubertL_CFLAGS += $(DRV_BOTH_CFLAGS)
461780fb4a2SCy SchubertLDFLAGS += $(DRV_BOTH_LDFLAGS)
462780fb4a2SCy SchubertLIBS += $(DRV_BOTH_LIBS)
463780fb4a2SCy Schubertelse
464780fb4a2SCy SchubertNEED_AP_MLME=
465780fb4a2SCy SchubertOBJS_d += $(DRV_WPA_OBJS)
466780fb4a2SCy SchubertL_CFLAGS += $(DRV_WPA_CFLAGS)
467780fb4a2SCy SchubertLDFLAGS += $(DRV_WPA_LDFLAGS)
468780fb4a2SCy SchubertLIBS += $(DRV_WPA_LIBS)
469780fb4a2SCy Schubertendif
470780fb4a2SCy Schubert
471780fb4a2SCy Schubertifndef CONFIG_L2_PACKET
472780fb4a2SCy SchubertCONFIG_L2_PACKET=linux
473780fb4a2SCy Schubertendif
474780fb4a2SCy Schubert
475780fb4a2SCy SchubertOBJS_l2 += src/l2_packet/l2_packet_$(CONFIG_L2_PACKET).c
476780fb4a2SCy Schubert
477780fb4a2SCy Schubertifeq ($(CONFIG_L2_PACKET), pcap)
478780fb4a2SCy Schubertifdef CONFIG_WINPCAP
479780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_WINPCAP
480780fb4a2SCy SchubertLIBS += -lwpcap -lpacket
481780fb4a2SCy SchubertLIBS_w += -lwpcap
482780fb4a2SCy Schubertelse
483780fb4a2SCy SchubertLIBS += -ldnet -lpcap
484780fb4a2SCy Schubertendif
485780fb4a2SCy Schubertendif
486780fb4a2SCy Schubert
487780fb4a2SCy Schubertifeq ($(CONFIG_L2_PACKET), winpcap)
488780fb4a2SCy SchubertLIBS += -lwpcap -lpacket
489780fb4a2SCy SchubertLIBS_w += -lwpcap
490780fb4a2SCy Schubertendif
491780fb4a2SCy Schubert
492780fb4a2SCy Schubertifeq ($(CONFIG_L2_PACKET), freebsd)
493780fb4a2SCy SchubertLIBS += -lpcap
494780fb4a2SCy Schubertendif
495780fb4a2SCy Schubert
496780fb4a2SCy Schubertifdef CONFIG_ERP
497780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_ERP
498780fb4a2SCy SchubertNEED_HMAC_SHA256_KDF=y
499780fb4a2SCy Schubertendif
500780fb4a2SCy Schubert
501780fb4a2SCy Schubertifdef CONFIG_EAP_TLS
502780fb4a2SCy Schubert# EAP-TLS
503780fb4a2SCy Schubertifeq ($(CONFIG_EAP_TLS), dyn)
504780fb4a2SCy SchubertL_CFLAGS += -DEAP_TLS_DYNAMIC
505780fb4a2SCy SchubertEAPDYN += src/eap_peer/eap_tls.so
506780fb4a2SCy Schubertelse
507780fb4a2SCy SchubertL_CFLAGS += -DEAP_TLS
508780fb4a2SCy SchubertOBJS += src/eap_peer/eap_tls.c
509780fb4a2SCy Schubertendif
510780fb4a2SCy SchubertTLS_FUNCS=y
511780fb4a2SCy SchubertCONFIG_IEEE8021X_EAPOL=y
512*a90b9d01SCy Schubertifdef CONFIG_EAP_TLSV1_3
513*a90b9d01SCy SchubertL_CFLAGS += -DEAP_TLSV1_3
514*a90b9d01SCy Schubertendif
515780fb4a2SCy Schubertendif
516780fb4a2SCy Schubert
517780fb4a2SCy Schubertifdef CONFIG_EAP_UNAUTH_TLS
518780fb4a2SCy Schubert# EAP-UNAUTH-TLS
519780fb4a2SCy SchubertL_CFLAGS += -DEAP_UNAUTH_TLS
520780fb4a2SCy Schubertifndef CONFIG_EAP_TLS
521780fb4a2SCy SchubertOBJS += src/eap_peer/eap_tls.c
522780fb4a2SCy SchubertTLS_FUNCS=y
523780fb4a2SCy Schubertendif
524780fb4a2SCy SchubertCONFIG_IEEE8021X_EAPOL=y
525780fb4a2SCy Schubertendif
526780fb4a2SCy Schubert
527780fb4a2SCy Schubertifdef CONFIG_EAP_PEAP
528780fb4a2SCy Schubert# EAP-PEAP
529780fb4a2SCy Schubertifeq ($(CONFIG_EAP_PEAP), dyn)
530780fb4a2SCy SchubertL_CFLAGS += -DEAP_PEAP_DYNAMIC
531780fb4a2SCy SchubertEAPDYN += src/eap_peer/eap_peap.so
532780fb4a2SCy Schubertelse
533780fb4a2SCy SchubertL_CFLAGS += -DEAP_PEAP
534780fb4a2SCy SchubertOBJS += src/eap_peer/eap_peap.c
535780fb4a2SCy SchubertOBJS += src/eap_common/eap_peap_common.c
536780fb4a2SCy Schubertendif
537780fb4a2SCy SchubertTLS_FUNCS=y
538780fb4a2SCy SchubertCONFIG_IEEE8021X_EAPOL=y
539780fb4a2SCy Schubertendif
540780fb4a2SCy Schubert
541780fb4a2SCy Schubertifdef CONFIG_EAP_TTLS
542780fb4a2SCy Schubert# EAP-TTLS
543780fb4a2SCy Schubertifeq ($(CONFIG_EAP_TTLS), dyn)
544780fb4a2SCy SchubertL_CFLAGS += -DEAP_TTLS_DYNAMIC
545780fb4a2SCy SchubertEAPDYN += src/eap_peer/eap_ttls.so
546780fb4a2SCy Schubertelse
547780fb4a2SCy SchubertL_CFLAGS += -DEAP_TTLS
548780fb4a2SCy SchubertOBJS += src/eap_peer/eap_ttls.c
549780fb4a2SCy Schubertendif
550780fb4a2SCy SchubertTLS_FUNCS=y
551780fb4a2SCy Schubertifndef CONFIG_FIPS
552780fb4a2SCy SchubertMS_FUNCS=y
553780fb4a2SCy SchubertCHAP=y
554780fb4a2SCy Schubertendif
555780fb4a2SCy SchubertCONFIG_IEEE8021X_EAPOL=y
556780fb4a2SCy Schubertendif
557780fb4a2SCy Schubert
558780fb4a2SCy Schubertifdef CONFIG_EAP_MD5
559780fb4a2SCy Schubert# EAP-MD5
560780fb4a2SCy Schubertifeq ($(CONFIG_EAP_MD5), dyn)
561780fb4a2SCy SchubertL_CFLAGS += -DEAP_MD5_DYNAMIC
562780fb4a2SCy SchubertEAPDYN += src/eap_peer/eap_md5.so
563780fb4a2SCy Schubertelse
564780fb4a2SCy SchubertL_CFLAGS += -DEAP_MD5
565780fb4a2SCy SchubertOBJS += src/eap_peer/eap_md5.c
566780fb4a2SCy Schubertendif
567780fb4a2SCy SchubertCHAP=y
568780fb4a2SCy SchubertCONFIG_IEEE8021X_EAPOL=y
569780fb4a2SCy Schubertendif
570780fb4a2SCy Schubert
571780fb4a2SCy Schubert# backwards compatibility for old spelling
572780fb4a2SCy Schubertifdef CONFIG_MSCHAPV2
573780fb4a2SCy Schubertifndef CONFIG_EAP_MSCHAPV2
574780fb4a2SCy SchubertCONFIG_EAP_MSCHAPV2=y
575780fb4a2SCy Schubertendif
576780fb4a2SCy Schubertendif
577780fb4a2SCy Schubert
578780fb4a2SCy Schubertifdef CONFIG_EAP_MSCHAPV2
579780fb4a2SCy Schubert# EAP-MSCHAPv2
580780fb4a2SCy Schubertifeq ($(CONFIG_EAP_MSCHAPV2), dyn)
581780fb4a2SCy SchubertL_CFLAGS += -DEAP_MSCHAPv2_DYNAMIC
582780fb4a2SCy SchubertEAPDYN += src/eap_peer/eap_mschapv2.so
583780fb4a2SCy SchubertEAPDYN += src/eap_peer/mschapv2.so
584780fb4a2SCy Schubertelse
585780fb4a2SCy SchubertL_CFLAGS += -DEAP_MSCHAPv2
586780fb4a2SCy SchubertOBJS += src/eap_peer/eap_mschapv2.c
587780fb4a2SCy SchubertOBJS += src/eap_peer/mschapv2.c
588780fb4a2SCy Schubertendif
589780fb4a2SCy SchubertMS_FUNCS=y
590780fb4a2SCy SchubertCONFIG_IEEE8021X_EAPOL=y
591780fb4a2SCy Schubertendif
592780fb4a2SCy Schubert
593780fb4a2SCy Schubertifdef CONFIG_EAP_GTC
594780fb4a2SCy Schubert# EAP-GTC
595780fb4a2SCy Schubertifeq ($(CONFIG_EAP_GTC), dyn)
596780fb4a2SCy SchubertL_CFLAGS += -DEAP_GTC_DYNAMIC
597780fb4a2SCy SchubertEAPDYN += src/eap_peer/eap_gtc.so
598780fb4a2SCy Schubertelse
599780fb4a2SCy SchubertL_CFLAGS += -DEAP_GTC
600780fb4a2SCy SchubertOBJS += src/eap_peer/eap_gtc.c
601780fb4a2SCy Schubertendif
602780fb4a2SCy SchubertCONFIG_IEEE8021X_EAPOL=y
603780fb4a2SCy Schubertendif
604780fb4a2SCy Schubert
605780fb4a2SCy Schubertifdef CONFIG_EAP_OTP
606780fb4a2SCy Schubert# EAP-OTP
607780fb4a2SCy Schubertifeq ($(CONFIG_EAP_OTP), dyn)
608780fb4a2SCy SchubertL_CFLAGS += -DEAP_OTP_DYNAMIC
609780fb4a2SCy SchubertEAPDYN += src/eap_peer/eap_otp.so
610780fb4a2SCy Schubertelse
611780fb4a2SCy SchubertL_CFLAGS += -DEAP_OTP
612780fb4a2SCy SchubertOBJS += src/eap_peer/eap_otp.c
613780fb4a2SCy Schubertendif
614780fb4a2SCy SchubertCONFIG_IEEE8021X_EAPOL=y
615780fb4a2SCy Schubertendif
616780fb4a2SCy Schubert
617780fb4a2SCy Schubertifdef CONFIG_EAP_SIM
618780fb4a2SCy Schubert# EAP-SIM
619780fb4a2SCy Schubertifeq ($(CONFIG_EAP_SIM), dyn)
620780fb4a2SCy SchubertL_CFLAGS += -DEAP_SIM_DYNAMIC
621780fb4a2SCy SchubertEAPDYN += src/eap_peer/eap_sim.so
622780fb4a2SCy Schubertelse
623780fb4a2SCy SchubertL_CFLAGS += -DEAP_SIM
624780fb4a2SCy SchubertOBJS += src/eap_peer/eap_sim.c
625780fb4a2SCy Schubertendif
626780fb4a2SCy SchubertCONFIG_IEEE8021X_EAPOL=y
627780fb4a2SCy SchubertCONFIG_EAP_SIM_COMMON=y
628780fb4a2SCy SchubertNEED_AES_CBC=y
629780fb4a2SCy Schubertendif
630780fb4a2SCy Schubert
631780fb4a2SCy Schubertifdef CONFIG_EAP_LEAP
632780fb4a2SCy Schubert# EAP-LEAP
633780fb4a2SCy Schubertifeq ($(CONFIG_EAP_LEAP), dyn)
634780fb4a2SCy SchubertL_CFLAGS += -DEAP_LEAP_DYNAMIC
635780fb4a2SCy SchubertEAPDYN += src/eap_peer/eap_leap.so
636780fb4a2SCy Schubertelse
637780fb4a2SCy SchubertL_CFLAGS += -DEAP_LEAP
638780fb4a2SCy SchubertOBJS += src/eap_peer/eap_leap.c
639780fb4a2SCy Schubertendif
640780fb4a2SCy SchubertMS_FUNCS=y
641780fb4a2SCy SchubertCONFIG_IEEE8021X_EAPOL=y
642780fb4a2SCy Schubertendif
643780fb4a2SCy Schubert
644780fb4a2SCy Schubertifdef CONFIG_EAP_PSK
645780fb4a2SCy Schubert# EAP-PSK
646780fb4a2SCy Schubertifeq ($(CONFIG_EAP_PSK), dyn)
647780fb4a2SCy SchubertL_CFLAGS += -DEAP_PSK_DYNAMIC
648780fb4a2SCy SchubertEAPDYN += src/eap_peer/eap_psk.so
649780fb4a2SCy Schubertelse
650780fb4a2SCy SchubertL_CFLAGS += -DEAP_PSK
651780fb4a2SCy SchubertOBJS += src/eap_peer/eap_psk.c src/eap_common/eap_psk_common.c
652780fb4a2SCy Schubertendif
653780fb4a2SCy SchubertCONFIG_IEEE8021X_EAPOL=y
654780fb4a2SCy SchubertNEED_AES=y
655780fb4a2SCy SchubertNEED_AES_ENCBLOCK=y
656780fb4a2SCy SchubertNEED_AES_EAX=y
657780fb4a2SCy Schubertendif
658780fb4a2SCy Schubert
659780fb4a2SCy Schubertifdef CONFIG_EAP_AKA
660780fb4a2SCy Schubert# EAP-AKA
661780fb4a2SCy Schubertifeq ($(CONFIG_EAP_AKA), dyn)
662780fb4a2SCy SchubertL_CFLAGS += -DEAP_AKA_DYNAMIC
663780fb4a2SCy SchubertEAPDYN += src/eap_peer/eap_aka.so
664780fb4a2SCy Schubertelse
665780fb4a2SCy SchubertL_CFLAGS += -DEAP_AKA
666780fb4a2SCy SchubertOBJS += src/eap_peer/eap_aka.c
667780fb4a2SCy Schubertendif
668780fb4a2SCy SchubertCONFIG_IEEE8021X_EAPOL=y
669780fb4a2SCy SchubertCONFIG_EAP_SIM_COMMON=y
670780fb4a2SCy SchubertNEED_AES_CBC=y
671780fb4a2SCy Schubertendif
672780fb4a2SCy Schubert
673780fb4a2SCy Schubertifdef CONFIG_EAP_PROXY
674780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_EAP_PROXY
675780fb4a2SCy SchubertOBJS += src/eap_peer/eap_proxy_$(CONFIG_EAP_PROXY).c
676780fb4a2SCy Schubertinclude $(LOCAL_PATH)/eap_proxy_$(CONFIG_EAP_PROXY).mk
677780fb4a2SCy SchubertCONFIG_IEEE8021X_EAPOL=y
678780fb4a2SCy Schubertendif
679780fb4a2SCy Schubert
680780fb4a2SCy Schubertifdef CONFIG_EAP_AKA_PRIME
681780fb4a2SCy Schubert# EAP-AKA'
682780fb4a2SCy Schubertifeq ($(CONFIG_EAP_AKA_PRIME), dyn)
683780fb4a2SCy SchubertL_CFLAGS += -DEAP_AKA_PRIME_DYNAMIC
684780fb4a2SCy Schubertelse
685780fb4a2SCy SchubertL_CFLAGS += -DEAP_AKA_PRIME
686780fb4a2SCy Schubertendif
687780fb4a2SCy Schubertendif
688780fb4a2SCy Schubert
689780fb4a2SCy Schubertifdef CONFIG_EAP_SIM_COMMON
690780fb4a2SCy SchubertOBJS += src/eap_common/eap_sim_common.c
691780fb4a2SCy SchubertNEED_AES=y
692780fb4a2SCy SchubertNEED_FIPS186_2_PRF=y
693780fb4a2SCy Schubertendif
694780fb4a2SCy Schubert
695780fb4a2SCy Schubertifdef CONFIG_EAP_FAST
696780fb4a2SCy Schubert# EAP-FAST
697780fb4a2SCy Schubertifeq ($(CONFIG_EAP_FAST), dyn)
698780fb4a2SCy SchubertL_CFLAGS += -DEAP_FAST_DYNAMIC
699780fb4a2SCy SchubertEAPDYN += src/eap_peer/eap_fast.so
700780fb4a2SCy SchubertEAPDYN += src/eap_common/eap_fast_common.c
701780fb4a2SCy Schubertelse
702780fb4a2SCy SchubertL_CFLAGS += -DEAP_FAST
703780fb4a2SCy SchubertOBJS += src/eap_peer/eap_fast.c src/eap_peer/eap_fast_pac.c
704780fb4a2SCy SchubertOBJS += src/eap_common/eap_fast_common.c
705780fb4a2SCy Schubertendif
706780fb4a2SCy SchubertTLS_FUNCS=y
707780fb4a2SCy SchubertCONFIG_IEEE8021X_EAPOL=y
708780fb4a2SCy SchubertNEED_T_PRF=y
709780fb4a2SCy Schubertendif
710780fb4a2SCy Schubert
711206b73d0SCy Schubertifdef CONFIG_EAP_TEAP
712206b73d0SCy Schubert# EAP-TEAP
713206b73d0SCy Schubertifeq ($(CONFIG_EAP_TEAP), dyn)
714206b73d0SCy SchubertL_CFLAGS += -DEAP_YEAP_DYNAMIC
715206b73d0SCy SchubertEAPDYN += src/eap_peer/eap_teap.so
716206b73d0SCy SchubertEAPDYN += src/eap_common/eap_teap_common.c
717206b73d0SCy Schubertelse
718206b73d0SCy SchubertL_CFLAGS += -DEAP_TEAP
719206b73d0SCy SchubertOBJS += src/eap_peer/eap_teap.c src/eap_peer/eap_teap_pac.c
720206b73d0SCy SchubertOBJS += src/eap_common/eap_teap_common.c
721206b73d0SCy Schubertendif
722206b73d0SCy SchubertTLS_FUNCS=y
723206b73d0SCy SchubertCONFIG_IEEE8021X_EAPOL=y
724206b73d0SCy SchubertNEED_T_PRF=y
725206b73d0SCy SchubertNEED_SHA384=y
726c1d255d3SCy SchubertNEED_TLS_PRF_SHA256=y
727c1d255d3SCy SchubertNEED_TLS_PRF_SHA384=y
728206b73d0SCy Schubertendif
729206b73d0SCy Schubert
730780fb4a2SCy Schubertifdef CONFIG_EAP_PAX
731780fb4a2SCy Schubert# EAP-PAX
732780fb4a2SCy Schubertifeq ($(CONFIG_EAP_PAX), dyn)
733780fb4a2SCy SchubertL_CFLAGS += -DEAP_PAX_DYNAMIC
734780fb4a2SCy SchubertEAPDYN += src/eap_peer/eap_pax.so
735780fb4a2SCy Schubertelse
736780fb4a2SCy SchubertL_CFLAGS += -DEAP_PAX
737780fb4a2SCy SchubertOBJS += src/eap_peer/eap_pax.c src/eap_common/eap_pax_common.c
738780fb4a2SCy Schubertendif
739780fb4a2SCy SchubertCONFIG_IEEE8021X_EAPOL=y
740780fb4a2SCy Schubertendif
741780fb4a2SCy Schubert
742780fb4a2SCy Schubertifdef CONFIG_EAP_SAKE
743780fb4a2SCy Schubert# EAP-SAKE
744780fb4a2SCy Schubertifeq ($(CONFIG_EAP_SAKE), dyn)
745780fb4a2SCy SchubertL_CFLAGS += -DEAP_SAKE_DYNAMIC
746780fb4a2SCy SchubertEAPDYN += src/eap_peer/eap_sake.so
747780fb4a2SCy Schubertelse
748780fb4a2SCy SchubertL_CFLAGS += -DEAP_SAKE
749780fb4a2SCy SchubertOBJS += src/eap_peer/eap_sake.c src/eap_common/eap_sake_common.c
750780fb4a2SCy Schubertendif
751780fb4a2SCy SchubertCONFIG_IEEE8021X_EAPOL=y
752780fb4a2SCy Schubertendif
753780fb4a2SCy Schubert
754780fb4a2SCy Schubertifdef CONFIG_EAP_GPSK
755780fb4a2SCy Schubert# EAP-GPSK
756780fb4a2SCy Schubertifeq ($(CONFIG_EAP_GPSK), dyn)
757780fb4a2SCy SchubertL_CFLAGS += -DEAP_GPSK_DYNAMIC
758780fb4a2SCy SchubertEAPDYN += src/eap_peer/eap_gpsk.so
759780fb4a2SCy Schubertelse
760780fb4a2SCy SchubertL_CFLAGS += -DEAP_GPSK
761780fb4a2SCy SchubertOBJS += src/eap_peer/eap_gpsk.c src/eap_common/eap_gpsk_common.c
762780fb4a2SCy Schubertendif
763780fb4a2SCy SchubertCONFIG_IEEE8021X_EAPOL=y
764780fb4a2SCy Schubertifdef CONFIG_EAP_GPSK_SHA256
765780fb4a2SCy SchubertL_CFLAGS += -DEAP_GPSK_SHA256
766780fb4a2SCy Schubertendif
767780fb4a2SCy Schubertendif
768780fb4a2SCy Schubert
769780fb4a2SCy Schubertifdef CONFIG_EAP_PWD
770780fb4a2SCy SchubertL_CFLAGS += -DEAP_PWD
771780fb4a2SCy SchubertOBJS += src/eap_peer/eap_pwd.c src/eap_common/eap_pwd_common.c
772780fb4a2SCy SchubertCONFIG_IEEE8021X_EAPOL=y
77385732ac8SCy SchubertNEED_ECC=y
774206b73d0SCy SchubertNEED_DRAGONFLY=y
775*a90b9d01SCy SchubertMS_FUNCS=y
776780fb4a2SCy Schubertendif
777780fb4a2SCy Schubert
778780fb4a2SCy Schubertifdef CONFIG_EAP_EKE
779780fb4a2SCy Schubert# EAP-EKE
780780fb4a2SCy Schubertifeq ($(CONFIG_EAP_EKE), dyn)
781780fb4a2SCy SchubertL_CFLAGS += -DEAP_EKE_DYNAMIC
782780fb4a2SCy SchubertEAPDYN += src/eap_peer/eap_eke.so
783780fb4a2SCy Schubertelse
784780fb4a2SCy SchubertL_CFLAGS += -DEAP_EKE
785780fb4a2SCy SchubertOBJS += src/eap_peer/eap_eke.c src/eap_common/eap_eke_common.c
786780fb4a2SCy Schubertendif
787780fb4a2SCy SchubertCONFIG_IEEE8021X_EAPOL=y
788780fb4a2SCy SchubertNEED_DH_GROUPS=y
789780fb4a2SCy SchubertNEED_DH_GROUPS_ALL=y
790780fb4a2SCy SchubertNEED_AES_CBC=y
791780fb4a2SCy Schubertendif
792780fb4a2SCy Schubert
793780fb4a2SCy Schubertifdef CONFIG_WPS
794780fb4a2SCy Schubert# EAP-WSC
795780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_WPS -DEAP_WSC
796780fb4a2SCy SchubertOBJS += wps_supplicant.c
797780fb4a2SCy SchubertOBJS += src/utils/uuid.c
798780fb4a2SCy SchubertOBJS += src/eap_peer/eap_wsc.c src/eap_common/eap_wsc_common.c
799780fb4a2SCy SchubertOBJS += src/wps/wps.c
800780fb4a2SCy SchubertOBJS += src/wps/wps_common.c
801780fb4a2SCy SchubertOBJS += src/wps/wps_attr_parse.c
802780fb4a2SCy SchubertOBJS += src/wps/wps_attr_build.c
803780fb4a2SCy SchubertOBJS += src/wps/wps_attr_process.c
804780fb4a2SCy SchubertOBJS += src/wps/wps_dev_attr.c
805780fb4a2SCy SchubertOBJS += src/wps/wps_enrollee.c
806780fb4a2SCy SchubertOBJS += src/wps/wps_registrar.c
807780fb4a2SCy SchubertCONFIG_IEEE8021X_EAPOL=y
808780fb4a2SCy SchubertNEED_DH_GROUPS=y
809780fb4a2SCy SchubertNEED_BASE64=y
810780fb4a2SCy SchubertNEED_AES_CBC=y
811780fb4a2SCy SchubertNEED_MODEXP=y
812780fb4a2SCy Schubert
813780fb4a2SCy Schubertifdef CONFIG_WPS_NFC
814780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_WPS_NFC
815780fb4a2SCy SchubertOBJS += src/wps/ndef.c
816780fb4a2SCy SchubertNEED_WPS_OOB=y
817780fb4a2SCy Schubertendif
818780fb4a2SCy Schubert
819780fb4a2SCy Schubertifdef NEED_WPS_OOB
820780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_WPS_OOB
821780fb4a2SCy Schubertendif
822780fb4a2SCy Schubert
823780fb4a2SCy Schubertifdef CONFIG_WPS_ER
824780fb4a2SCy SchubertCONFIG_WPS_UPNP=y
825780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_WPS_ER
826780fb4a2SCy SchubertOBJS += src/wps/wps_er.c
827780fb4a2SCy SchubertOBJS += src/wps/wps_er_ssdp.c
828780fb4a2SCy Schubertendif
829780fb4a2SCy Schubert
830780fb4a2SCy Schubertifdef CONFIG_WPS_UPNP
831780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_WPS_UPNP
832780fb4a2SCy SchubertOBJS += src/wps/wps_upnp.c
833780fb4a2SCy SchubertOBJS += src/wps/wps_upnp_ssdp.c
834780fb4a2SCy SchubertOBJS += src/wps/wps_upnp_web.c
835780fb4a2SCy SchubertOBJS += src/wps/wps_upnp_event.c
836780fb4a2SCy SchubertOBJS += src/wps/wps_upnp_ap.c
837780fb4a2SCy SchubertOBJS += src/wps/upnp_xml.c
838780fb4a2SCy SchubertOBJS += src/wps/httpread.c
839780fb4a2SCy SchubertOBJS += src/wps/http_client.c
840780fb4a2SCy SchubertOBJS += src/wps/http_server.c
841780fb4a2SCy Schubertendif
842780fb4a2SCy Schubert
843780fb4a2SCy Schubertifdef CONFIG_WPS_STRICT
844780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_WPS_STRICT
845780fb4a2SCy SchubertOBJS += src/wps/wps_validate.c
846780fb4a2SCy Schubertendif
847780fb4a2SCy Schubert
848780fb4a2SCy Schubertifdef CONFIG_WPS_TESTING
849780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_WPS_TESTING
850780fb4a2SCy Schubertendif
851780fb4a2SCy Schubert
852780fb4a2SCy Schubertifdef CONFIG_WPS_REG_DISABLE_OPEN
853780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_WPS_REG_DISABLE_OPEN
854780fb4a2SCy Schubertendif
855780fb4a2SCy Schubert
856780fb4a2SCy Schubertendif
857780fb4a2SCy Schubert
858780fb4a2SCy Schubertifdef CONFIG_EAP_IKEV2
859780fb4a2SCy Schubert# EAP-IKEv2
860780fb4a2SCy Schubertifeq ($(CONFIG_EAP_IKEV2), dyn)
861780fb4a2SCy SchubertL_CFLAGS += -DEAP_IKEV2_DYNAMIC
862780fb4a2SCy SchubertEAPDYN += src/eap_peer/eap_ikev2.so src/eap_peer/ikev2.c
863780fb4a2SCy SchubertEAPDYN += src/eap_common/eap_ikev2_common.c src/eap_common/ikev2_common.c
864780fb4a2SCy Schubertelse
865780fb4a2SCy SchubertL_CFLAGS += -DEAP_IKEV2
866780fb4a2SCy SchubertOBJS += src/eap_peer/eap_ikev2.c src/eap_peer/ikev2.c
867780fb4a2SCy SchubertOBJS += src/eap_common/eap_ikev2_common.c src/eap_common/ikev2_common.c
868780fb4a2SCy Schubertendif
869780fb4a2SCy SchubertCONFIG_IEEE8021X_EAPOL=y
870780fb4a2SCy SchubertNEED_DH_GROUPS=y
871780fb4a2SCy SchubertNEED_DH_GROUPS_ALL=y
872780fb4a2SCy SchubertNEED_MODEXP=y
873780fb4a2SCy SchubertNEED_CIPHER=y
874780fb4a2SCy Schubertendif
875780fb4a2SCy Schubert
876780fb4a2SCy Schubertifdef CONFIG_EAP_VENDOR_TEST
877780fb4a2SCy Schubertifeq ($(CONFIG_EAP_VENDOR_TEST), dyn)
878780fb4a2SCy SchubertL_CFLAGS += -DEAP_VENDOR_TEST_DYNAMIC
879780fb4a2SCy SchubertEAPDYN += src/eap_peer/eap_vendor_test.so
880780fb4a2SCy Schubertelse
881780fb4a2SCy SchubertL_CFLAGS += -DEAP_VENDOR_TEST
882780fb4a2SCy SchubertOBJS += src/eap_peer/eap_vendor_test.c
883780fb4a2SCy Schubertendif
884780fb4a2SCy SchubertCONFIG_IEEE8021X_EAPOL=y
885780fb4a2SCy Schubertendif
886780fb4a2SCy Schubert
887780fb4a2SCy Schubertifdef CONFIG_EAP_TNC
888780fb4a2SCy Schubert# EAP-TNC
889780fb4a2SCy SchubertL_CFLAGS += -DEAP_TNC
890780fb4a2SCy SchubertOBJS += src/eap_peer/eap_tnc.c
891780fb4a2SCy SchubertOBJS += src/eap_peer/tncc.c
892780fb4a2SCy SchubertNEED_BASE64=y
893780fb4a2SCy Schubertifndef CONFIG_NATIVE_WINDOWS
894780fb4a2SCy Schubertifndef CONFIG_DRIVER_BSD
895780fb4a2SCy SchubertLIBS += -ldl
896780fb4a2SCy Schubertendif
897780fb4a2SCy Schubertendif
898780fb4a2SCy Schubertendif
899780fb4a2SCy Schubert
900780fb4a2SCy Schubertifdef CONFIG_IEEE8021X_EAPOL
901780fb4a2SCy Schubert# IEEE 802.1X/EAPOL state machines (e.g., for RADIUS authentication)
902780fb4a2SCy SchubertL_CFLAGS += -DIEEE8021X_EAPOL
903780fb4a2SCy SchubertOBJS += src/eapol_supp/eapol_supp_sm.c
904780fb4a2SCy SchubertOBJS += src/eap_peer/eap.c src/eap_peer/eap_methods.c
905780fb4a2SCy SchubertNEED_EAP_COMMON=y
906780fb4a2SCy Schubertifdef CONFIG_DYNAMIC_EAP_METHODS
907780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_DYNAMIC_EAP_METHODS
908780fb4a2SCy SchubertLIBS += -ldl -rdynamic
909780fb4a2SCy Schubertendif
910780fb4a2SCy Schubertendif
911780fb4a2SCy Schubert
912780fb4a2SCy Schubertifdef CONFIG_AP
913780fb4a2SCy SchubertNEED_EAP_COMMON=y
914780fb4a2SCy SchubertNEED_RSN_AUTHENTICATOR=y
915780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_AP
916780fb4a2SCy SchubertOBJS += ap.c
917780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_NO_RADIUS
918780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_NO_ACCOUNTING
919780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_NO_VLAN
920780fb4a2SCy SchubertOBJS += src/ap/hostapd.c
921780fb4a2SCy SchubertOBJS += src/ap/wpa_auth_glue.c
922780fb4a2SCy SchubertOBJS += src/ap/utils.c
923780fb4a2SCy SchubertOBJS += src/ap/authsrv.c
924780fb4a2SCy SchubertOBJS += src/ap/ap_config.c
925780fb4a2SCy SchubertOBJS += src/ap/sta_info.c
926780fb4a2SCy SchubertOBJS += src/ap/tkip_countermeasures.c
927780fb4a2SCy SchubertOBJS += src/ap/ap_mlme.c
928780fb4a2SCy SchubertOBJS += src/ap/ieee802_1x.c
929780fb4a2SCy SchubertOBJS += src/eapol_auth/eapol_auth_sm.c
930780fb4a2SCy SchubertOBJS += src/ap/ieee802_11_auth.c
931780fb4a2SCy SchubertOBJS += src/ap/ieee802_11_shared.c
932780fb4a2SCy SchubertOBJS += src/ap/drv_callbacks.c
933780fb4a2SCy SchubertOBJS += src/ap/ap_drv_ops.c
934780fb4a2SCy SchubertOBJS += src/ap/beacon.c
935780fb4a2SCy SchubertOBJS += src/ap/bss_load.c
936780fb4a2SCy SchubertOBJS += src/ap/eap_user_db.c
937780fb4a2SCy SchubertOBJS += src/ap/neighbor_db.c
938780fb4a2SCy SchubertOBJS += src/ap/ieee802_11_ht.c
939780fb4a2SCy Schubertifdef CONFIG_IEEE80211AC
940780fb4a2SCy SchubertOBJS += src/ap/ieee802_11_vht.c
941780fb4a2SCy Schubertendif
94285732ac8SCy Schubertifdef CONFIG_IEEE80211AX
94385732ac8SCy SchubertOBJS += src/ap/ieee802_11_he.c
944780fb4a2SCy Schubertendif
945*a90b9d01SCy Schubertifdef CONFIG_IEEE80211BE
946*a90b9d01SCy SchubertOBJS += src/ap/ieee802_11_eht.c
947*a90b9d01SCy Schubertendif
94885732ac8SCy Schubertifdef CONFIG_WNM_AP
94985732ac8SCy SchubertL_CFLAGS += -DCONFIG_WNM_AP
950780fb4a2SCy SchubertOBJS += src/ap/wnm_ap.c
951780fb4a2SCy Schubertendif
952780fb4a2SCy Schubertifdef CONFIG_MBO
953780fb4a2SCy SchubertOBJS += src/ap/mbo_ap.c
954780fb4a2SCy Schubertendif
95585732ac8SCy Schubertifdef CONFIG_FILS
95685732ac8SCy SchubertOBJS += src/ap/fils_hlp.c
95785732ac8SCy Schubertendif
958780fb4a2SCy Schubertifdef CONFIG_CTRL_IFACE
959780fb4a2SCy SchubertOBJS += src/ap/ctrl_iface_ap.c
960780fb4a2SCy Schubertendif
961780fb4a2SCy Schubert
962780fb4a2SCy SchubertL_CFLAGS += -DEAP_SERVER -DEAP_SERVER_IDENTITY
963780fb4a2SCy SchubertOBJS += src/eap_server/eap_server.c
964780fb4a2SCy SchubertOBJS += src/eap_server/eap_server_identity.c
965780fb4a2SCy SchubertOBJS += src/eap_server/eap_server_methods.c
966780fb4a2SCy Schubert
967780fb4a2SCy Schubertifdef CONFIG_IEEE80211AC
968780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_IEEE80211AC
969780fb4a2SCy Schubertendif
970*a90b9d01SCy Schubertifdef CONFIG_IEEE80211BE
971*a90b9d01SCy SchubertCONFIG_IEEE80211AX=y
972*a90b9d01SCy SchubertL_CFLAGS += -DCONFIG_IEEE80211BE
973*a90b9d01SCy Schubertendif
97485732ac8SCy Schubertifdef CONFIG_IEEE80211AX
97585732ac8SCy SchubertL_CFLAGS += -DCONFIG_IEEE80211AX
976780fb4a2SCy Schubertendif
977780fb4a2SCy Schubert
978780fb4a2SCy Schubertifdef NEED_AP_MLME
979780fb4a2SCy SchubertOBJS += src/ap/wmm.c
980780fb4a2SCy SchubertOBJS += src/ap/ap_list.c
981*a90b9d01SCy SchubertOBJS += src/ap/comeback_token.c
982*a90b9d01SCy SchubertOBJS += src/pasn/pasn_responder.c
983780fb4a2SCy SchubertOBJS += src/ap/ieee802_11.c
984780fb4a2SCy SchubertOBJS += src/ap/hw_features.c
985780fb4a2SCy SchubertOBJS += src/ap/dfs.c
986780fb4a2SCy SchubertL_CFLAGS += -DNEED_AP_MLME
987780fb4a2SCy Schubertendif
988780fb4a2SCy Schubertifdef CONFIG_WPS
989780fb4a2SCy SchubertL_CFLAGS += -DEAP_SERVER_WSC
990780fb4a2SCy SchubertOBJS += src/ap/wps_hostapd.c
991780fb4a2SCy SchubertOBJS += src/eap_server/eap_server_wsc.c
992780fb4a2SCy Schubertendif
99385732ac8SCy Schubertifdef CONFIG_DPP
99485732ac8SCy SchubertOBJS += src/ap/dpp_hostapd.c
99585732ac8SCy SchubertOBJS += src/ap/gas_query_ap.c
996c1d255d3SCy SchubertNEED_AP_GAS_SERV=y
99785732ac8SCy Schubertendif
998*a90b9d01SCy Schubertifdef CONFIG_NAN_USD
999*a90b9d01SCy SchubertOBJS += src/ap/nan_usd_ap.c
1000*a90b9d01SCy Schubertendif
1001780fb4a2SCy Schubertifdef CONFIG_INTERWORKING
1002c1d255d3SCy SchubertNEED_AP_GAS_SERV=y
1003c1d255d3SCy Schubertendif
1004c1d255d3SCy Schubertifdef NEED_AP_GAS_SERV
1005780fb4a2SCy SchubertOBJS += src/ap/gas_serv.c
1006780fb4a2SCy Schubertendif
1007780fb4a2SCy Schubertifdef CONFIG_HS20
1008780fb4a2SCy SchubertOBJS += src/ap/hs20.c
1009780fb4a2SCy Schubertendif
1010780fb4a2SCy Schubertendif
1011780fb4a2SCy Schubert
101285732ac8SCy Schubertifdef CONFIG_MBO
101385732ac8SCy SchubertOBJS += mbo.c
101485732ac8SCy SchubertL_CFLAGS += -DCONFIG_MBO
101585732ac8SCy Schubertendif
101685732ac8SCy Schubert
101785732ac8SCy Schubertifdef CONFIG_TESTING_OPTIONS
101885732ac8SCy SchubertL_CFLAGS += -DCONFIG_TESTING_OPTIONS
1019*a90b9d01SCy SchubertNEED_AES_WRAP=y
102085732ac8SCy Schubertendif
102185732ac8SCy Schubert
1022780fb4a2SCy Schubertifdef NEED_RSN_AUTHENTICATOR
1023780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_NO_RADIUS
1024780fb4a2SCy SchubertNEED_AES_WRAP=y
1025780fb4a2SCy SchubertOBJS += src/ap/wpa_auth.c
1026780fb4a2SCy SchubertOBJS += src/ap/wpa_auth_ie.c
1027780fb4a2SCy SchubertOBJS += src/ap/pmksa_cache_auth.c
1028780fb4a2SCy Schubertendif
1029780fb4a2SCy Schubert
1030780fb4a2SCy Schubertifdef CONFIG_ACS
1031780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_ACS
1032780fb4a2SCy SchubertOBJS += src/ap/acs.c
1033780fb4a2SCy SchubertLIBS += -lm
1034780fb4a2SCy Schubertendif
1035780fb4a2SCy Schubert
1036780fb4a2SCy Schubertifdef CONFIG_PCSC
1037780fb4a2SCy Schubert# PC/SC interface for smartcards (USIM, GSM SIM)
1038780fb4a2SCy SchubertL_CFLAGS += -DPCSC_FUNCS -I/usr/include/PCSC
1039780fb4a2SCy SchubertOBJS += src/utils/pcsc_funcs.c
1040780fb4a2SCy Schubert# -lpthread may not be needed depending on how pcsc-lite was configured
1041780fb4a2SCy Schubertifdef CONFIG_NATIVE_WINDOWS
1042780fb4a2SCy Schubert#Once MinGW gets support for WinScard, -lwinscard could be used instead of the
1043780fb4a2SCy Schubert#dynamic symbol loading that is now used in pcsc_funcs.c
1044780fb4a2SCy Schubert#LIBS += -lwinscard
1045780fb4a2SCy Schubertelse
1046780fb4a2SCy SchubertLIBS += -lpcsclite -lpthread
1047780fb4a2SCy Schubertendif
1048780fb4a2SCy Schubertendif
1049780fb4a2SCy Schubert
1050780fb4a2SCy Schubertifdef CONFIG_SIM_SIMULATOR
1051780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_SIM_SIMULATOR
1052780fb4a2SCy SchubertNEED_MILENAGE=y
1053780fb4a2SCy Schubertendif
1054780fb4a2SCy Schubert
1055780fb4a2SCy Schubertifdef CONFIG_USIM_SIMULATOR
1056780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_USIM_SIMULATOR
1057780fb4a2SCy SchubertNEED_MILENAGE=y
1058780fb4a2SCy Schubertendif
1059780fb4a2SCy Schubert
1060780fb4a2SCy Schubertifdef NEED_MILENAGE
1061780fb4a2SCy SchubertOBJS += src/crypto/milenage.c
1062780fb4a2SCy SchubertNEED_AES_ENCBLOCK=y
1063780fb4a2SCy Schubertendif
1064780fb4a2SCy Schubert
1065780fb4a2SCy Schubertifdef CONFIG_PKCS12
1066780fb4a2SCy SchubertL_CFLAGS += -DPKCS12_FUNCS
1067780fb4a2SCy Schubertendif
1068780fb4a2SCy Schubert
1069780fb4a2SCy Schubertifdef CONFIG_SMARTCARD
1070780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_SMARTCARD
1071780fb4a2SCy Schubertendif
1072780fb4a2SCy Schubert
1073206b73d0SCy Schubertifdef NEED_DRAGONFLY
1074206b73d0SCy SchubertOBJS += src/common/dragonfly.c
1075206b73d0SCy Schubertendif
1076206b73d0SCy Schubert
1077780fb4a2SCy Schubertifdef MS_FUNCS
1078780fb4a2SCy SchubertOBJS += src/crypto/ms_funcs.c
1079780fb4a2SCy SchubertNEED_DES=y
1080780fb4a2SCy SchubertNEED_MD4=y
1081780fb4a2SCy Schubertendif
1082780fb4a2SCy Schubert
1083780fb4a2SCy Schubertifdef CHAP
1084780fb4a2SCy SchubertOBJS += src/eap_common/chap.c
1085780fb4a2SCy Schubertendif
1086780fb4a2SCy Schubert
1087780fb4a2SCy Schubertifdef TLS_FUNCS
1088780fb4a2SCy SchubertNEED_DES=y
1089780fb4a2SCy Schubert# Shared TLS functions (needed for EAP_TLS, EAP_PEAP, EAP_TTLS, and EAP_FAST)
1090780fb4a2SCy SchubertOBJS += src/eap_peer/eap_tls_common.c
1091780fb4a2SCy Schubertifndef CONFIG_FIPS
1092780fb4a2SCy SchubertNEED_TLS_PRF=y
1093780fb4a2SCy SchubertNEED_SHA1=y
1094780fb4a2SCy SchubertNEED_MD5=y
1095780fb4a2SCy Schubertendif
1096780fb4a2SCy Schubertendif
1097780fb4a2SCy Schubert
1098780fb4a2SCy Schubertifndef CONFIG_TLS
1099780fb4a2SCy SchubertCONFIG_TLS=openssl
1100780fb4a2SCy Schubertendif
1101780fb4a2SCy Schubert
1102780fb4a2SCy Schubertifdef CONFIG_TLSV11
1103780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_TLSV11
1104780fb4a2SCy Schubertendif
1105780fb4a2SCy Schubert
1106780fb4a2SCy Schubertifdef CONFIG_TLSV12
1107780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_TLSV12
1108780fb4a2SCy Schubertendif
1109780fb4a2SCy Schubert
1110780fb4a2SCy Schubertifeq ($(CONFIG_TLS), openssl)
1111*a90b9d01SCy SchubertL_CFLAGS += -DCRYPTO_RSA_OAEP_SHA256
1112780fb4a2SCy Schubertifdef TLS_FUNCS
1113780fb4a2SCy SchubertL_CFLAGS += -DEAP_TLS_OPENSSL
1114780fb4a2SCy SchubertOBJS += src/crypto/tls_openssl.c
1115780fb4a2SCy SchubertOBJS += src/crypto/tls_openssl_ocsp.c
1116780fb4a2SCy SchubertLIBS += -lssl
1117780fb4a2SCy Schubertendif
1118780fb4a2SCy SchubertOBJS += src/crypto/crypto_openssl.c
1119780fb4a2SCy SchubertOBJS_p += src/crypto/crypto_openssl.c
1120780fb4a2SCy Schubertifdef NEED_FIPS186_2_PRF
1121780fb4a2SCy SchubertOBJS += src/crypto/fips_prf_openssl.c
1122780fb4a2SCy Schubertendif
1123780fb4a2SCy SchubertNEED_TLS_PRF_SHA256=y
1124780fb4a2SCy SchubertLIBS += -lcrypto
1125780fb4a2SCy SchubertLIBS_p += -lcrypto
1126780fb4a2SCy Schubertifdef CONFIG_TLS_ADD_DL
1127780fb4a2SCy SchubertLIBS += -ldl
1128780fb4a2SCy SchubertLIBS_p += -ldl
1129780fb4a2SCy Schubertendif
113085732ac8SCy Schubertifndef CONFIG_TLS_DEFAULT_CIPHERS
113185732ac8SCy SchubertCONFIG_TLS_DEFAULT_CIPHERS = "DEFAULT:!EXP:!LOW"
113285732ac8SCy Schubertendif
113385732ac8SCy SchubertL_CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONFIG_TLS_DEFAULT_CIPHERS)\"
1134780fb4a2SCy Schubertendif
1135780fb4a2SCy Schubert
1136780fb4a2SCy Schubertifeq ($(CONFIG_TLS), gnutls)
113785732ac8SCy Schubertifndef CONFIG_CRYPTO
113885732ac8SCy Schubert# default to libgcrypt
113985732ac8SCy SchubertCONFIG_CRYPTO=gnutls
114085732ac8SCy Schubertendif
1141780fb4a2SCy Schubertifdef TLS_FUNCS
1142780fb4a2SCy SchubertOBJS += src/crypto/tls_gnutls.c
1143780fb4a2SCy SchubertLIBS += -lgnutls -lgpg-error
1144780fb4a2SCy Schubertendif
114585732ac8SCy SchubertOBJS += src/crypto/crypto_$(CONFIG_CRYPTO).c
114685732ac8SCy SchubertOBJS_p += src/crypto/crypto_$(CONFIG_CRYPTO).c
1147780fb4a2SCy Schubertifdef NEED_FIPS186_2_PRF
1148780fb4a2SCy SchubertOBJS += src/crypto/fips_prf_internal.c
1149780fb4a2SCy SchubertOBJS += src/crypto/sha1-internal.c
1150780fb4a2SCy Schubertendif
115185732ac8SCy Schubertifeq ($(CONFIG_CRYPTO), gnutls)
1152780fb4a2SCy SchubertLIBS += -lgcrypt
1153780fb4a2SCy SchubertLIBS_p += -lgcrypt
1154780fb4a2SCy SchubertCONFIG_INTERNAL_RC4=y
1155780fb4a2SCy SchubertCONFIG_INTERNAL_DH_GROUP5=y
1156780fb4a2SCy Schubertendif
115785732ac8SCy Schubertifeq ($(CONFIG_CRYPTO), nettle)
115885732ac8SCy SchubertLIBS += -lnettle -lgmp
115985732ac8SCy SchubertLIBS_p += -lnettle -lgmp
116085732ac8SCy SchubertCONFIG_INTERNAL_RC4=y
116185732ac8SCy SchubertCONFIG_INTERNAL_DH_GROUP5=y
116285732ac8SCy Schubertendif
116385732ac8SCy Schubertendif
1164780fb4a2SCy Schubert
1165780fb4a2SCy Schubertifeq ($(CONFIG_TLS), internal)
1166780fb4a2SCy Schubertifndef CONFIG_CRYPTO
1167780fb4a2SCy SchubertCONFIG_CRYPTO=internal
1168780fb4a2SCy Schubertendif
1169780fb4a2SCy Schubertifdef TLS_FUNCS
1170780fb4a2SCy SchubertOBJS += src/crypto/crypto_internal-rsa.c
1171780fb4a2SCy SchubertOBJS += src/crypto/tls_internal.c
1172780fb4a2SCy SchubertOBJS += src/tls/tlsv1_common.c
1173780fb4a2SCy SchubertOBJS += src/tls/tlsv1_record.c
1174780fb4a2SCy SchubertOBJS += src/tls/tlsv1_cred.c
1175780fb4a2SCy SchubertOBJS += src/tls/tlsv1_client.c
1176780fb4a2SCy SchubertOBJS += src/tls/tlsv1_client_write.c
1177780fb4a2SCy SchubertOBJS += src/tls/tlsv1_client_read.c
1178780fb4a2SCy SchubertOBJS += src/tls/tlsv1_client_ocsp.c
1179c1d255d3SCy SchubertNEED_ASN1=y
1180780fb4a2SCy SchubertOBJS += src/tls/rsa.c
1181780fb4a2SCy SchubertOBJS += src/tls/x509v3.c
1182780fb4a2SCy SchubertOBJS += src/tls/pkcs1.c
1183780fb4a2SCy SchubertOBJS += src/tls/pkcs5.c
1184780fb4a2SCy SchubertOBJS += src/tls/pkcs8.c
1185780fb4a2SCy SchubertNEED_BASE64=y
1186780fb4a2SCy SchubertNEED_TLS_PRF=y
1187780fb4a2SCy Schubertifdef CONFIG_TLSV12
1188780fb4a2SCy SchubertNEED_TLS_PRF_SHA256=y
1189780fb4a2SCy Schubertendif
1190780fb4a2SCy SchubertNEED_MODEXP=y
1191780fb4a2SCy SchubertNEED_CIPHER=y
1192780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_TLS_INTERNAL_CLIENT
1193780fb4a2SCy Schubertendif
1194780fb4a2SCy Schubertifdef NEED_CIPHER
1195780fb4a2SCy SchubertNEED_DES=y
1196780fb4a2SCy SchubertOBJS += src/crypto/crypto_internal-cipher.c
1197780fb4a2SCy Schubertendif
1198780fb4a2SCy Schubertifdef NEED_MODEXP
1199780fb4a2SCy SchubertOBJS += src/crypto/crypto_internal-modexp.c
1200780fb4a2SCy SchubertOBJS += src/tls/bignum.c
1201780fb4a2SCy Schubertendif
1202780fb4a2SCy Schubertifeq ($(CONFIG_CRYPTO), libtomcrypt)
1203780fb4a2SCy SchubertOBJS += src/crypto/crypto_libtomcrypt.c
1204780fb4a2SCy SchubertOBJS_p += src/crypto/crypto_libtomcrypt.c
1205780fb4a2SCy SchubertLIBS += -ltomcrypt -ltfm
1206780fb4a2SCy SchubertLIBS_p += -ltomcrypt -ltfm
1207780fb4a2SCy SchubertCONFIG_INTERNAL_SHA256=y
1208780fb4a2SCy SchubertCONFIG_INTERNAL_RC4=y
1209780fb4a2SCy SchubertCONFIG_INTERNAL_DH_GROUP5=y
1210780fb4a2SCy Schubertendif
1211780fb4a2SCy Schubertifeq ($(CONFIG_CRYPTO), internal)
1212780fb4a2SCy SchubertOBJS += src/crypto/crypto_internal.c
1213780fb4a2SCy SchubertOBJS_p += src/crypto/crypto_internal.c
1214780fb4a2SCy SchubertNEED_AES_ENC=y
1215780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_CRYPTO_INTERNAL
1216780fb4a2SCy Schubertifdef CONFIG_INTERNAL_LIBTOMMATH
1217780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH
1218780fb4a2SCy Schubertifdef CONFIG_INTERNAL_LIBTOMMATH_FAST
1219780fb4a2SCy SchubertL_CFLAGS += -DLTM_FAST
1220780fb4a2SCy Schubertendif
1221780fb4a2SCy Schubertelse
1222780fb4a2SCy SchubertLIBS += -ltommath
1223780fb4a2SCy SchubertLIBS_p += -ltommath
1224780fb4a2SCy Schubertendif
1225780fb4a2SCy SchubertCONFIG_INTERNAL_AES=y
1226780fb4a2SCy SchubertCONFIG_INTERNAL_DES=y
1227780fb4a2SCy SchubertCONFIG_INTERNAL_SHA1=y
1228780fb4a2SCy SchubertCONFIG_INTERNAL_MD4=y
1229780fb4a2SCy SchubertCONFIG_INTERNAL_MD5=y
1230780fb4a2SCy SchubertCONFIG_INTERNAL_SHA256=y
1231780fb4a2SCy SchubertCONFIG_INTERNAL_SHA384=y
1232780fb4a2SCy SchubertCONFIG_INTERNAL_SHA512=y
1233780fb4a2SCy SchubertCONFIG_INTERNAL_RC4=y
1234780fb4a2SCy SchubertCONFIG_INTERNAL_DH_GROUP5=y
1235780fb4a2SCy Schubertendif
1236780fb4a2SCy Schubertifeq ($(CONFIG_CRYPTO), cryptoapi)
1237780fb4a2SCy SchubertOBJS += src/crypto/crypto_cryptoapi.c
1238780fb4a2SCy SchubertOBJS_p += src/crypto/crypto_cryptoapi.c
1239780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_CRYPTO_CRYPTOAPI
1240780fb4a2SCy SchubertCONFIG_INTERNAL_SHA256=y
1241780fb4a2SCy SchubertCONFIG_INTERNAL_RC4=y
1242780fb4a2SCy Schubertendif
1243780fb4a2SCy Schubertendif
1244780fb4a2SCy Schubert
1245780fb4a2SCy Schubertifeq ($(CONFIG_TLS), none)
1246780fb4a2SCy Schubertifdef TLS_FUNCS
1247780fb4a2SCy SchubertOBJS += src/crypto/tls_none.c
1248780fb4a2SCy SchubertL_CFLAGS += -DEAP_TLS_NONE
1249780fb4a2SCy SchubertCONFIG_INTERNAL_AES=y
1250780fb4a2SCy SchubertCONFIG_INTERNAL_SHA1=y
1251780fb4a2SCy SchubertCONFIG_INTERNAL_MD5=y
1252780fb4a2SCy Schubertendif
1253780fb4a2SCy SchubertOBJS += src/crypto/crypto_none.c
1254780fb4a2SCy SchubertOBJS_p += src/crypto/crypto_none.c
1255780fb4a2SCy SchubertCONFIG_INTERNAL_SHA256=y
1256780fb4a2SCy SchubertCONFIG_INTERNAL_RC4=y
1257780fb4a2SCy Schubertendif
1258780fb4a2SCy Schubert
1259780fb4a2SCy Schubertifdef TLS_FUNCS
1260780fb4a2SCy Schubertifdef CONFIG_SMARTCARD
1261780fb4a2SCy Schubertifndef CONFIG_NATIVE_WINDOWS
1262780fb4a2SCy Schubertifneq ($(CONFIG_L2_PACKET), freebsd)
1263780fb4a2SCy SchubertLIBS += -ldl
1264780fb4a2SCy Schubertendif
1265780fb4a2SCy Schubertendif
1266780fb4a2SCy Schubertendif
1267780fb4a2SCy Schubertendif
1268780fb4a2SCy Schubert
1269780fb4a2SCy Schubertifndef TLS_FUNCS
1270780fb4a2SCy SchubertOBJS += src/crypto/tls_none.c
1271780fb4a2SCy Schubertifeq ($(CONFIG_TLS), internal)
1272780fb4a2SCy SchubertCONFIG_INTERNAL_AES=y
1273780fb4a2SCy SchubertCONFIG_INTERNAL_SHA1=y
1274780fb4a2SCy SchubertCONFIG_INTERNAL_MD5=y
1275780fb4a2SCy SchubertCONFIG_INTERNAL_RC4=y
1276780fb4a2SCy Schubertendif
1277780fb4a2SCy Schubertendif
1278780fb4a2SCy Schubert
1279780fb4a2SCy SchubertAESOBJS = # none so far (see below)
1280780fb4a2SCy Schubertifdef CONFIG_INTERNAL_AES
1281780fb4a2SCy SchubertAESOBJS += src/crypto/aes-internal.c src/crypto/aes-internal-dec.c
1282780fb4a2SCy Schubertendif
1283780fb4a2SCy Schubert
1284780fb4a2SCy Schubertifneq ($(CONFIG_TLS), openssl)
1285780fb4a2SCy SchubertNEED_INTERNAL_AES_WRAP=y
1286780fb4a2SCy Schubertendif
1287780fb4a2SCy Schubertifdef CONFIG_OPENSSL_INTERNAL_AES_WRAP
1288780fb4a2SCy Schubert# Seems to be needed at least with BoringSSL
1289780fb4a2SCy SchubertNEED_INTERNAL_AES_WRAP=y
1290780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_OPENSSL_INTERNAL_AES_WRAP
1291780fb4a2SCy Schubertendif
1292780fb4a2SCy Schubertifdef CONFIG_FIPS
1293780fb4a2SCy Schubert# Have to use internal AES key wrap routines to use OpenSSL EVP since the
1294780fb4a2SCy Schubert# OpenSSL AES_wrap_key()/AES_unwrap_key() API is not available in FIPS mode.
1295780fb4a2SCy SchubertNEED_INTERNAL_AES_WRAP=y
1296780fb4a2SCy Schubertendif
1297780fb4a2SCy Schubert
1298780fb4a2SCy Schubertifdef NEED_INTERNAL_AES_WRAP
1299780fb4a2SCy SchubertAESOBJS += src/crypto/aes-unwrap.c
1300780fb4a2SCy Schubertendif
1301780fb4a2SCy Schubertifdef NEED_AES_EAX
1302780fb4a2SCy SchubertAESOBJS += src/crypto/aes-eax.c
1303780fb4a2SCy SchubertNEED_AES_CTR=y
130485732ac8SCy Schubertendif
130585732ac8SCy Schubertifdef NEED_AES_SIV
130685732ac8SCy SchubertAESOBJS += src/crypto/aes-siv.c
130785732ac8SCy SchubertNEED_AES_CTR=y
1308780fb4a2SCy Schubertendif
1309780fb4a2SCy Schubertifdef NEED_AES_CTR
1310780fb4a2SCy SchubertAESOBJS += src/crypto/aes-ctr.c
1311780fb4a2SCy Schubertendif
1312780fb4a2SCy Schubertifdef NEED_AES_ENCBLOCK
1313780fb4a2SCy SchubertAESOBJS += src/crypto/aes-encblock.c
1314780fb4a2SCy Schubertendif
1315780fb4a2SCy SchubertNEED_AES_ENC=y
1316*a90b9d01SCy Schubertifneq ($(CONFIG_TLS), openssl)
1317780fb4a2SCy SchubertAESOBJS += src/crypto/aes-omac1.c
1318780fb4a2SCy Schubertendif
1319780fb4a2SCy Schubertifdef NEED_AES_WRAP
1320780fb4a2SCy SchubertNEED_AES_ENC=y
1321780fb4a2SCy Schubertifdef NEED_INTERNAL_AES_WRAP
1322780fb4a2SCy SchubertAESOBJS += src/crypto/aes-wrap.c
1323780fb4a2SCy Schubertendif
1324780fb4a2SCy Schubertendif
1325780fb4a2SCy Schubertifdef NEED_AES_CBC
1326780fb4a2SCy SchubertNEED_AES_ENC=y
1327780fb4a2SCy Schubertifneq ($(CONFIG_TLS), openssl)
1328780fb4a2SCy SchubertAESOBJS += src/crypto/aes-cbc.c
1329780fb4a2SCy Schubertendif
1330780fb4a2SCy Schubertendif
1331780fb4a2SCy Schubertifdef NEED_AES_ENC
1332780fb4a2SCy Schubertifdef CONFIG_INTERNAL_AES
1333780fb4a2SCy SchubertAESOBJS += src/crypto/aes-internal-enc.c
1334780fb4a2SCy Schubertendif
1335780fb4a2SCy Schubertendif
1336780fb4a2SCy Schubertifdef NEED_AES
1337780fb4a2SCy SchubertOBJS += $(AESOBJS)
1338780fb4a2SCy Schubertendif
1339780fb4a2SCy Schubert
1340780fb4a2SCy SchubertSHA1OBJS =
1341780fb4a2SCy Schubertifdef NEED_SHA1
1342780fb4a2SCy Schubertifneq ($(CONFIG_TLS), openssl)
134385732ac8SCy Schubertifneq ($(CONFIG_TLS), gnutls)
1344780fb4a2SCy SchubertSHA1OBJS += src/crypto/sha1.c
1345780fb4a2SCy Schubertendif
134685732ac8SCy Schubertendif
1347780fb4a2SCy SchubertSHA1OBJS += src/crypto/sha1-prf.c
1348780fb4a2SCy Schubertifdef CONFIG_INTERNAL_SHA1
1349780fb4a2SCy SchubertSHA1OBJS += src/crypto/sha1-internal.c
1350780fb4a2SCy Schubertifdef NEED_FIPS186_2_PRF
1351780fb4a2SCy SchubertSHA1OBJS += src/crypto/fips_prf_internal.c
1352780fb4a2SCy Schubertendif
1353780fb4a2SCy Schubertendif
1354780fb4a2SCy Schubertifdef CONFIG_NO_WPA_PASSPHRASE
1355780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_NO_PBKDF2
1356780fb4a2SCy Schubertelse
1357780fb4a2SCy Schubertifneq ($(CONFIG_TLS), openssl)
1358780fb4a2SCy SchubertSHA1OBJS += src/crypto/sha1-pbkdf2.c
1359780fb4a2SCy Schubertendif
1360780fb4a2SCy Schubertendif
1361780fb4a2SCy Schubertifdef NEED_T_PRF
1362780fb4a2SCy SchubertSHA1OBJS += src/crypto/sha1-tprf.c
1363780fb4a2SCy Schubertendif
1364780fb4a2SCy Schubertifdef NEED_TLS_PRF
1365780fb4a2SCy SchubertSHA1OBJS += src/crypto/sha1-tlsprf.c
1366780fb4a2SCy Schubertendif
1367780fb4a2SCy Schubertendif
1368780fb4a2SCy Schubert
1369780fb4a2SCy SchubertMD5OBJS =
1370780fb4a2SCy Schubertifndef CONFIG_FIPS
1371780fb4a2SCy Schubertifneq ($(CONFIG_TLS), openssl)
137285732ac8SCy Schubertifneq ($(CONFIG_TLS), gnutls)
1373780fb4a2SCy SchubertMD5OBJS += src/crypto/md5.c
1374780fb4a2SCy Schubertendif
1375780fb4a2SCy Schubertendif
137685732ac8SCy Schubertendif
1377780fb4a2SCy Schubertifdef NEED_MD5
1378780fb4a2SCy Schubertifdef CONFIG_INTERNAL_MD5
1379780fb4a2SCy SchubertMD5OBJS += src/crypto/md5-internal.c
1380780fb4a2SCy Schubertendif
1381780fb4a2SCy SchubertOBJS += $(MD5OBJS)
1382780fb4a2SCy SchubertOBJS_p += $(MD5OBJS)
1383780fb4a2SCy Schubertendif
1384780fb4a2SCy Schubert
1385780fb4a2SCy Schubertifdef NEED_MD4
1386780fb4a2SCy Schubertifdef CONFIG_INTERNAL_MD4
1387780fb4a2SCy SchubertOBJS += src/crypto/md4-internal.c
1388780fb4a2SCy Schubertendif
1389780fb4a2SCy Schubertendif
1390780fb4a2SCy Schubert
1391780fb4a2SCy SchubertDESOBJS = # none needed when not internal
1392780fb4a2SCy Schubertifdef NEED_DES
1393780fb4a2SCy Schubertifdef CONFIG_INTERNAL_DES
1394780fb4a2SCy SchubertDESOBJS += src/crypto/des-internal.c
1395780fb4a2SCy Schubertendif
1396780fb4a2SCy Schubertendif
1397780fb4a2SCy Schubert
1398780fb4a2SCy Schubertifdef CONFIG_NO_RC4
1399780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_NO_RC4
1400780fb4a2SCy Schubertendif
1401780fb4a2SCy Schubert
1402780fb4a2SCy Schubertifdef NEED_RC4
1403780fb4a2SCy Schubertifdef CONFIG_INTERNAL_RC4
1404780fb4a2SCy Schubertifndef CONFIG_NO_RC4
1405780fb4a2SCy SchubertOBJS += src/crypto/rc4.c
1406780fb4a2SCy Schubertendif
1407780fb4a2SCy Schubertendif
1408780fb4a2SCy Schubertendif
1409780fb4a2SCy Schubert
1410*a90b9d01SCy Schubertifdef CONFIG_SAE
1411*a90b9d01SCy Schubertifdef NEED_SHA384
1412*a90b9d01SCy Schubert# Need to add HMAC-SHA384 KDF as well, if SHA384 was enabled.
1413*a90b9d01SCy SchubertNEED_HMAC_SHA384_KDF=y
1414*a90b9d01SCy Schubertendif
1415*a90b9d01SCy Schubertifdef NEED_SHA512
1416*a90b9d01SCy Schubert# Need to add HMAC-SHA512 KDF as well, if SHA512 was enabled.
1417*a90b9d01SCy SchubertNEED_HMAC_SHA512_KDF=y
1418*a90b9d01SCy Schubertendif
1419*a90b9d01SCy Schubertendif
1420*a90b9d01SCy Schubert
1421780fb4a2SCy SchubertSHA256OBJS = # none by default
1422780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_SHA256
1423780fb4a2SCy Schubertifneq ($(CONFIG_TLS), openssl)
142485732ac8SCy Schubertifneq ($(CONFIG_TLS), gnutls)
1425780fb4a2SCy SchubertSHA256OBJS += src/crypto/sha256.c
1426780fb4a2SCy Schubertendif
142785732ac8SCy Schubertendif
1428780fb4a2SCy SchubertSHA256OBJS += src/crypto/sha256-prf.c
1429780fb4a2SCy Schubertifdef CONFIG_INTERNAL_SHA256
1430780fb4a2SCy SchubertSHA256OBJS += src/crypto/sha256-internal.c
1431780fb4a2SCy Schubertendif
1432780fb4a2SCy Schubertifdef CONFIG_INTERNAL_SHA384
1433780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_INTERNAL_SHA384
1434780fb4a2SCy SchubertSHA256OBJS += src/crypto/sha384-internal.c
1435780fb4a2SCy Schubertendif
1436780fb4a2SCy Schubertifdef CONFIG_INTERNAL_SHA512
1437780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_INTERNAL_SHA512
1438780fb4a2SCy SchubertSHA256OBJS += src/crypto/sha512-internal.c
1439780fb4a2SCy Schubertendif
1440780fb4a2SCy Schubertifdef NEED_TLS_PRF_SHA256
1441780fb4a2SCy SchubertSHA256OBJS += src/crypto/sha256-tlsprf.c
1442780fb4a2SCy Schubertendif
1443c1d255d3SCy Schubertifdef NEED_TLS_PRF_SHA384
1444c1d255d3SCy SchubertSHA256OBJS += src/crypto/sha384-tlsprf.c
1445c1d255d3SCy Schubertendif
1446780fb4a2SCy Schubertifdef NEED_HMAC_SHA256_KDF
1447780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_HMAC_SHA256_KDF
1448780fb4a2SCy SchubertSHA256OBJS += src/crypto/sha256-kdf.c
1449780fb4a2SCy Schubertendif
145085732ac8SCy Schubertifdef NEED_HMAC_SHA384_KDF
145185732ac8SCy SchubertL_CFLAGS += -DCONFIG_HMAC_SHA384_KDF
145285732ac8SCy SchubertSHA256OBJS += src/crypto/sha384-kdf.c
145385732ac8SCy Schubertendif
145485732ac8SCy Schubertifdef NEED_HMAC_SHA512_KDF
145585732ac8SCy SchubertL_CFLAGS += -DCONFIG_HMAC_SHA512_KDF
145685732ac8SCy SchubertSHA256OBJS += src/crypto/sha512-kdf.c
145785732ac8SCy Schubertendif
1458780fb4a2SCy SchubertOBJS += $(SHA256OBJS)
1459780fb4a2SCy Schubertifdef NEED_SHA384
1460780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_SHA384
146185732ac8SCy Schubertifneq ($(CONFIG_TLS), openssl)
146285732ac8SCy Schubertifneq ($(CONFIG_TLS), gnutls)
146385732ac8SCy SchubertOBJS += src/crypto/sha384.c
146485732ac8SCy Schubertendif
146585732ac8SCy Schubertendif
1466780fb4a2SCy SchubertOBJS += src/crypto/sha384-prf.c
1467780fb4a2SCy Schubertendif
146885732ac8SCy Schubertifdef NEED_SHA512
146985732ac8SCy SchubertL_CFLAGS += -DCONFIG_SHA512
147085732ac8SCy Schubertifneq ($(CONFIG_TLS), openssl)
147185732ac8SCy Schubertifneq ($(CONFIG_TLS), gnutls)
147285732ac8SCy SchubertOBJS += src/crypto/sha512.c
147385732ac8SCy Schubertendif
147485732ac8SCy Schubertendif
147585732ac8SCy SchubertOBJS += src/crypto/sha512-prf.c
147685732ac8SCy Schubertendif
1477780fb4a2SCy Schubert
1478c1d255d3SCy Schubertifdef NEED_ASN1
1479c1d255d3SCy SchubertOBJS += src/tls/asn1.c
1480c1d255d3SCy Schubertendif
1481c1d255d3SCy Schubert
1482780fb4a2SCy Schubertifdef NEED_DH_GROUPS
1483780fb4a2SCy SchubertOBJS += src/crypto/dh_groups.c
1484780fb4a2SCy Schubertendif
1485780fb4a2SCy Schubertifdef NEED_DH_GROUPS_ALL
1486780fb4a2SCy SchubertL_CFLAGS += -DALL_DH_GROUPS
1487780fb4a2SCy Schubertendif
1488780fb4a2SCy Schubertifdef CONFIG_INTERNAL_DH_GROUP5
1489780fb4a2SCy Schubertifdef NEED_DH_GROUPS
1490780fb4a2SCy SchubertOBJS += src/crypto/dh_group5.c
1491780fb4a2SCy Schubertendif
1492780fb4a2SCy Schubertendif
1493780fb4a2SCy Schubert
1494780fb4a2SCy Schubertifdef NEED_ECC
1495780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_ECC
1496780fb4a2SCy Schubertendif
1497780fb4a2SCy Schubert
1498780fb4a2SCy Schubertifdef CONFIG_NO_RANDOM_POOL
1499780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_NO_RANDOM_POOL
1500780fb4a2SCy Schubertelse
1501780fb4a2SCy SchubertOBJS += src/crypto/random.c
1502780fb4a2SCy Schubertendif
1503780fb4a2SCy Schubert
1504780fb4a2SCy Schubertifdef CONFIG_CTRL_IFACE
1505780fb4a2SCy Schubertifeq ($(CONFIG_CTRL_IFACE), y)
1506780fb4a2SCy Schubertifdef CONFIG_NATIVE_WINDOWS
1507780fb4a2SCy SchubertCONFIG_CTRL_IFACE=named_pipe
1508780fb4a2SCy Schubertelse
1509780fb4a2SCy SchubertCONFIG_CTRL_IFACE=unix
1510780fb4a2SCy Schubertendif
1511780fb4a2SCy Schubertendif
1512780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_CTRL_IFACE
1513780fb4a2SCy Schubertifeq ($(CONFIG_CTRL_IFACE), unix)
1514780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_CTRL_IFACE_UNIX
1515780fb4a2SCy SchubertOBJS += src/common/ctrl_iface_common.c
1516780fb4a2SCy Schubertendif
1517780fb4a2SCy Schubertifeq ($(CONFIG_CTRL_IFACE), udp)
1518780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_CTRL_IFACE_UDP
1519780fb4a2SCy Schubertendif
1520780fb4a2SCy Schubertifeq ($(CONFIG_CTRL_IFACE), named_pipe)
1521780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_CTRL_IFACE_NAMED_PIPE
1522780fb4a2SCy Schubertendif
1523780fb4a2SCy Schubertifeq ($(CONFIG_CTRL_IFACE), udp-remote)
1524780fb4a2SCy SchubertCONFIG_CTRL_IFACE=udp
1525780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_CTRL_IFACE_UDP
1526780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_CTRL_IFACE_UDP_REMOTE
1527780fb4a2SCy Schubertendif
1528780fb4a2SCy SchubertOBJS += ctrl_iface.c ctrl_iface_$(CONFIG_CTRL_IFACE).c
1529780fb4a2SCy Schubertendif
1530780fb4a2SCy Schubert
1531780fb4a2SCy Schubertifdef CONFIG_CTRL_IFACE_DBUS_NEW
15324bc52338SCy SchubertL_CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_NEW
15334bc52338SCy SchubertOBJS += dbus/dbus_dict_helpers.c
15344bc52338SCy SchubertOBJS += dbus/dbus_new_helpers.c
15354bc52338SCy SchubertOBJS += dbus/dbus_new.c dbus/dbus_new_handlers.c
15364bc52338SCy SchubertOBJS += dbus/dbus_common.c
1537780fb4a2SCy Schubertifdef CONFIG_WPS
15384bc52338SCy SchubertOBJS += dbus/dbus_new_handlers_wps.c
1539780fb4a2SCy Schubertendif
1540780fb4a2SCy Schubertifdef CONFIG_P2P
15414bc52338SCy SchubertOBJS += dbus/dbus_new_handlers_p2p.c
1542780fb4a2SCy Schubertendif
1543780fb4a2SCy Schubertifdef CONFIG_CTRL_IFACE_DBUS_INTRO
15444bc52338SCy SchubertOBJS += dbus/dbus_new_introspect.c
15454bc52338SCy SchubertL_CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_INTRO
1546780fb4a2SCy Schubertendif
15474bc52338SCy SchubertL_CFLAGS += $(DBUS_INCLUDE)
1548780fb4a2SCy Schubertendif
1549780fb4a2SCy Schubert
1550780fb4a2SCy Schubertifdef CONFIG_CTRL_IFACE_BINDER
1551780fb4a2SCy SchubertWPA_SUPPLICANT_USE_BINDER=y
1552780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_BINDER -DCONFIG_CTRL_IFACE_BINDER
1553780fb4a2SCy Schubertendif
1554780fb4a2SCy Schubert
1555780fb4a2SCy Schubertifdef CONFIG_READLINE
1556780fb4a2SCy SchubertOBJS_c += src/utils/edit_readline.c
1557780fb4a2SCy SchubertLIBS_c += -lncurses -lreadline
1558780fb4a2SCy Schubertelse
1559780fb4a2SCy Schubertifdef CONFIG_WPA_CLI_EDIT
1560780fb4a2SCy SchubertOBJS_c += src/utils/edit.c
1561780fb4a2SCy Schubertelse
1562780fb4a2SCy SchubertOBJS_c += src/utils/edit_simple.c
1563780fb4a2SCy Schubertendif
1564780fb4a2SCy Schubertendif
1565780fb4a2SCy Schubert
1566780fb4a2SCy Schubertifdef CONFIG_NATIVE_WINDOWS
1567780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_NATIVE_WINDOWS
1568780fb4a2SCy SchubertLIBS += -lws2_32 -lgdi32 -lcrypt32
1569780fb4a2SCy SchubertLIBS_c += -lws2_32
1570780fb4a2SCy SchubertLIBS_p += -lws2_32 -lgdi32
1571780fb4a2SCy Schubertifeq ($(CONFIG_CRYPTO), cryptoapi)
1572780fb4a2SCy SchubertLIBS_p += -lcrypt32
1573780fb4a2SCy Schubertendif
1574780fb4a2SCy Schubertendif
1575780fb4a2SCy Schubert
1576780fb4a2SCy Schubertifdef CONFIG_NO_STDOUT_DEBUG
1577780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_NO_STDOUT_DEBUG
1578780fb4a2SCy Schubertifndef CONFIG_CTRL_IFACE
1579780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_NO_WPA_MSG
1580780fb4a2SCy Schubertendif
1581780fb4a2SCy Schubertendif
1582780fb4a2SCy Schubert
1583780fb4a2SCy Schubertifdef CONFIG_ANDROID_LOG
1584780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_ANDROID_LOG
1585780fb4a2SCy Schubertendif
1586780fb4a2SCy Schubert
1587780fb4a2SCy Schubertifdef CONFIG_IPV6
1588780fb4a2SCy Schubert# for eapol_test only
1589780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_IPV6
1590780fb4a2SCy Schubertendif
1591780fb4a2SCy Schubert
1592780fb4a2SCy Schubertifdef NEED_BASE64
1593780fb4a2SCy SchubertOBJS += src/utils/base64.c
1594780fb4a2SCy Schubertendif
1595780fb4a2SCy Schubert
1596780fb4a2SCy Schubertifdef NEED_SME
1597780fb4a2SCy SchubertOBJS += sme.c
1598780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_SME
1599780fb4a2SCy Schubertendif
1600780fb4a2SCy Schubert
1601780fb4a2SCy SchubertOBJS += src/common/ieee802_11_common.c
1602780fb4a2SCy SchubertOBJS += src/common/hw_features_common.c
1603780fb4a2SCy Schubert
1604780fb4a2SCy Schubertifdef NEED_EAP_COMMON
1605780fb4a2SCy SchubertOBJS += src/eap_common/eap_common.c
1606780fb4a2SCy Schubertendif
1607780fb4a2SCy Schubert
1608780fb4a2SCy Schubertifndef CONFIG_MAIN
1609780fb4a2SCy SchubertCONFIG_MAIN=main
1610780fb4a2SCy Schubertendif
1611780fb4a2SCy Schubert
1612780fb4a2SCy Schubertifdef CONFIG_DEBUG_SYSLOG
1613780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_DEBUG_SYSLOG
1614780fb4a2SCy Schubertifdef CONFIG_DEBUG_SYSLOG_FACILITY
1615780fb4a2SCy SchubertL_CFLAGS += -DLOG_HOSTAPD="$(CONFIG_DEBUG_SYSLOG_FACILITY)"
1616780fb4a2SCy Schubertendif
1617780fb4a2SCy Schubertendif
1618780fb4a2SCy Schubert
1619780fb4a2SCy Schubertifdef CONFIG_DEBUG_LINUX_TRACING
1620780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_DEBUG_LINUX_TRACING
1621780fb4a2SCy Schubertendif
1622780fb4a2SCy Schubert
1623780fb4a2SCy Schubertifdef CONFIG_DEBUG_FILE
1624780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_DEBUG_FILE
1625780fb4a2SCy Schubertendif
1626780fb4a2SCy Schubert
1627780fb4a2SCy Schubertifdef CONFIG_DELAYED_MIC_ERROR_REPORT
1628780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_DELAYED_MIC_ERROR_REPORT
1629780fb4a2SCy Schubertendif
1630780fb4a2SCy Schubert
1631780fb4a2SCy Schubertifdef CONFIG_FIPS
1632780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_FIPS
1633780fb4a2SCy Schubertendif
1634780fb4a2SCy Schubert
1635780fb4a2SCy SchubertOBJS += $(SHA1OBJS) $(DESOBJS)
1636780fb4a2SCy Schubert
1637780fb4a2SCy SchubertOBJS_p += $(SHA1OBJS)
1638780fb4a2SCy SchubertOBJS_p += $(SHA256OBJS)
1639780fb4a2SCy Schubert
1640780fb4a2SCy Schubertifdef CONFIG_BGSCAN_SIMPLE
1641780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_BGSCAN_SIMPLE
1642780fb4a2SCy SchubertOBJS += bgscan_simple.c
1643780fb4a2SCy SchubertNEED_BGSCAN=y
1644780fb4a2SCy Schubertendif
1645780fb4a2SCy Schubert
1646780fb4a2SCy Schubertifdef CONFIG_BGSCAN_LEARN
1647780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_BGSCAN_LEARN
1648780fb4a2SCy SchubertOBJS += bgscan_learn.c
1649780fb4a2SCy SchubertNEED_BGSCAN=y
1650780fb4a2SCy Schubertendif
1651780fb4a2SCy Schubert
1652780fb4a2SCy Schubertifdef NEED_BGSCAN
1653780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_BGSCAN
1654780fb4a2SCy SchubertOBJS += bgscan.c
1655780fb4a2SCy Schubertendif
1656780fb4a2SCy Schubert
1657780fb4a2SCy Schubertifdef CONFIG_AUTOSCAN_EXPONENTIAL
1658780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_AUTOSCAN_EXPONENTIAL
1659780fb4a2SCy SchubertOBJS += autoscan_exponential.c
1660780fb4a2SCy SchubertNEED_AUTOSCAN=y
1661780fb4a2SCy Schubertendif
1662780fb4a2SCy Schubert
1663780fb4a2SCy Schubertifdef CONFIG_AUTOSCAN_PERIODIC
1664780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_AUTOSCAN_PERIODIC
1665780fb4a2SCy SchubertOBJS += autoscan_periodic.c
1666780fb4a2SCy SchubertNEED_AUTOSCAN=y
1667780fb4a2SCy Schubertendif
1668780fb4a2SCy Schubert
1669780fb4a2SCy Schubertifdef NEED_AUTOSCAN
1670780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_AUTOSCAN
1671780fb4a2SCy SchubertOBJS += autoscan.c
1672780fb4a2SCy Schubertendif
1673780fb4a2SCy Schubert
1674780fb4a2SCy Schubertifdef CONFIG_EXT_PASSWORD_TEST
1675780fb4a2SCy SchubertOBJS += src/utils/ext_password_test.c
1676780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_EXT_PASSWORD_TEST
1677780fb4a2SCy SchubertNEED_EXT_PASSWORD=y
1678780fb4a2SCy Schubertendif
1679780fb4a2SCy Schubert
1680c1d255d3SCy Schubertifdef CONFIG_EXT_PASSWORD_FILE
1681c1d255d3SCy SchubertOBJS += src/utils/ext_password_file.c
1682c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_EXT_PASSWORD_FILE
1683c1d255d3SCy SchubertNEED_EXT_PASSWORD=y
1684c1d255d3SCy Schubertendif
1685c1d255d3SCy Schubert
1686780fb4a2SCy Schubertifdef NEED_EXT_PASSWORD
1687780fb4a2SCy SchubertOBJS += src/utils/ext_password.c
1688780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_EXT_PASSWORD
1689780fb4a2SCy Schubertendif
1690780fb4a2SCy Schubert
169185732ac8SCy Schubertifdef NEED_GAS_SERVER
169285732ac8SCy SchubertOBJS += src/common/gas_server.c
169385732ac8SCy SchubertL_CFLAGS += -DCONFIG_GAS_SERVER
169485732ac8SCy SchubertNEED_GAS=y
169585732ac8SCy Schubertendif
169685732ac8SCy Schubert
1697780fb4a2SCy Schubertifdef NEED_GAS
1698780fb4a2SCy SchubertOBJS += src/common/gas.c
1699780fb4a2SCy SchubertOBJS += gas_query.c
1700780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_GAS
1701780fb4a2SCy SchubertNEED_OFFCHANNEL=y
1702780fb4a2SCy Schubertendif
1703780fb4a2SCy Schubert
1704780fb4a2SCy Schubertifdef NEED_OFFCHANNEL
1705780fb4a2SCy SchubertOBJS += offchannel.c
1706780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_OFFCHANNEL
1707780fb4a2SCy Schubertendif
1708780fb4a2SCy Schubert
170985732ac8SCy Schubertifdef NEED_JSON
171085732ac8SCy SchubertOBJS += src/utils/json.c
171185732ac8SCy SchubertL_CFLAGS += -DCONFIG_JSON
171285732ac8SCy Schubertendif
171385732ac8SCy Schubert
1714780fb4a2SCy SchubertOBJS += src/drivers/driver_common.c
1715780fb4a2SCy Schubert
1716c1d255d3SCy SchubertOBJS += wpa_supplicant.c events.c bssid_ignore.c wpas_glue.c scan.c
1717780fb4a2SCy SchubertOBJS_t := $(OBJS) $(OBJS_l2) eapol_test.c
1718780fb4a2SCy SchubertOBJS_t += src/radius/radius_client.c
1719780fb4a2SCy SchubertOBJS_t += src/radius/radius.c
1720780fb4a2SCy SchubertOBJS_t2 := $(OBJS) $(OBJS_l2) preauth_test.c
1721780fb4a2SCy SchubertOBJS += $(CONFIG_MAIN).c
1722780fb4a2SCy Schubert
1723780fb4a2SCy Schubertifdef CONFIG_PRIVSEP
1724780fb4a2SCy SchubertOBJS_priv += $(OBJS_d) src/drivers/drivers.c
1725780fb4a2SCy SchubertOBJS_priv += $(OBJS_l2)
1726780fb4a2SCy SchubertOBJS_priv += src/utils/os_$(CONFIG_OS).c
1727780fb4a2SCy SchubertOBJS_priv += src/utils/$(CONFIG_ELOOP).c
1728780fb4a2SCy SchubertOBJS_priv += src/utils/common.c
1729780fb4a2SCy SchubertOBJS_priv += src/utils/wpa_debug.c
1730780fb4a2SCy SchubertOBJS_priv += src/utils/wpabuf.c
1731780fb4a2SCy SchubertOBJS_priv += wpa_priv.c
1732780fb4a2SCy Schubertifdef CONFIG_DRIVER_NL80211
1733780fb4a2SCy SchubertOBJS_priv += src/common/ieee802_11_common.c
1734780fb4a2SCy Schubertendif
1735780fb4a2SCy SchubertOBJS += src/l2_packet/l2_packet_privsep.c
1736780fb4a2SCy SchubertOBJS += src/drivers/driver_privsep.c
1737780fb4a2SCy SchubertEXTRA_progs += wpa_priv
1738780fb4a2SCy Schubertelse
1739780fb4a2SCy SchubertOBJS += $(OBJS_d) src/drivers/drivers.c
1740780fb4a2SCy SchubertOBJS += $(OBJS_l2)
1741780fb4a2SCy Schubertendif
1742780fb4a2SCy Schubert
1743780fb4a2SCy Schubertifdef CONFIG_NDIS_EVENTS_INTEGRATED
1744780fb4a2SCy SchubertL_CFLAGS += -DCONFIG_NDIS_EVENTS_INTEGRATED
1745780fb4a2SCy SchubertOBJS += src/drivers/ndis_events.c
1746780fb4a2SCy SchubertEXTRALIBS += -loleaut32 -lole32 -luuid
1747780fb4a2SCy Schubertifdef PLATFORMSDKLIB
1748780fb4a2SCy SchubertEXTRALIBS += $(PLATFORMSDKLIB)/WbemUuid.Lib
1749780fb4a2SCy Schubertelse
1750780fb4a2SCy SchubertEXTRALIBS += WbemUuid.Lib
1751780fb4a2SCy Schubertendif
1752780fb4a2SCy Schubertendif
1753780fb4a2SCy Schubert
1754780fb4a2SCy Schubertifndef LDO
1755780fb4a2SCy SchubertLDO=$(CC)
1756780fb4a2SCy Schubertendif
1757780fb4a2SCy Schubert
1758*a90b9d01SCy SchubertPASNOBJS =
1759*a90b9d01SCy SchubertPASNOBJS += src/utils/$(CONFIG_ELOOP).c
1760*a90b9d01SCy SchubertPASNOBJS += src/utils/wpa_debug.c
1761*a90b9d01SCy SchubertPASNOBJS += src/utils/wpabuf.c
1762*a90b9d01SCy SchubertPASNOBJS += src/utils/os_$(CONFIG_OS).c
1763*a90b9d01SCy SchubertPASNOBJS += src/utils/config.c
1764*a90b9d01SCy SchubertPASNOBJS += src/utils/common.c
1765*a90b9d01SCy Schubert
1766*a90b9d01SCy Schubertifdef NEED_BASE64
1767*a90b9d01SCy SchubertPASNOBJS += src/utils/base64.c
1768*a90b9d01SCy Schubertendif
1769*a90b9d01SCy Schubert
1770*a90b9d01SCy Schubertifdef CONFIG_WPA_TRACE
1771*a90b9d01SCy SchubertPASNOBJS += src/utils/trace.c
1772*a90b9d01SCy Schubertendif
1773*a90b9d01SCy Schubert
1774*a90b9d01SCy Schubertifdef CONFIG_EXT_PASSWORD_FILE
1775*a90b9d01SCy SchubertPASNOBJS += src/utils/ext_password_file.c
1776*a90b9d01SCy Schubertendif
1777*a90b9d01SCy Schubert
1778*a90b9d01SCy Schubertifdef CONFIG_EXT_PASSWORD_TEST
1779*a90b9d01SCy SchubertPASNOBJS += src/utils/ext_password_test.c
1780*a90b9d01SCy Schubertendif
1781*a90b9d01SCy Schubert
1782*a90b9d01SCy Schubertifdef NEED_EXT_PASSWORD
1783*a90b9d01SCy SchubertPASNOBJS += src/utils/ext_password.c
1784*a90b9d01SCy Schubertendif
1785*a90b9d01SCy Schubert
1786*a90b9d01SCy Schubertifdef CONFIG_SAE
1787*a90b9d01SCy SchubertPASNOBJS += src/common/sae.c
1788*a90b9d01SCy Schubertendif
1789*a90b9d01SCy Schubert
1790*a90b9d01SCy Schubertifdef CONFIG_SAE_PK
1791*a90b9d01SCy SchubertPASNOBJS += src/common/sae_pk.c
1792*a90b9d01SCy Schubertendif
1793*a90b9d01SCy Schubert
1794*a90b9d01SCy Schubertifndef CONFIG_NO_WPA
1795*a90b9d01SCy SchubertPASNOBJS += src/common/wpa_common.c
1796*a90b9d01SCy Schubertendif
1797*a90b9d01SCy Schubert
1798*a90b9d01SCy SchubertPASNOBJS += src/common/ieee802_11_common.c
1799*a90b9d01SCy Schubert
1800*a90b9d01SCy Schubertifdef NEED_DRAGONFLY
1801*a90b9d01SCy SchubertPASNOBJS += src/common/dragonfly.c
1802*a90b9d01SCy Schubertendif
1803*a90b9d01SCy Schubert
1804*a90b9d01SCy SchubertPASNOBJS += src/common/ptksa_cache.c
1805*a90b9d01SCy Schubert
1806*a90b9d01SCy SchubertPASNOBJS += src/rsn_supp/pmksa_cache.c
1807*a90b9d01SCy Schubert
1808*a90b9d01SCy Schubertifndef CONFIG_NO_WPA
1809*a90b9d01SCy SchubertPASNOBJS += src/rsn_supp/wpa_ie.c
1810*a90b9d01SCy Schubertendif
1811*a90b9d01SCy Schubert
1812*a90b9d01SCy SchubertPASNOBJS += src/ap/comeback_token.c
1813*a90b9d01SCy SchubertPASNOBJS += src/ap/pmksa_cache_auth.c
1814*a90b9d01SCy Schubert
1815*a90b9d01SCy Schubertifdef NEED_EAP_COMMON
1816*a90b9d01SCy SchubertPASNOBJS += src/eap_common/eap_common.c
1817*a90b9d01SCy Schubertendif
1818*a90b9d01SCy Schubert
1819*a90b9d01SCy Schubertifdef CHAP
1820*a90b9d01SCy SchubertPASNOBJS += src/eap_common/chap.c
1821*a90b9d01SCy Schubertendif
1822*a90b9d01SCy Schubert
1823*a90b9d01SCy Schubertifdef CONFIG_IEEE8021X_EAPOL
1824*a90b9d01SCy SchubertPASNOBJS += src/eap_peer/eap.c
1825*a90b9d01SCy SchubertPASNOBJS += src/eap_peer/eap_methods.c
1826*a90b9d01SCy SchubertPASNOBJS += src/eapol_supp/eapol_supp_sm.c
1827*a90b9d01SCy Schubertendif
1828*a90b9d01SCy Schubert
1829*a90b9d01SCy Schubertifeq ($(CONFIG_TLS), openssl)
1830*a90b9d01SCy SchubertPASNOBJS += src/crypto/crypto_openssl.c
1831*a90b9d01SCy Schubertifdef TLS_FUNCS
1832*a90b9d01SCy SchubertPASNOBJS += src/crypto/tls_openssl.c
1833*a90b9d01SCy SchubertPASNOBJS += -lssl -lcrypto
1834*a90b9d01SCy SchubertNEED_TLS_PRF_SHA256=y
1835*a90b9d01SCy Schubertendif
1836*a90b9d01SCy Schubertendif
1837*a90b9d01SCy Schubert
1838*a90b9d01SCy Schubertifeq ($(CONFIG_TLS), gnutls)
1839*a90b9d01SCy SchubertPASNOBJS += src/crypto/crypto_$(CONFIG_CRYPTO).c
1840*a90b9d01SCy Schubertifdef TLS_FUNCS
1841*a90b9d01SCy SchubertPASNOBJS += src/crypto/tls_gnutls.c
1842*a90b9d01SCy SchubertPASNOBJS += -lgnutls -lgpg-error
1843*a90b9d01SCy SchubertPASNOBJS += -lgcrypt
1844*a90b9d01SCy Schubertendif
1845*a90b9d01SCy Schubertendif
1846*a90b9d01SCy Schubert
1847*a90b9d01SCy Schubertifdef NEED_TLS_PRF_SHA256
1848*a90b9d01SCy SchubertPASNOBJS += src/crypto/sha256-tlsprf.c
1849*a90b9d01SCy Schubertendif
1850*a90b9d01SCy Schubert
1851*a90b9d01SCy Schubertifdef NEED_SHA512
1852*a90b9d01SCy SchubertPASNOBJS += src/crypto/sha512-prf.c
1853*a90b9d01SCy Schubertendif
1854*a90b9d01SCy Schubert
1855*a90b9d01SCy Schubertifdef NEED_SHA384
1856*a90b9d01SCy SchubertPASNOBJS += src/crypto/sha384-prf.c
1857*a90b9d01SCy Schubertendif
1858*a90b9d01SCy Schubert
1859*a90b9d01SCy SchubertPASNOBJS += src/crypto/sha256-prf.c
1860*a90b9d01SCy Schubert
1861*a90b9d01SCy Schubertifdef NEED_HMAC_SHA512_KDF
1862*a90b9d01SCy SchubertPASNOBJS += src/crypto/sha512-kdf.c
1863*a90b9d01SCy Schubertendif
1864*a90b9d01SCy Schubert
1865*a90b9d01SCy Schubertifdef NEED_HMAC_SHA384_KDF
1866*a90b9d01SCy SchubertPASNOBJS += src/crypto/sha384-kdf.c
1867*a90b9d01SCy Schubertendif
1868*a90b9d01SCy Schubert
1869*a90b9d01SCy Schubertifdef NEED_HMAC_SHA256_KDF
1870*a90b9d01SCy SchubertPASNOBJS += src/crypto/sha256-kdf.c
1871*a90b9d01SCy Schubertendif
1872*a90b9d01SCy Schubert
1873*a90b9d01SCy Schubertifdef NEED_DH_GROUPS
1874*a90b9d01SCy SchubertPASNOBJS += src/crypto/dh_groups.c
1875*a90b9d01SCy Schubertendif
1876*a90b9d01SCy Schubert
1877*a90b9d01SCy Schubertifdef NEED_AES_SIV
1878*a90b9d01SCy SchubertPASNOBJS += src/crypto/aes-siv.c
1879*a90b9d01SCy Schubertendif
1880*a90b9d01SCy Schubert
1881*a90b9d01SCy Schubertifdef NEED_AES_CTR
1882*a90b9d01SCy SchubertPASNOBJS += src/crypto/aes-ctr.c
1883*a90b9d01SCy Schubertendif
1884*a90b9d01SCy Schubert
1885*a90b9d01SCy Schubertifdef NEED_SHA1
1886*a90b9d01SCy SchubertPASNOBJS += src/crypto/sha1-prf.c
1887*a90b9d01SCy Schubertifdef NEED_TLS_PRF
1888*a90b9d01SCy SchubertPASNOBJS += src/crypto/sha1-tlsprf.c
1889*a90b9d01SCy Schubertendif
1890*a90b9d01SCy Schubertendif
1891*a90b9d01SCy Schubert
1892*a90b9d01SCy SchubertPASNOBJS += src/pasn/pasn_initiator.c
1893*a90b9d01SCy SchubertPASNOBJS += src/pasn/pasn_responder.c
1894*a90b9d01SCy SchubertPASNOBJS += src/pasn/pasn_common.c
1895*a90b9d01SCy Schubert
1896780fb4a2SCy Schubert########################
1897780fb4a2SCy Schubert
1898780fb4a2SCy Schubertinclude $(CLEAR_VARS)
1899780fb4a2SCy SchubertLOCAL_MODULE := wpa_cli
1900780fb4a2SCy SchubertLOCAL_MODULE_TAGS := debug
1901780fb4a2SCy SchubertLOCAL_SHARED_LIBRARIES := libc libcutils liblog
1902780fb4a2SCy SchubertLOCAL_CFLAGS := $(L_CFLAGS)
1903780fb4a2SCy SchubertLOCAL_SRC_FILES := $(OBJS_c)
1904780fb4a2SCy SchubertLOCAL_C_INCLUDES := $(INCLUDES)
1905780fb4a2SCy Schubertinclude $(BUILD_EXECUTABLE)
1906780fb4a2SCy Schubert
1907780fb4a2SCy Schubert########################
1908780fb4a2SCy Schubertinclude $(CLEAR_VARS)
1909780fb4a2SCy SchubertLOCAL_MODULE := wpa_supplicant
1910780fb4a2SCy Schubertifdef CONFIG_DRIVER_CUSTOM
1911780fb4a2SCy SchubertLOCAL_STATIC_LIBRARIES := libCustomWifi
1912780fb4a2SCy Schubertendif
1913780fb4a2SCy Schubertifneq ($(BOARD_WPA_SUPPLICANT_PRIVATE_LIB),)
1914780fb4a2SCy SchubertLOCAL_STATIC_LIBRARIES += $(BOARD_WPA_SUPPLICANT_PRIVATE_LIB)
1915780fb4a2SCy Schubertendif
1916780fb4a2SCy SchubertLOCAL_SHARED_LIBRARIES := libc libcutils liblog
1917780fb4a2SCy Schubertifdef CONFIG_EAP_PROXY
1918780fb4a2SCy SchubertLOCAL_STATIC_LIBRARIES += $(LIB_STATIC_EAP_PROXY)
1919780fb4a2SCy SchubertLOCAL_SHARED_LIBRARIES += $(LIB_SHARED_EAP_PROXY)
1920780fb4a2SCy Schubertendif
1921780fb4a2SCy Schubertifeq ($(CONFIG_TLS), openssl)
1922780fb4a2SCy SchubertLOCAL_SHARED_LIBRARIES += libcrypto libssl libkeystore_binder
1923780fb4a2SCy Schubertendif
1924780fb4a2SCy Schubert
1925780fb4a2SCy Schubert# With BoringSSL we need libkeystore-engine in order to provide access to
1926780fb4a2SCy Schubert# keystore keys.
1927780fb4a2SCy SchubertLOCAL_SHARED_LIBRARIES += libkeystore-engine
1928780fb4a2SCy Schubert
1929780fb4a2SCy Schubertifdef CONFIG_DRIVER_NL80211
1930780fb4a2SCy Schubertifneq ($(wildcard external/libnl),)
1931780fb4a2SCy SchubertLOCAL_SHARED_LIBRARIES += libnl
1932780fb4a2SCy Schubertelse
1933780fb4a2SCy SchubertLOCAL_STATIC_LIBRARIES += libnl_2
1934780fb4a2SCy Schubertendif
1935780fb4a2SCy Schubertendif
1936780fb4a2SCy SchubertLOCAL_CFLAGS := $(L_CFLAGS)
1937780fb4a2SCy SchubertLOCAL_SRC_FILES := $(OBJS)
1938780fb4a2SCy SchubertLOCAL_C_INCLUDES := $(INCLUDES)
1939780fb4a2SCy Schubertifeq ($(DBUS), y)
1940780fb4a2SCy SchubertLOCAL_SHARED_LIBRARIES += libdbus
1941780fb4a2SCy Schubertendif
1942780fb4a2SCy Schubertifeq ($(WPA_SUPPLICANT_USE_BINDER), y)
1943780fb4a2SCy SchubertLOCAL_SHARED_LIBRARIES += libbinder libutils
1944780fb4a2SCy SchubertLOCAL_STATIC_LIBRARIES += libwpa_binder libwpa_binder_interface
1945780fb4a2SCy Schubertendif
1946780fb4a2SCy Schubertinclude $(BUILD_EXECUTABLE)
1947780fb4a2SCy Schubert
1948780fb4a2SCy Schubert########################
1949780fb4a2SCy Schubert#
1950780fb4a2SCy Schubert#include $(CLEAR_VARS)
1951780fb4a2SCy Schubert#LOCAL_MODULE := eapol_test
1952780fb4a2SCy Schubert#ifdef CONFIG_DRIVER_CUSTOM
1953780fb4a2SCy Schubert#LOCAL_STATIC_LIBRARIES := libCustomWifi
1954780fb4a2SCy Schubert#endif
1955780fb4a2SCy Schubert#LOCAL_SHARED_LIBRARIES := libc libcrypto libssl
1956780fb4a2SCy Schubert#LOCAL_CFLAGS := $(L_CFLAGS)
1957780fb4a2SCy Schubert#LOCAL_SRC_FILES := $(OBJS_t)
1958780fb4a2SCy Schubert#LOCAL_C_INCLUDES := $(INCLUDES)
1959780fb4a2SCy Schubert#include $(BUILD_EXECUTABLE)
1960780fb4a2SCy Schubert#
1961780fb4a2SCy Schubert########################
1962780fb4a2SCy Schubert#
1963780fb4a2SCy Schubert#local_target_dir := $(TARGET_OUT)/etc/wifi
1964780fb4a2SCy Schubert#
1965780fb4a2SCy Schubert#include $(CLEAR_VARS)
1966780fb4a2SCy Schubert#LOCAL_MODULE := wpa_supplicant.conf
1967780fb4a2SCy Schubert#LOCAL_MODULE_CLASS := ETC
1968780fb4a2SCy Schubert#LOCAL_MODULE_PATH := $(local_target_dir)
1969780fb4a2SCy Schubert#LOCAL_SRC_FILES := $(LOCAL_MODULE)
1970780fb4a2SCy Schubert#include $(BUILD_PREBUILT)
1971780fb4a2SCy Schubert#
1972780fb4a2SCy Schubert########################
1973780fb4a2SCy Schubert
1974780fb4a2SCy Schubertinclude $(CLEAR_VARS)
1975780fb4a2SCy SchubertLOCAL_MODULE = libwpa_client
1976780fb4a2SCy SchubertLOCAL_CFLAGS = $(L_CFLAGS)
1977780fb4a2SCy SchubertLOCAL_SRC_FILES = src/common/wpa_ctrl.c src/utils/os_$(CONFIG_OS).c
1978780fb4a2SCy SchubertLOCAL_C_INCLUDES = $(INCLUDES)
1979780fb4a2SCy SchubertLOCAL_SHARED_LIBRARIES := libcutils liblog
1980780fb4a2SCy SchubertLOCAL_COPY_HEADERS_TO := libwpa_client
1981780fb4a2SCy SchubertLOCAL_COPY_HEADERS := src/common/wpa_ctrl.h
1982780fb4a2SCy SchubertLOCAL_COPY_HEADERS += src/common/qca-vendor.h
1983780fb4a2SCy Schubertinclude $(BUILD_SHARED_LIBRARY)
1984780fb4a2SCy Schubert
1985780fb4a2SCy Schubertifeq ($(WPA_SUPPLICANT_USE_BINDER), y)
1986780fb4a2SCy Schubert### Binder interface library ###
1987780fb4a2SCy Schubert########################
1988780fb4a2SCy Schubert
1989780fb4a2SCy Schubertinclude $(CLEAR_VARS)
1990780fb4a2SCy SchubertLOCAL_MODULE := libwpa_binder_interface
1991780fb4a2SCy SchubertLOCAL_AIDL_INCLUDES := \
1992780fb4a2SCy Schubert    $(LOCAL_PATH)/binder \
1993780fb4a2SCy Schubert    frameworks/native/aidl/binder
1994780fb4a2SCy SchubertLOCAL_EXPORT_C_INCLUDE_DIRS := \
1995780fb4a2SCy Schubert    $(LOCAL_PATH)/binder
1996780fb4a2SCy SchubertLOCAL_CPPFLAGS := $(L_CPPFLAGS)
1997780fb4a2SCy SchubertLOCAL_SRC_FILES := \
1998780fb4a2SCy Schubert    binder/binder_constants.cpp \
1999780fb4a2SCy Schubert    binder/fi/w1/wpa_supplicant/ISupplicant.aidl \
2000780fb4a2SCy Schubert    binder/fi/w1/wpa_supplicant/ISupplicantCallbacks.aidl \
2001780fb4a2SCy Schubert    binder/fi/w1/wpa_supplicant/IIface.aidl
2002780fb4a2SCy SchubertLOCAL_SHARED_LIBRARIES := libbinder
2003780fb4a2SCy Schubertinclude $(BUILD_STATIC_LIBRARY)
2004780fb4a2SCy Schubert
2005780fb4a2SCy Schubert### Binder service library ###
2006780fb4a2SCy Schubert########################
2007780fb4a2SCy Schubert
2008780fb4a2SCy Schubertinclude $(CLEAR_VARS)
2009780fb4a2SCy SchubertLOCAL_MODULE := libwpa_binder
2010780fb4a2SCy SchubertLOCAL_CPPFLAGS := $(L_CPPFLAGS)
2011780fb4a2SCy SchubertLOCAL_CFLAGS := $(L_CFLAGS)
2012780fb4a2SCy SchubertLOCAL_C_INCLUDES := $(INCLUDES)
2013780fb4a2SCy SchubertLOCAL_SRC_FILES := \
2014780fb4a2SCy Schubert    binder/binder.cpp binder/binder_manager.cpp \
2015780fb4a2SCy Schubert    binder/supplicant.cpp binder/iface.cpp
2016780fb4a2SCy SchubertLOCAL_SHARED_LIBRARIES := \
2017780fb4a2SCy Schubert    libbinder \
2018780fb4a2SCy Schubert    libutils
2019780fb4a2SCy SchubertLOCAL_STATIC_LIBRARIES := libwpa_binder_interface
2020780fb4a2SCy Schubertinclude $(BUILD_STATIC_LIBRARY)
2021780fb4a2SCy Schubert
2022780fb4a2SCy Schubertendif # BINDER == y
2023*a90b9d01SCy Schubert
2024*a90b9d01SCy Schubertinclude $(CLEAR_VARS)
2025*a90b9d01SCy SchubertLOCAL_MODULE = libpasn
2026*a90b9d01SCy SchubertLOCAL_CFLAGS = $(L_CFLAGS)
2027*a90b9d01SCy SchubertLOCAL_SRC_FILES = $(PASNOBJS)
2028*a90b9d01SCy SchubertLOCAL_C_INCLUDES = $(INCLUDES)
2029*a90b9d01SCy SchubertLOCAL_SHARED_LIBRARIES := libc libcutils liblog
2030*a90b9d01SCy Schubertifeq ($(CONFIG_TLS), openssl)
2031*a90b9d01SCy SchubertLOCAL_SHARED_LIBRARIES := libcrypto libssl
2032*a90b9d01SCy Schubertendif
2033*a90b9d01SCy Schubertinclude $(BUILD_SHARED_LIBRARY)
2034