xref: /freebsd/contrib/wpa/hostapd/Android.mk (revision a90b9d0159070121c221b966469c3e36d912bf82)
1c1d255d3SCy Schubert# Copyright (C) 2008 The Android Open Source Project
2c1d255d3SCy Schubert#
3c1d255d3SCy Schubert# This software may be distributed under the terms of the BSD license.
4c1d255d3SCy Schubert# See README for more details.
5c1d255d3SCy Schubert#
6c1d255d3SCy Schubert
7c1d255d3SCy SchubertLOCAL_PATH := $(call my-dir)
8c1d255d3SCy Schubert
9c1d255d3SCy SchubertWPA_BUILD_HOSTAPD := false
10c1d255d3SCy Schubertifneq ($(BOARD_HOSTAPD_DRIVER),)
11c1d255d3SCy Schubert  WPA_BUILD_HOSTAPD := true
12c1d255d3SCy Schubert  CONFIG_DRIVER_$(BOARD_HOSTAPD_DRIVER) := y
13c1d255d3SCy Schubertendif
14c1d255d3SCy Schubert
15c1d255d3SCy Schubertifeq ($(WPA_BUILD_HOSTAPD),true)
16c1d255d3SCy Schubert
17c1d255d3SCy Schubertinclude $(LOCAL_PATH)/android.config
18c1d255d3SCy Schubert
19c1d255d3SCy Schubert# To ignore possible wrong network configurations
20c1d255d3SCy SchubertL_CFLAGS = -DWPA_IGNORE_CONFIG_ERRORS
21c1d255d3SCy Schubert
22c1d255d3SCy SchubertL_CFLAGS += -DVERSION_STR_POSTFIX=\"-$(PLATFORM_VERSION)\"
23c1d255d3SCy Schubert
24c1d255d3SCy Schubert# Set Android log name
25c1d255d3SCy SchubertL_CFLAGS += -DANDROID_LOG_NAME=\"hostapd\"
26c1d255d3SCy Schubert
27c1d255d3SCy Schubert# Disable unused parameter warnings
28c1d255d3SCy SchubertL_CFLAGS += -Wno-unused-parameter
29c1d255d3SCy Schubert
30c1d255d3SCy Schubert# Set Android extended P2P functionality
31c1d255d3SCy SchubertL_CFLAGS += -DANDROID_P2P
32c1d255d3SCy Schubert
33c1d255d3SCy Schubertifeq ($(BOARD_HOSTAPD_PRIVATE_LIB),)
34c1d255d3SCy SchubertL_CFLAGS += -DANDROID_LIB_STUB
35c1d255d3SCy Schubertendif
36c1d255d3SCy Schubert
37c1d255d3SCy Schubertifneq ($(BOARD_HOSTAPD_PRIVATE_LIB_EVENT),)
38c1d255d3SCy SchubertL_CFLAGS += -DANDROID_LIB_EVENT
39c1d255d3SCy Schubertendif
40c1d255d3SCy Schubert
41c1d255d3SCy Schubert# Use Android specific directory for control interface sockets
42c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_CTRL_IFACE_CLIENT_DIR=\"/data/misc/wifi/sockets\"
43c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_CTRL_IFACE_DIR=\"/data/system/hostapd\"
44c1d255d3SCy Schubert
45c1d255d3SCy Schubert# Use Android specific directory for hostapd_cli command completion history
46c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_HOSTAPD_CLI_HISTORY_DIR=\"/data/misc/wifi\"
47c1d255d3SCy Schubert
48c1d255d3SCy Schubert# To force sizeof(enum) = 4
49c1d255d3SCy Schubertifeq ($(TARGET_ARCH),arm)
50c1d255d3SCy SchubertL_CFLAGS += -mabi=aapcs-linux
51c1d255d3SCy Schubertendif
52c1d255d3SCy Schubert
53c1d255d3SCy SchubertINCLUDES = $(LOCAL_PATH)
54c1d255d3SCy SchubertINCLUDES += $(LOCAL_PATH)/src
55c1d255d3SCy SchubertINCLUDES += $(LOCAL_PATH)/src/utils
56c1d255d3SCy SchubertINCLUDES += system/security/keystore/include
57c1d255d3SCy Schubertifdef CONFIG_DRIVER_NL80211
58c1d255d3SCy Schubertifneq ($(wildcard external/libnl),)
59c1d255d3SCy SchubertINCLUDES += external/libnl/include
60c1d255d3SCy Schubertelse
61c1d255d3SCy SchubertINCLUDES += external/libnl-headers
62c1d255d3SCy Schubertendif
63c1d255d3SCy Schubertendif
64c1d255d3SCy Schubert
65c1d255d3SCy Schubert
66c1d255d3SCy Schubertifndef CONFIG_OS
67c1d255d3SCy Schubertifdef CONFIG_NATIVE_WINDOWS
68c1d255d3SCy SchubertCONFIG_OS=win32
69c1d255d3SCy Schubertelse
70c1d255d3SCy SchubertCONFIG_OS=unix
71c1d255d3SCy Schubertendif
72c1d255d3SCy Schubertendif
73c1d255d3SCy Schubert
74c1d255d3SCy Schubertifeq ($(CONFIG_OS), internal)
75c1d255d3SCy SchubertL_CFLAGS += -DOS_NO_C_LIB_DEFINES
76c1d255d3SCy Schubertendif
77c1d255d3SCy Schubert
78c1d255d3SCy Schubertifdef CONFIG_NATIVE_WINDOWS
79c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_NATIVE_WINDOWS
80c1d255d3SCy SchubertLIBS += -lws2_32
81c1d255d3SCy Schubertendif
82c1d255d3SCy Schubert
83c1d255d3SCy SchubertOBJS = main.c
84c1d255d3SCy SchubertOBJS += config_file.c
85c1d255d3SCy Schubert
86c1d255d3SCy SchubertOBJS += src/ap/hostapd.c
87c1d255d3SCy SchubertOBJS += src/ap/wpa_auth_glue.c
88c1d255d3SCy SchubertOBJS += src/ap/drv_callbacks.c
89c1d255d3SCy SchubertOBJS += src/ap/ap_drv_ops.c
90c1d255d3SCy SchubertOBJS += src/ap/utils.c
91c1d255d3SCy SchubertOBJS += src/ap/authsrv.c
92c1d255d3SCy SchubertOBJS += src/ap/ieee802_1x.c
93c1d255d3SCy SchubertOBJS += src/ap/ap_config.c
94c1d255d3SCy SchubertOBJS += src/ap/eap_user_db.c
95c1d255d3SCy SchubertOBJS += src/ap/ieee802_11_auth.c
96c1d255d3SCy SchubertOBJS += src/ap/sta_info.c
97c1d255d3SCy SchubertOBJS += src/ap/wpa_auth.c
98c1d255d3SCy SchubertOBJS += src/ap/tkip_countermeasures.c
99c1d255d3SCy SchubertOBJS += src/ap/ap_mlme.c
100c1d255d3SCy SchubertOBJS += src/ap/wpa_auth_ie.c
101c1d255d3SCy SchubertOBJS += src/ap/preauth_auth.c
102c1d255d3SCy SchubertOBJS += src/ap/pmksa_cache_auth.c
103c1d255d3SCy SchubertOBJS += src/ap/ieee802_11_shared.c
104c1d255d3SCy SchubertOBJS += src/ap/beacon.c
105c1d255d3SCy SchubertOBJS += src/ap/bss_load.c
106c1d255d3SCy SchubertOBJS += src/ap/neighbor_db.c
107c1d255d3SCy SchubertOBJS += src/ap/rrm.c
108c1d255d3SCy SchubertOBJS_d =
109c1d255d3SCy SchubertOBJS_p =
110c1d255d3SCy SchubertLIBS =
111c1d255d3SCy SchubertLIBS_c =
112c1d255d3SCy SchubertHOBJS =
113c1d255d3SCy SchubertLIBS_h =
114c1d255d3SCy Schubert
115c1d255d3SCy SchubertNEED_RC4=y
116c1d255d3SCy SchubertNEED_AES=y
117c1d255d3SCy SchubertNEED_MD5=y
118c1d255d3SCy SchubertNEED_SHA1=y
119c1d255d3SCy Schubert
120c1d255d3SCy SchubertOBJS += src/drivers/drivers.c
121c1d255d3SCy SchubertL_CFLAGS += -DHOSTAPD
122c1d255d3SCy Schubert
123c1d255d3SCy Schubertifdef CONFIG_WPA_TRACE
124c1d255d3SCy SchubertL_CFLAGS += -DWPA_TRACE
125c1d255d3SCy SchubertOBJS += src/utils/trace.c
126c1d255d3SCy SchubertHOBJS += src/utils/trace.c
127c1d255d3SCy SchubertLDFLAGS += -rdynamic
128c1d255d3SCy SchubertL_CFLAGS += -funwind-tables
129c1d255d3SCy Schubertifdef CONFIG_WPA_TRACE_BFD
130c1d255d3SCy SchubertL_CFLAGS += -DWPA_TRACE_BFD
131c1d255d3SCy SchubertLIBS += -lbfd
132c1d255d3SCy SchubertLIBS_c += -lbfd
133c1d255d3SCy SchubertLIBS_h += -lbfd
134c1d255d3SCy Schubertendif
135c1d255d3SCy Schubertendif
136c1d255d3SCy Schubert
137c1d255d3SCy SchubertOBJS += src/utils/eloop.c
138c1d255d3SCy Schubert
139c1d255d3SCy Schubertifdef CONFIG_ELOOP_POLL
140c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_ELOOP_POLL
141c1d255d3SCy Schubertendif
142c1d255d3SCy Schubert
143c1d255d3SCy Schubertifdef CONFIG_ELOOP_EPOLL
144c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_ELOOP_EPOLL
145c1d255d3SCy Schubertendif
146c1d255d3SCy Schubert
147c1d255d3SCy SchubertOBJS += src/utils/common.c
148c1d255d3SCy SchubertOBJS += src/utils/wpa_debug.c
149c1d255d3SCy SchubertOBJS += src/utils/wpabuf.c
150c1d255d3SCy SchubertOBJS += src/utils/os_$(CONFIG_OS).c
151c1d255d3SCy SchubertOBJS += src/utils/ip_addr.c
152c1d255d3SCy SchubertOBJS += src/utils/crc32.c
153c1d255d3SCy Schubert
154c1d255d3SCy SchubertOBJS += src/common/ieee802_11_common.c
155c1d255d3SCy SchubertOBJS += src/common/wpa_common.c
156c1d255d3SCy SchubertOBJS += src/common/hw_features_common.c
157*a90b9d01SCy SchubertOBJS += src/common/ptksa_cache.c
158c1d255d3SCy Schubert
159c1d255d3SCy SchubertOBJS += src/eapol_auth/eapol_auth_sm.c
160c1d255d3SCy Schubert
161c1d255d3SCy Schubert
162c1d255d3SCy Schubertifndef CONFIG_NO_DUMP_STATE
163c1d255d3SCy Schubert# define HOSTAPD_DUMP_STATE to include support for dumping internal state
164c1d255d3SCy Schubert# through control interface commands (undefine it, if you want to save in
165c1d255d3SCy Schubert# binary size)
166c1d255d3SCy SchubertL_CFLAGS += -DHOSTAPD_DUMP_STATE
167c1d255d3SCy SchubertOBJS += src/eapol_auth/eapol_auth_dump.c
168c1d255d3SCy Schubertendif
169c1d255d3SCy Schubert
170c1d255d3SCy Schubertifdef CONFIG_NO_RADIUS
171c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_NO_RADIUS
172c1d255d3SCy SchubertCONFIG_NO_ACCOUNTING=y
173c1d255d3SCy Schubertelse
174c1d255d3SCy SchubertOBJS += src/radius/radius.c
175c1d255d3SCy SchubertOBJS += src/radius/radius_client.c
176c1d255d3SCy SchubertOBJS += src/radius/radius_das.c
177c1d255d3SCy Schubertendif
178c1d255d3SCy Schubert
179c1d255d3SCy Schubertifdef CONFIG_NO_ACCOUNTING
180c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_NO_ACCOUNTING
181c1d255d3SCy Schubertelse
182c1d255d3SCy SchubertOBJS += src/ap/accounting.c
183c1d255d3SCy Schubertendif
184c1d255d3SCy Schubert
185c1d255d3SCy Schubertifdef CONFIG_NO_VLAN
186c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_NO_VLAN
187c1d255d3SCy Schubertelse
188c1d255d3SCy SchubertOBJS += src/ap/vlan_init.c
189c1d255d3SCy SchubertOBJS += src/ap/vlan_ifconfig.c
190c1d255d3SCy SchubertOBJS += src/ap/vlan.c
191c1d255d3SCy Schubertifdef CONFIG_FULL_DYNAMIC_VLAN
192c1d255d3SCy Schubert# Define CONFIG_FULL_DYNAMIC_VLAN to have hostapd manipulate bridges
193c1d255d3SCy Schubert# and VLAN interfaces for the VLAN feature.
194c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_FULL_DYNAMIC_VLAN
195c1d255d3SCy SchubertOBJS += src/ap/vlan_full.c
196c1d255d3SCy Schubertifdef CONFIG_VLAN_NETLINK
197c1d255d3SCy SchubertOBJS += src/ap/vlan_util.c
198c1d255d3SCy Schubertelse
199c1d255d3SCy SchubertOBJS += src/ap/vlan_ioctl.c
200c1d255d3SCy Schubertendif
201c1d255d3SCy Schubertendif
202c1d255d3SCy Schubertendif
203c1d255d3SCy Schubert
204c1d255d3SCy Schubertifdef CONFIG_NO_CTRL_IFACE
205c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_NO_CTRL_IFACE
206c1d255d3SCy Schubertelse
207c1d255d3SCy SchubertOBJS += src/common/ctrl_iface_common.c
208c1d255d3SCy SchubertOBJS += ctrl_iface.c
209c1d255d3SCy SchubertOBJS += src/ap/ctrl_iface_ap.c
210c1d255d3SCy Schubertendif
211c1d255d3SCy Schubert
212c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_CTRL_IFACE -DCONFIG_CTRL_IFACE_UNIX
213c1d255d3SCy Schubert
214c1d255d3SCy Schubertifdef CONFIG_RSN_PREAUTH
215c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_RSN_PREAUTH
216c1d255d3SCy SchubertCONFIG_L2_PACKET=y
217c1d255d3SCy Schubertendif
218c1d255d3SCy Schubert
219c1d255d3SCy Schubertifdef CONFIG_HS20
220c1d255d3SCy SchubertCONFIG_PROXYARP=y
221c1d255d3SCy Schubertendif
222c1d255d3SCy Schubert
223c1d255d3SCy Schubertifdef CONFIG_PROXYARP
224c1d255d3SCy SchubertCONFIG_L2_PACKET=y
225c1d255d3SCy Schubertendif
226c1d255d3SCy Schubert
227c1d255d3SCy Schubertifdef CONFIG_SUITEB
228c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_SUITEB
229c1d255d3SCy Schubertendif
230c1d255d3SCy Schubert
231c1d255d3SCy Schubertifdef CONFIG_SUITEB192
232c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_SUITEB192
233c1d255d3SCy SchubertNEED_SHA384=y
234c1d255d3SCy Schubertendif
235c1d255d3SCy Schubert
236c1d255d3SCy Schubertifdef CONFIG_OCV
237c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_OCV
238c1d255d3SCy SchubertOBJS += src/common/ocv.c
239c1d255d3SCy Schubertendif
240c1d255d3SCy Schubert
241*a90b9d01SCy SchubertNEED_AES_UNWRAP=y
242*a90b9d01SCy Schubert
243c1d255d3SCy Schubertifdef CONFIG_IEEE80211R
244c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_IEEE80211R -DCONFIG_IEEE80211R_AP
245c1d255d3SCy SchubertOBJS += src/ap/wpa_auth_ft.c
246c1d255d3SCy SchubertNEED_AES_UNWRAP=y
247c1d255d3SCy SchubertNEED_AES_SIV=y
248c1d255d3SCy SchubertNEED_ETH_P_OUI=y
249c1d255d3SCy SchubertNEED_HMAC_SHA256_KDF=y
250c1d255d3SCy Schubertendif
251c1d255d3SCy Schubert
252c1d255d3SCy Schubertifdef NEED_ETH_P_OUI
253c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_ETH_P_OUI
254c1d255d3SCy SchubertOBJS += src/ap/eth_p_oui.c
255c1d255d3SCy Schubertendif
256c1d255d3SCy Schubert
257c1d255d3SCy Schubertifdef CONFIG_SAE
258c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_SAE
259c1d255d3SCy SchubertOBJS += src/common/sae.c
260c1d255d3SCy Schubertifdef CONFIG_SAE_PK
261c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_SAE_PK
262*a90b9d01SCy SchubertNEED_AES_SIV=y
263c1d255d3SCy SchubertOBJS += src/common/sae_pk.c
264c1d255d3SCy Schubertendif
265c1d255d3SCy SchubertNEED_ECC=y
266c1d255d3SCy SchubertNEED_DH_GROUPS=y
267c1d255d3SCy SchubertNEED_HMAC_SHA256_KDF=y
268c1d255d3SCy SchubertNEED_DRAGONFLY=y
269c1d255d3SCy Schubertendif
270c1d255d3SCy Schubert
271c1d255d3SCy Schubertifdef CONFIG_OWE
272c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_OWE
273c1d255d3SCy SchubertNEED_ECC=y
274c1d255d3SCy SchubertNEED_HMAC_SHA256_KDF=y
275c1d255d3SCy SchubertNEED_HMAC_SHA384_KDF=y
276c1d255d3SCy SchubertNEED_HMAC_SHA512_KDF=y
277c1d255d3SCy SchubertNEED_SHA384=y
278c1d255d3SCy SchubertNEED_SHA512=y
279c1d255d3SCy Schubertendif
280c1d255d3SCy Schubert
281c1d255d3SCy Schubertifdef CONFIG_FILS
282c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_FILS
283c1d255d3SCy SchubertOBJS += src/ap/fils_hlp.c
284c1d255d3SCy SchubertNEED_SHA384=y
285c1d255d3SCy SchubertNEED_AES_SIV=y
286c1d255d3SCy Schubertifdef CONFIG_FILS_SK_PFS
287c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_FILS_SK_PFS
288c1d255d3SCy SchubertNEED_ECC=y
289c1d255d3SCy Schubertendif
290c1d255d3SCy Schubertendif
291c1d255d3SCy Schubert
292c1d255d3SCy Schubertifdef CONFIG_WNM
293c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_WNM -DCONFIG_WNM_AP
294c1d255d3SCy SchubertOBJS += src/ap/wnm_ap.c
295c1d255d3SCy Schubertendif
296c1d255d3SCy Schubert
297c1d255d3SCy Schubertifdef CONFIG_IEEE80211AC
298c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_IEEE80211AC
299c1d255d3SCy Schubertendif
300c1d255d3SCy Schubert
301*a90b9d01SCy Schubertifdef CONFIG_IEEE80211BE
302*a90b9d01SCy SchubertCONFIG_IEEE80211AX=y
303*a90b9d01SCy SchubertL_CFLAGS += -DCONFIG_IEEE80211BE
304*a90b9d01SCy SchubertOBJS += src/ap/ieee802_11_eht.c
305*a90b9d01SCy Schubertendif
306*a90b9d01SCy Schubert
307c1d255d3SCy Schubertifdef CONFIG_IEEE80211AX
308c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_IEEE80211AX
309c1d255d3SCy Schubertendif
310c1d255d3SCy Schubert
311c1d255d3SCy Schubertifdef CONFIG_MBO
312c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_MBO
313c1d255d3SCy SchubertOBJS += src/ap/mbo_ap.c
314c1d255d3SCy Schubertendif
315c1d255d3SCy Schubert
316c1d255d3SCy Schubertifdef CONFIG_FST
317c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_FST
318c1d255d3SCy SchubertOBJS += src/fst/fst.c
319c1d255d3SCy SchubertOBJS += src/fst/fst_group.c
320c1d255d3SCy SchubertOBJS += src/fst/fst_iface.c
321c1d255d3SCy SchubertOBJS += src/fst/fst_session.c
322c1d255d3SCy SchubertOBJS += src/fst/fst_ctrl_aux.c
323c1d255d3SCy Schubertifdef CONFIG_FST_TEST
324c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_FST_TEST
325c1d255d3SCy Schubertendif
326c1d255d3SCy Schubertifndef CONFIG_NO_CTRL_IFACE
327c1d255d3SCy SchubertOBJS += src/fst/fst_ctrl_iface.c
328c1d255d3SCy Schubertendif
329c1d255d3SCy Schubertendif
330c1d255d3SCy Schubert
331c1d255d3SCy Schubertifdef CONFIG_WEP
332c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_WEP
333c1d255d3SCy Schubertendif
334c1d255d3SCy Schubert
335c1d255d3SCy Schubertifdef CONFIG_NO_TKIP
336c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_NO_TKIP
337c1d255d3SCy Schubertendif
338c1d255d3SCy Schubert
339c1d255d3SCy Schubert
340c1d255d3SCy Schubertinclude $(LOCAL_PATH)/src/drivers/drivers.mk
341c1d255d3SCy Schubert
342c1d255d3SCy SchubertOBJS += $(DRV_AP_OBJS)
343c1d255d3SCy SchubertL_CFLAGS += $(DRV_AP_CFLAGS)
344c1d255d3SCy SchubertLDFLAGS += $(DRV_AP_LDFLAGS)
345c1d255d3SCy SchubertLIBS += $(DRV_AP_LIBS)
346c1d255d3SCy Schubert
347c1d255d3SCy Schubertifdef CONFIG_L2_PACKET
348c1d255d3SCy Schubertifdef CONFIG_DNET_PCAP
349c1d255d3SCy Schubertifdef CONFIG_L2_FREEBSD
350c1d255d3SCy SchubertLIBS += -lpcap
351c1d255d3SCy SchubertOBJS += src/l2_packet/l2_packet_freebsd.c
352c1d255d3SCy Schubertelse
353c1d255d3SCy SchubertLIBS += -ldnet -lpcap
354c1d255d3SCy SchubertOBJS += src/l2_packet/l2_packet_pcap.c
355c1d255d3SCy Schubertendif
356c1d255d3SCy Schubertelse
357c1d255d3SCy SchubertOBJS += src/l2_packet/l2_packet_linux.c
358c1d255d3SCy Schubertendif
359c1d255d3SCy Schubertelse
360c1d255d3SCy SchubertOBJS += src/l2_packet/l2_packet_none.c
361c1d255d3SCy Schubertendif
362c1d255d3SCy Schubert
363c1d255d3SCy Schubert
364c1d255d3SCy Schubertifdef CONFIG_EAP_MD5
365c1d255d3SCy SchubertL_CFLAGS += -DEAP_SERVER_MD5
366c1d255d3SCy SchubertOBJS += src/eap_server/eap_server_md5.c
367c1d255d3SCy SchubertCHAP=y
368c1d255d3SCy Schubertendif
369c1d255d3SCy Schubert
370c1d255d3SCy Schubertifdef CONFIG_EAP_TLS
371c1d255d3SCy SchubertL_CFLAGS += -DEAP_SERVER_TLS
372c1d255d3SCy SchubertOBJS += src/eap_server/eap_server_tls.c
373c1d255d3SCy SchubertTLS_FUNCS=y
374c1d255d3SCy Schubertendif
375c1d255d3SCy Schubert
376c1d255d3SCy Schubertifdef CONFIG_EAP_UNAUTH_TLS
377c1d255d3SCy SchubertL_CFLAGS += -DEAP_SERVER_UNAUTH_TLS
378c1d255d3SCy Schubertifndef CONFIG_EAP_TLS
379c1d255d3SCy SchubertOBJS += src/eap_server/eap_server_tls.c
380c1d255d3SCy SchubertTLS_FUNCS=y
381c1d255d3SCy Schubertendif
382c1d255d3SCy Schubertendif
383c1d255d3SCy Schubert
384c1d255d3SCy Schubertifdef CONFIG_EAP_PEAP
385c1d255d3SCy SchubertL_CFLAGS += -DEAP_SERVER_PEAP
386c1d255d3SCy SchubertOBJS += src/eap_server/eap_server_peap.c
387c1d255d3SCy SchubertOBJS += src/eap_common/eap_peap_common.c
388c1d255d3SCy SchubertTLS_FUNCS=y
389c1d255d3SCy SchubertCONFIG_EAP_MSCHAPV2=y
390c1d255d3SCy Schubertendif
391c1d255d3SCy Schubert
392c1d255d3SCy Schubertifdef CONFIG_EAP_TTLS
393c1d255d3SCy SchubertL_CFLAGS += -DEAP_SERVER_TTLS
394c1d255d3SCy SchubertOBJS += src/eap_server/eap_server_ttls.c
395c1d255d3SCy SchubertTLS_FUNCS=y
396c1d255d3SCy SchubertCHAP=y
397c1d255d3SCy Schubertendif
398c1d255d3SCy Schubert
399c1d255d3SCy Schubertifdef CONFIG_EAP_MSCHAPV2
400c1d255d3SCy SchubertL_CFLAGS += -DEAP_SERVER_MSCHAPV2
401c1d255d3SCy SchubertOBJS += src/eap_server/eap_server_mschapv2.c
402c1d255d3SCy SchubertMS_FUNCS=y
403c1d255d3SCy Schubertendif
404c1d255d3SCy Schubert
405c1d255d3SCy Schubertifdef CONFIG_EAP_GTC
406c1d255d3SCy SchubertL_CFLAGS += -DEAP_SERVER_GTC
407c1d255d3SCy SchubertOBJS += src/eap_server/eap_server_gtc.c
408c1d255d3SCy Schubertendif
409c1d255d3SCy Schubert
410c1d255d3SCy Schubertifdef CONFIG_EAP_SIM
411c1d255d3SCy SchubertL_CFLAGS += -DEAP_SERVER_SIM
412c1d255d3SCy SchubertOBJS += src/eap_server/eap_server_sim.c
413c1d255d3SCy SchubertCONFIG_EAP_SIM_COMMON=y
414c1d255d3SCy SchubertNEED_AES_CBC=y
415c1d255d3SCy Schubertendif
416c1d255d3SCy Schubert
417c1d255d3SCy Schubertifdef CONFIG_EAP_AKA
418c1d255d3SCy SchubertL_CFLAGS += -DEAP_SERVER_AKA
419c1d255d3SCy SchubertOBJS += src/eap_server/eap_server_aka.c
420c1d255d3SCy SchubertCONFIG_EAP_SIM_COMMON=y
421c1d255d3SCy SchubertNEED_AES_CBC=y
422c1d255d3SCy Schubertendif
423c1d255d3SCy Schubert
424c1d255d3SCy Schubertifdef CONFIG_EAP_AKA_PRIME
425c1d255d3SCy SchubertL_CFLAGS += -DEAP_SERVER_AKA_PRIME
426c1d255d3SCy Schubertendif
427c1d255d3SCy Schubert
428c1d255d3SCy Schubertifdef CONFIG_EAP_SIM_COMMON
429c1d255d3SCy SchubertOBJS += src/eap_common/eap_sim_common.c
430c1d255d3SCy Schubert# Example EAP-SIM/AKA interface for GSM/UMTS authentication. This can be
431c1d255d3SCy Schubert# replaced with another file implementing the interface specified in
432c1d255d3SCy Schubert# eap_sim_db.h.
433c1d255d3SCy SchubertOBJS += src/eap_server/eap_sim_db.c
434c1d255d3SCy SchubertNEED_FIPS186_2_PRF=y
435c1d255d3SCy Schubertendif
436c1d255d3SCy Schubert
437c1d255d3SCy Schubertifdef CONFIG_EAP_PAX
438c1d255d3SCy SchubertL_CFLAGS += -DEAP_SERVER_PAX
439c1d255d3SCy SchubertOBJS += src/eap_server/eap_server_pax.c src/eap_common/eap_pax_common.c
440c1d255d3SCy Schubertendif
441c1d255d3SCy Schubert
442c1d255d3SCy Schubertifdef CONFIG_EAP_PSK
443c1d255d3SCy SchubertL_CFLAGS += -DEAP_SERVER_PSK
444c1d255d3SCy SchubertOBJS += src/eap_server/eap_server_psk.c src/eap_common/eap_psk_common.c
445c1d255d3SCy SchubertNEED_AES_ENCBLOCK=y
446c1d255d3SCy SchubertNEED_AES_EAX=y
447c1d255d3SCy Schubertendif
448c1d255d3SCy Schubert
449c1d255d3SCy Schubertifdef CONFIG_EAP_SAKE
450c1d255d3SCy SchubertL_CFLAGS += -DEAP_SERVER_SAKE
451c1d255d3SCy SchubertOBJS += src/eap_server/eap_server_sake.c src/eap_common/eap_sake_common.c
452c1d255d3SCy Schubertendif
453c1d255d3SCy Schubert
454c1d255d3SCy Schubertifdef CONFIG_EAP_GPSK
455c1d255d3SCy SchubertL_CFLAGS += -DEAP_SERVER_GPSK
456c1d255d3SCy SchubertOBJS += src/eap_server/eap_server_gpsk.c src/eap_common/eap_gpsk_common.c
457c1d255d3SCy Schubertifdef CONFIG_EAP_GPSK_SHA256
458c1d255d3SCy SchubertL_CFLAGS += -DEAP_GPSK_SHA256
459c1d255d3SCy Schubertendif
460c1d255d3SCy Schubertendif
461c1d255d3SCy Schubert
462c1d255d3SCy Schubertifdef CONFIG_EAP_PWD
463c1d255d3SCy SchubertL_CFLAGS += -DEAP_SERVER_PWD
464c1d255d3SCy SchubertOBJS += src/eap_server/eap_server_pwd.c src/eap_common/eap_pwd_common.c
465c1d255d3SCy SchubertNEED_ECC=y
466c1d255d3SCy SchubertNEED_DRAGONFLY=y
467c1d255d3SCy Schubertendif
468c1d255d3SCy Schubert
469c1d255d3SCy Schubertifdef CONFIG_EAP_EKE
470c1d255d3SCy SchubertL_CFLAGS += -DEAP_SERVER_EKE
471c1d255d3SCy SchubertOBJS += src/eap_server/eap_server_eke.c src/eap_common/eap_eke_common.c
472c1d255d3SCy SchubertNEED_DH_GROUPS=y
473c1d255d3SCy SchubertNEED_DH_GROUPS_ALL=y
474c1d255d3SCy Schubertendif
475c1d255d3SCy Schubert
476c1d255d3SCy Schubertifdef CONFIG_EAP_VENDOR_TEST
477c1d255d3SCy SchubertL_CFLAGS += -DEAP_SERVER_VENDOR_TEST
478c1d255d3SCy SchubertOBJS += src/eap_server/eap_server_vendor_test.c
479c1d255d3SCy Schubertendif
480c1d255d3SCy Schubert
481c1d255d3SCy Schubertifdef CONFIG_EAP_FAST
482c1d255d3SCy SchubertL_CFLAGS += -DEAP_SERVER_FAST
483c1d255d3SCy SchubertOBJS += src/eap_server/eap_server_fast.c
484c1d255d3SCy SchubertOBJS += src/eap_common/eap_fast_common.c
485c1d255d3SCy SchubertTLS_FUNCS=y
486c1d255d3SCy SchubertNEED_T_PRF=y
487c1d255d3SCy SchubertNEED_AES_UNWRAP=y
488c1d255d3SCy Schubertendif
489c1d255d3SCy Schubert
490c1d255d3SCy Schubertifdef CONFIG_EAP_TEAP
491c1d255d3SCy SchubertL_CFLAGS += -DEAP_SERVER_TEAP
492c1d255d3SCy SchubertOBJS += src/eap_server/eap_server_teap.c
493c1d255d3SCy SchubertOBJS += src/eap_common/eap_teap_common.c
494c1d255d3SCy SchubertTLS_FUNCS=y
495c1d255d3SCy SchubertNEED_T_PRF=y
496c1d255d3SCy SchubertNEED_SHA384=y
497c1d255d3SCy SchubertNEED_TLS_PRF_SHA256=y
498c1d255d3SCy SchubertNEED_TLS_PRF_SHA384=y
499c1d255d3SCy SchubertNEED_AES_UNWRAP=y
500c1d255d3SCy Schubertendif
501c1d255d3SCy Schubert
502c1d255d3SCy Schubertifdef CONFIG_WPS
503c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_WPS -DEAP_SERVER_WSC
504c1d255d3SCy SchubertOBJS += src/utils/uuid.c
505c1d255d3SCy SchubertOBJS += src/ap/wps_hostapd.c
506c1d255d3SCy SchubertOBJS += src/eap_server/eap_server_wsc.c src/eap_common/eap_wsc_common.c
507c1d255d3SCy SchubertOBJS += src/wps/wps.c
508c1d255d3SCy SchubertOBJS += src/wps/wps_common.c
509c1d255d3SCy SchubertOBJS += src/wps/wps_attr_parse.c
510c1d255d3SCy SchubertOBJS += src/wps/wps_attr_build.c
511c1d255d3SCy SchubertOBJS += src/wps/wps_attr_process.c
512c1d255d3SCy SchubertOBJS += src/wps/wps_dev_attr.c
513c1d255d3SCy SchubertOBJS += src/wps/wps_enrollee.c
514c1d255d3SCy SchubertOBJS += src/wps/wps_registrar.c
515c1d255d3SCy SchubertNEED_DH_GROUPS=y
516c1d255d3SCy SchubertNEED_BASE64=y
517c1d255d3SCy SchubertNEED_AES_CBC=y
518c1d255d3SCy SchubertNEED_MODEXP=y
519c1d255d3SCy SchubertCONFIG_EAP=y
520c1d255d3SCy Schubert
521c1d255d3SCy Schubertifdef CONFIG_WPS_NFC
522c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_WPS_NFC
523c1d255d3SCy SchubertOBJS += src/wps/ndef.c
524c1d255d3SCy SchubertNEED_WPS_OOB=y
525c1d255d3SCy Schubertendif
526c1d255d3SCy Schubert
527c1d255d3SCy Schubertifdef NEED_WPS_OOB
528c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_WPS_OOB
529c1d255d3SCy Schubertendif
530c1d255d3SCy Schubert
531c1d255d3SCy Schubertifdef CONFIG_WPS_UPNP
532c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_WPS_UPNP
533c1d255d3SCy SchubertOBJS += src/wps/wps_upnp.c
534c1d255d3SCy SchubertOBJS += src/wps/wps_upnp_ssdp.c
535c1d255d3SCy SchubertOBJS += src/wps/wps_upnp_web.c
536c1d255d3SCy SchubertOBJS += src/wps/wps_upnp_event.c
537c1d255d3SCy SchubertOBJS += src/wps/wps_upnp_ap.c
538c1d255d3SCy SchubertOBJS += src/wps/upnp_xml.c
539c1d255d3SCy SchubertOBJS += src/wps/httpread.c
540c1d255d3SCy SchubertOBJS += src/wps/http_client.c
541c1d255d3SCy SchubertOBJS += src/wps/http_server.c
542c1d255d3SCy Schubertendif
543c1d255d3SCy Schubert
544c1d255d3SCy Schubertifdef CONFIG_WPS_STRICT
545c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_WPS_STRICT
546c1d255d3SCy SchubertOBJS += src/wps/wps_validate.c
547c1d255d3SCy Schubertendif
548c1d255d3SCy Schubert
549c1d255d3SCy Schubertifdef CONFIG_WPS_TESTING
550c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_WPS_TESTING
551c1d255d3SCy Schubertendif
552c1d255d3SCy Schubert
553c1d255d3SCy Schubertendif
554c1d255d3SCy Schubert
555c1d255d3SCy Schubertifdef CONFIG_DPP
556c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_DPP
557c1d255d3SCy SchubertOBJS += src/common/dpp.c
558c1d255d3SCy SchubertOBJS += src/common/dpp_auth.c
559c1d255d3SCy SchubertOBJS += src/common/dpp_backup.c
560c1d255d3SCy SchubertOBJS += src/common/dpp_crypto.c
561c1d255d3SCy SchubertOBJS += src/common/dpp_pkex.c
562c1d255d3SCy SchubertOBJS += src/common/dpp_reconfig.c
563c1d255d3SCy SchubertOBJS += src/common/dpp_tcp.c
564c1d255d3SCy SchubertOBJS += src/ap/dpp_hostapd.c
565c1d255d3SCy SchubertOBJS += src/ap/gas_query_ap.c
566c1d255d3SCy SchubertNEED_AES_SIV=y
567c1d255d3SCy SchubertNEED_HMAC_SHA256_KDF=y
568c1d255d3SCy SchubertNEED_HMAC_SHA384_KDF=y
569c1d255d3SCy SchubertNEED_HMAC_SHA512_KDF=y
570c1d255d3SCy SchubertNEED_SHA384=y
571c1d255d3SCy SchubertNEED_SHA512=y
572c1d255d3SCy SchubertNEED_ECC=y
573c1d255d3SCy SchubertNEED_JSON=y
574c1d255d3SCy SchubertNEED_GAS=y
575c1d255d3SCy SchubertNEED_BASE64=y
576c1d255d3SCy SchubertNEED_ASN1=y
577c1d255d3SCy Schubertifdef CONFIG_DPP2
578c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_DPP2
579c1d255d3SCy Schubertendif
58032a95656SCy Schubertifdef CONFIG_DPP3
58132a95656SCy SchubertL_CFLAGS += -DCONFIG_DPP3
58232a95656SCy Schubertendif
583c1d255d3SCy Schubertendif
584c1d255d3SCy Schubert
585*a90b9d01SCy Schubertifdef CONFIG_NAN_USD
586*a90b9d01SCy SchubertOBJS += src/common/nan_de.c
587*a90b9d01SCy SchubertOBJS += src/ap/nan_usd_ap.c
588*a90b9d01SCy SchubertL_CFLAGS += -DCONFIG_NAN_USD
589*a90b9d01SCy Schubertendif
590*a90b9d01SCy Schubert
591c1d255d3SCy Schubertifdef CONFIG_PASN
592c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_PASN
593c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_PTKSA_CACHE
594c1d255d3SCy SchubertNEED_HMAC_SHA256_KDF=y
595c1d255d3SCy SchubertNEED_HMAC_SHA384_KDF=y
596c1d255d3SCy SchubertNEED_SHA256=y
597c1d255d3SCy SchubertNEED_SHA384=y
598c1d255d3SCy Schubertendif
599c1d255d3SCy Schubert
600c1d255d3SCy Schubertifdef CONFIG_EAP_IKEV2
601c1d255d3SCy SchubertL_CFLAGS += -DEAP_SERVER_IKEV2
602c1d255d3SCy SchubertOBJS += src/eap_server/eap_server_ikev2.c src/eap_server/ikev2.c
603c1d255d3SCy SchubertOBJS += src/eap_common/eap_ikev2_common.c src/eap_common/ikev2_common.c
604c1d255d3SCy SchubertNEED_DH_GROUPS=y
605c1d255d3SCy SchubertNEED_DH_GROUPS_ALL=y
606c1d255d3SCy SchubertNEED_MODEXP=y
607c1d255d3SCy SchubertNEED_CIPHER=y
608c1d255d3SCy Schubertendif
609c1d255d3SCy Schubert
610c1d255d3SCy Schubertifdef CONFIG_EAP_TNC
611c1d255d3SCy SchubertL_CFLAGS += -DEAP_SERVER_TNC
612c1d255d3SCy SchubertOBJS += src/eap_server/eap_server_tnc.c
613c1d255d3SCy SchubertOBJS += src/eap_server/tncs.c
614c1d255d3SCy SchubertNEED_BASE64=y
615c1d255d3SCy Schubertifndef CONFIG_DRIVER_BSD
616c1d255d3SCy SchubertLIBS += -ldl
617c1d255d3SCy Schubertendif
618c1d255d3SCy Schubertendif
619c1d255d3SCy Schubert
620c1d255d3SCy Schubert# Basic EAP functionality is needed for EAPOL
621c1d255d3SCy SchubertOBJS += eap_register.c
622c1d255d3SCy SchubertOBJS += src/eap_server/eap_server.c
623c1d255d3SCy SchubertOBJS += src/eap_common/eap_common.c
624c1d255d3SCy SchubertOBJS += src/eap_server/eap_server_methods.c
625c1d255d3SCy SchubertOBJS += src/eap_server/eap_server_identity.c
626c1d255d3SCy SchubertL_CFLAGS += -DEAP_SERVER_IDENTITY
627c1d255d3SCy Schubert
628c1d255d3SCy Schubertifdef CONFIG_EAP
629c1d255d3SCy SchubertL_CFLAGS += -DEAP_SERVER
630c1d255d3SCy Schubertendif
631c1d255d3SCy Schubert
632c1d255d3SCy Schubertifdef CONFIG_PKCS12
633c1d255d3SCy SchubertL_CFLAGS += -DPKCS12_FUNCS
634c1d255d3SCy Schubertendif
635c1d255d3SCy Schubert
636c1d255d3SCy Schubertifdef NEED_DRAGONFLY
637c1d255d3SCy SchubertOBJS += src/common/dragonfly.c
638c1d255d3SCy Schubertendif
639c1d255d3SCy Schubert
640c1d255d3SCy Schubertifdef MS_FUNCS
641c1d255d3SCy SchubertOBJS += src/crypto/ms_funcs.c
642c1d255d3SCy SchubertNEED_DES=y
643c1d255d3SCy SchubertNEED_MD4=y
644c1d255d3SCy Schubertendif
645c1d255d3SCy Schubert
646c1d255d3SCy Schubertifdef CHAP
647c1d255d3SCy SchubertOBJS += src/eap_common/chap.c
648c1d255d3SCy Schubertendif
649c1d255d3SCy Schubert
650*a90b9d01SCy Schubertifdef CONFIG_RADIUS_TLS
651*a90b9d01SCy SchubertTLS_FUNCS=y
652*a90b9d01SCy SchubertL_CFLAGS += -DCONFIG_RADIUS_TLS
653*a90b9d01SCy Schubertendif
654*a90b9d01SCy Schubert
655c1d255d3SCy Schubertifdef TLS_FUNCS
656c1d255d3SCy SchubertNEED_DES=y
657c1d255d3SCy Schubert# Shared TLS functions (needed for EAP_TLS, EAP_PEAP, and EAP_TTLS)
658c1d255d3SCy SchubertL_CFLAGS += -DEAP_TLS_FUNCS
659c1d255d3SCy SchubertOBJS += src/eap_server/eap_server_tls_common.c
660c1d255d3SCy SchubertNEED_TLS_PRF=y
661c1d255d3SCy Schubertendif
662c1d255d3SCy Schubert
663c1d255d3SCy Schubertifndef CONFIG_TLS
664c1d255d3SCy SchubertCONFIG_TLS=openssl
665c1d255d3SCy Schubertendif
666c1d255d3SCy Schubert
667c1d255d3SCy Schubertifdef CONFIG_TLSV11
668c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_TLSV11
669c1d255d3SCy Schubertendif
670c1d255d3SCy Schubert
671c1d255d3SCy Schubertifdef CONFIG_TLSV12
672c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_TLSV12
673c1d255d3SCy Schubertendif
674c1d255d3SCy Schubert
675c1d255d3SCy Schubertifeq ($(CONFIG_TLS), openssl)
676*a90b9d01SCy SchubertL_CFLAGS += -DCRYPTO_RSA_OAEP_SHA256
677c1d255d3SCy Schubertifdef TLS_FUNCS
678c1d255d3SCy SchubertOBJS += src/crypto/tls_openssl.c
679c1d255d3SCy SchubertOBJS += src/crypto/tls_openssl_ocsp.c
680c1d255d3SCy SchubertLIBS += -lssl
681c1d255d3SCy Schubertendif
682c1d255d3SCy SchubertOBJS += src/crypto/crypto_openssl.c
683c1d255d3SCy SchubertHOBJS += src/crypto/crypto_openssl.c
684c1d255d3SCy Schubertifdef NEED_FIPS186_2_PRF
685c1d255d3SCy SchubertOBJS += src/crypto/fips_prf_openssl.c
686c1d255d3SCy Schubertendif
687c1d255d3SCy SchubertNEED_TLS_PRF_SHA256=y
688c1d255d3SCy SchubertLIBS += -lcrypto
689c1d255d3SCy SchubertLIBS_h += -lcrypto
690c1d255d3SCy Schubertifndef CONFIG_TLS_DEFAULT_CIPHERS
691c1d255d3SCy SchubertCONFIG_TLS_DEFAULT_CIPHERS = "DEFAULT:!EXP:!LOW"
692c1d255d3SCy Schubertendif
693c1d255d3SCy SchubertL_CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONFIG_TLS_DEFAULT_CIPHERS)\"
694c1d255d3SCy Schubertendif
695c1d255d3SCy Schubert
696c1d255d3SCy Schubertifeq ($(CONFIG_TLS), gnutls)
697c1d255d3SCy Schubertifndef CONFIG_CRYPTO
698c1d255d3SCy Schubert# default to libgcrypt
699c1d255d3SCy SchubertCONFIG_CRYPTO=gnutls
700c1d255d3SCy Schubertendif
701c1d255d3SCy Schubertifdef TLS_FUNCS
702c1d255d3SCy SchubertOBJS += src/crypto/tls_gnutls.c
703c1d255d3SCy SchubertLIBS += -lgnutls -lgpg-error
704c1d255d3SCy Schubertendif
705c1d255d3SCy SchubertOBJS += src/crypto/crypto_$(CONFIG_CRYPTO).c
706c1d255d3SCy SchubertHOBJS += src/crypto/crypto_$(CONFIG_CRYPTO).c
707c1d255d3SCy Schubertifdef NEED_FIPS186_2_PRF
708c1d255d3SCy SchubertOBJS += src/crypto/fips_prf_internal.c
709c1d255d3SCy SchubertOBJS += src/crypto/sha1-internal.c
710c1d255d3SCy Schubertendif
711c1d255d3SCy Schubertifeq ($(CONFIG_CRYPTO), gnutls)
712c1d255d3SCy SchubertLIBS += -lgcrypt
713c1d255d3SCy SchubertLIBS_h += -lgcrypt
714c1d255d3SCy SchubertCONFIG_INTERNAL_RC4=y
715c1d255d3SCy SchubertCONFIG_INTERNAL_DH_GROUP5=y
716c1d255d3SCy Schubertendif
717c1d255d3SCy Schubertifeq ($(CONFIG_CRYPTO), nettle)
718c1d255d3SCy SchubertLIBS += -lnettle -lgmp
719c1d255d3SCy SchubertLIBS_p += -lnettle -lgmp
720c1d255d3SCy SchubertCONFIG_INTERNAL_RC4=y
721c1d255d3SCy SchubertCONFIG_INTERNAL_DH_GROUP5=y
722c1d255d3SCy Schubertendif
723c1d255d3SCy Schubertendif
724c1d255d3SCy Schubert
725c1d255d3SCy Schubertifeq ($(CONFIG_TLS), internal)
726c1d255d3SCy Schubertifndef CONFIG_CRYPTO
727c1d255d3SCy SchubertCONFIG_CRYPTO=internal
728c1d255d3SCy Schubertendif
729c1d255d3SCy Schubertifdef TLS_FUNCS
730c1d255d3SCy SchubertOBJS += src/crypto/crypto_internal-rsa.c
731c1d255d3SCy SchubertOBJS += src/crypto/tls_internal.c
732c1d255d3SCy SchubertOBJS += src/tls/tlsv1_common.c
733c1d255d3SCy SchubertOBJS += src/tls/tlsv1_record.c
734c1d255d3SCy SchubertOBJS += src/tls/tlsv1_cred.c
735c1d255d3SCy SchubertOBJS += src/tls/tlsv1_server.c
736c1d255d3SCy SchubertOBJS += src/tls/tlsv1_server_write.c
737c1d255d3SCy SchubertOBJS += src/tls/tlsv1_server_read.c
738c1d255d3SCy SchubertOBJS += src/tls/rsa.c
739c1d255d3SCy SchubertOBJS += src/tls/x509v3.c
740c1d255d3SCy SchubertOBJS += src/tls/pkcs1.c
741c1d255d3SCy SchubertOBJS += src/tls/pkcs5.c
742c1d255d3SCy SchubertOBJS += src/tls/pkcs8.c
743c1d255d3SCy SchubertNEED_ASN1=y
744c1d255d3SCy SchubertNEED_BASE64=y
745c1d255d3SCy SchubertNEED_TLS_PRF=y
746c1d255d3SCy Schubertifdef CONFIG_TLSV12
747c1d255d3SCy SchubertNEED_TLS_PRF_SHA256=y
748c1d255d3SCy Schubertendif
749c1d255d3SCy SchubertNEED_MODEXP=y
750c1d255d3SCy SchubertNEED_CIPHER=y
751c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_TLS_INTERNAL
752c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_TLS_INTERNAL_SERVER
753c1d255d3SCy Schubertendif
754c1d255d3SCy Schubertifdef NEED_CIPHER
755c1d255d3SCy SchubertNEED_DES=y
756c1d255d3SCy SchubertOBJS += src/crypto/crypto_internal-cipher.c
757c1d255d3SCy Schubertendif
758c1d255d3SCy Schubertifdef NEED_MODEXP
759c1d255d3SCy SchubertOBJS += src/crypto/crypto_internal-modexp.c
760c1d255d3SCy SchubertOBJS += src/tls/bignum.c
761c1d255d3SCy Schubertendif
762c1d255d3SCy Schubertifeq ($(CONFIG_CRYPTO), libtomcrypt)
763c1d255d3SCy SchubertOBJS += src/crypto/crypto_libtomcrypt.c
764c1d255d3SCy SchubertLIBS += -ltomcrypt -ltfm
765c1d255d3SCy SchubertLIBS_h += -ltomcrypt -ltfm
766c1d255d3SCy SchubertCONFIG_INTERNAL_SHA256=y
767c1d255d3SCy SchubertCONFIG_INTERNAL_RC4=y
768c1d255d3SCy SchubertCONFIG_INTERNAL_DH_GROUP5=y
769c1d255d3SCy Schubertendif
770c1d255d3SCy Schubertifeq ($(CONFIG_CRYPTO), internal)
771c1d255d3SCy SchubertOBJS += src/crypto/crypto_internal.c
772c1d255d3SCy SchubertNEED_AES_DEC=y
773c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_CRYPTO_INTERNAL
774c1d255d3SCy Schubertifdef CONFIG_INTERNAL_LIBTOMMATH
775c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH
776c1d255d3SCy Schubertifdef CONFIG_INTERNAL_LIBTOMMATH_FAST
777c1d255d3SCy SchubertL_CFLAGS += -DLTM_FAST
778c1d255d3SCy Schubertendif
779c1d255d3SCy Schubertelse
780c1d255d3SCy SchubertLIBS += -ltommath
781c1d255d3SCy SchubertLIBS_h += -ltommath
782c1d255d3SCy Schubertendif
783c1d255d3SCy SchubertCONFIG_INTERNAL_AES=y
784c1d255d3SCy SchubertCONFIG_INTERNAL_DES=y
785c1d255d3SCy SchubertCONFIG_INTERNAL_SHA1=y
786c1d255d3SCy SchubertCONFIG_INTERNAL_MD4=y
787c1d255d3SCy SchubertCONFIG_INTERNAL_MD5=y
788c1d255d3SCy SchubertCONFIG_INTERNAL_SHA256=y
789c1d255d3SCy SchubertCONFIG_INTERNAL_SHA384=y
790c1d255d3SCy SchubertCONFIG_INTERNAL_SHA512=y
791c1d255d3SCy SchubertCONFIG_INTERNAL_RC4=y
792c1d255d3SCy SchubertCONFIG_INTERNAL_DH_GROUP5=y
793c1d255d3SCy Schubertendif
794c1d255d3SCy Schubertifeq ($(CONFIG_CRYPTO), cryptoapi)
795c1d255d3SCy SchubertOBJS += src/crypto/crypto_cryptoapi.c
796c1d255d3SCy SchubertOBJS_p += src/crypto/crypto_cryptoapi.c
797c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_CRYPTO_CRYPTOAPI
798c1d255d3SCy SchubertCONFIG_INTERNAL_SHA256=y
799c1d255d3SCy SchubertCONFIG_INTERNAL_RC4=y
800c1d255d3SCy Schubertendif
801c1d255d3SCy Schubertendif
802c1d255d3SCy Schubert
803c1d255d3SCy Schubertifeq ($(CONFIG_TLS), none)
804c1d255d3SCy Schubertifdef TLS_FUNCS
805c1d255d3SCy SchubertOBJS += src/crypto/tls_none.c
806c1d255d3SCy SchubertL_CFLAGS += -DEAP_TLS_NONE
807c1d255d3SCy SchubertCONFIG_INTERNAL_AES=y
808c1d255d3SCy SchubertCONFIG_INTERNAL_SHA1=y
809c1d255d3SCy SchubertCONFIG_INTERNAL_MD5=y
810c1d255d3SCy Schubertendif
811c1d255d3SCy SchubertOBJS += src/crypto/crypto_none.c
812c1d255d3SCy SchubertOBJS_p += src/crypto/crypto_none.c
813c1d255d3SCy SchubertCONFIG_INTERNAL_SHA256=y
814c1d255d3SCy SchubertCONFIG_INTERNAL_RC4=y
815c1d255d3SCy Schubertendif
816c1d255d3SCy Schubert
817c1d255d3SCy Schubertifndef TLS_FUNCS
818c1d255d3SCy SchubertOBJS += src/crypto/tls_none.c
819c1d255d3SCy Schubertifeq ($(CONFIG_TLS), internal)
820c1d255d3SCy SchubertCONFIG_INTERNAL_AES=y
821c1d255d3SCy SchubertCONFIG_INTERNAL_SHA1=y
822c1d255d3SCy SchubertCONFIG_INTERNAL_MD5=y
823c1d255d3SCy SchubertCONFIG_INTERNAL_RC4=y
824c1d255d3SCy Schubertendif
825c1d255d3SCy Schubertendif
826c1d255d3SCy Schubert
827c1d255d3SCy SchubertAESOBJS = # none so far
828c1d255d3SCy Schubertifdef CONFIG_INTERNAL_AES
829c1d255d3SCy SchubertAESOBJS += src/crypto/aes-internal.c src/crypto/aes-internal-enc.c
830c1d255d3SCy Schubertendif
831c1d255d3SCy Schubert
832c1d255d3SCy Schubertifneq ($(CONFIG_TLS), openssl)
833c1d255d3SCy SchubertAESOBJS += src/crypto/aes-wrap.c
834c1d255d3SCy Schubertendif
835c1d255d3SCy Schubertifdef NEED_AES_EAX
836c1d255d3SCy SchubertAESOBJS += src/crypto/aes-eax.c
837c1d255d3SCy SchubertNEED_AES_CTR=y
838c1d255d3SCy Schubertendif
839c1d255d3SCy Schubertifdef NEED_AES_SIV
840c1d255d3SCy SchubertAESOBJS += src/crypto/aes-siv.c
841c1d255d3SCy SchubertNEED_AES_CTR=y
842c1d255d3SCy Schubertendif
843c1d255d3SCy Schubertifdef NEED_AES_CTR
844c1d255d3SCy SchubertAESOBJS += src/crypto/aes-ctr.c
845c1d255d3SCy Schubertendif
846c1d255d3SCy Schubertifdef NEED_AES_ENCBLOCK
847c1d255d3SCy SchubertAESOBJS += src/crypto/aes-encblock.c
848c1d255d3SCy Schubertendif
849*a90b9d01SCy Schubertifneq ($(CONFIG_TLS), openssl)
850c1d255d3SCy SchubertAESOBJS += src/crypto/aes-omac1.c
851*a90b9d01SCy Schubertendif
852c1d255d3SCy Schubertifdef NEED_AES_UNWRAP
853c1d255d3SCy Schubertifneq ($(CONFIG_TLS), openssl)
854c1d255d3SCy SchubertNEED_AES_DEC=y
855c1d255d3SCy SchubertAESOBJS += src/crypto/aes-unwrap.c
856c1d255d3SCy Schubertendif
857c1d255d3SCy Schubertendif
858c1d255d3SCy Schubertifdef NEED_AES_CBC
859c1d255d3SCy SchubertNEED_AES_DEC=y
860c1d255d3SCy Schubertifneq ($(CONFIG_TLS), openssl)
861c1d255d3SCy SchubertAESOBJS += src/crypto/aes-cbc.c
862c1d255d3SCy Schubertendif
863c1d255d3SCy Schubertendif
864c1d255d3SCy Schubertifdef NEED_AES_DEC
865c1d255d3SCy Schubertifdef CONFIG_INTERNAL_AES
866c1d255d3SCy SchubertAESOBJS += src/crypto/aes-internal-dec.c
867c1d255d3SCy Schubertendif
868c1d255d3SCy Schubertendif
869c1d255d3SCy Schubertifdef NEED_AES
870c1d255d3SCy SchubertOBJS += $(AESOBJS)
871c1d255d3SCy Schubertendif
872c1d255d3SCy Schubert
873c1d255d3SCy SchubertSHA1OBJS =
874c1d255d3SCy Schubertifdef NEED_SHA1
875c1d255d3SCy Schubertifneq ($(CONFIG_TLS), openssl)
876c1d255d3SCy Schubertifneq ($(CONFIG_TLS), gnutls)
877c1d255d3SCy SchubertSHA1OBJS += src/crypto/sha1.c
878c1d255d3SCy Schubertendif
879c1d255d3SCy Schubertendif
880c1d255d3SCy SchubertSHA1OBJS += src/crypto/sha1-prf.c
881c1d255d3SCy Schubertifdef CONFIG_INTERNAL_SHA1
882c1d255d3SCy SchubertSHA1OBJS += src/crypto/sha1-internal.c
883c1d255d3SCy Schubertifdef NEED_FIPS186_2_PRF
884c1d255d3SCy SchubertSHA1OBJS += src/crypto/fips_prf_internal.c
885c1d255d3SCy Schubertendif
886c1d255d3SCy Schubertendif
887c1d255d3SCy Schubertifneq ($(CONFIG_TLS), openssl)
888c1d255d3SCy SchubertSHA1OBJS += src/crypto/sha1-pbkdf2.c
889c1d255d3SCy Schubertendif
890c1d255d3SCy Schubertifdef NEED_T_PRF
891c1d255d3SCy SchubertSHA1OBJS += src/crypto/sha1-tprf.c
892c1d255d3SCy Schubertendif
893c1d255d3SCy Schubertifdef NEED_TLS_PRF
894c1d255d3SCy SchubertSHA1OBJS += src/crypto/sha1-tlsprf.c
895c1d255d3SCy Schubertendif
896c1d255d3SCy Schubertendif
897c1d255d3SCy Schubert
898c1d255d3SCy Schubertifdef NEED_SHA1
899c1d255d3SCy SchubertOBJS += $(SHA1OBJS)
900c1d255d3SCy Schubertendif
901c1d255d3SCy Schubert
902c1d255d3SCy Schubertifneq ($(CONFIG_TLS), openssl)
903c1d255d3SCy Schubertifneq ($(CONFIG_TLS), gnutls)
904c1d255d3SCy SchubertOBJS += src/crypto/md5.c
905c1d255d3SCy Schubertendif
906c1d255d3SCy Schubertendif
907c1d255d3SCy Schubert
908c1d255d3SCy Schubertifdef NEED_MD5
909c1d255d3SCy Schubertifdef CONFIG_INTERNAL_MD5
910c1d255d3SCy SchubertOBJS += src/crypto/md5-internal.c
911c1d255d3SCy SchubertHOBJS += src/crypto/md5-internal.c
912c1d255d3SCy Schubertendif
913c1d255d3SCy Schubertendif
914c1d255d3SCy Schubert
915c1d255d3SCy Schubertifdef NEED_MD4
916c1d255d3SCy Schubertifdef CONFIG_INTERNAL_MD4
917c1d255d3SCy SchubertOBJS += src/crypto/md4-internal.c
918c1d255d3SCy Schubertendif
919c1d255d3SCy Schubertendif
920c1d255d3SCy Schubert
921c1d255d3SCy Schubertifdef NEED_DES
922c1d255d3SCy Schubertifdef CONFIG_INTERNAL_DES
923c1d255d3SCy SchubertOBJS += src/crypto/des-internal.c
924c1d255d3SCy Schubertendif
925c1d255d3SCy Schubertendif
926c1d255d3SCy Schubert
927c1d255d3SCy Schubertifdef CONFIG_NO_RC4
928c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_NO_RC4
929c1d255d3SCy Schubertendif
930c1d255d3SCy Schubert
931c1d255d3SCy Schubertifdef NEED_RC4
932c1d255d3SCy Schubertifdef CONFIG_INTERNAL_RC4
933c1d255d3SCy Schubertifndef CONFIG_NO_RC4
934c1d255d3SCy SchubertOBJS += src/crypto/rc4.c
935c1d255d3SCy Schubertendif
936c1d255d3SCy Schubertendif
937c1d255d3SCy Schubertendif
938c1d255d3SCy Schubert
939c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_SHA256
940c1d255d3SCy Schubertifneq ($(CONFIG_TLS), openssl)
941c1d255d3SCy Schubertifneq ($(CONFIG_TLS), gnutls)
942c1d255d3SCy SchubertOBJS += src/crypto/sha256.c
943c1d255d3SCy Schubertendif
944c1d255d3SCy Schubertendif
945c1d255d3SCy SchubertOBJS += src/crypto/sha256-prf.c
946c1d255d3SCy Schubertifdef CONFIG_INTERNAL_SHA256
947c1d255d3SCy SchubertOBJS += src/crypto/sha256-internal.c
948c1d255d3SCy Schubertendif
949c1d255d3SCy Schubertifdef NEED_TLS_PRF_SHA256
950c1d255d3SCy SchubertOBJS += src/crypto/sha256-tlsprf.c
951c1d255d3SCy Schubertendif
952c1d255d3SCy Schubertifdef NEED_TLS_PRF_SHA384
953c1d255d3SCy SchubertOBJS += src/crypto/sha384-tlsprf.c
954c1d255d3SCy Schubertendif
955c1d255d3SCy Schubertifdef NEED_HMAC_SHA256_KDF
956c1d255d3SCy SchubertOBJS += src/crypto/sha256-kdf.c
957c1d255d3SCy Schubertendif
958c1d255d3SCy Schubertifdef NEED_HMAC_SHA384_KDF
959c1d255d3SCy SchubertOBJS += src/crypto/sha384-kdf.c
960c1d255d3SCy Schubertendif
961c1d255d3SCy Schubertifdef NEED_HMAC_SHA512_KDF
962c1d255d3SCy SchubertOBJS += src/crypto/sha512-kdf.c
963c1d255d3SCy Schubertendif
964c1d255d3SCy Schubertifdef NEED_SHA384
965c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_SHA384
966c1d255d3SCy Schubertifneq ($(CONFIG_TLS), openssl)
967c1d255d3SCy Schubertifneq ($(CONFIG_TLS), gnutls)
968c1d255d3SCy SchubertOBJS += src/crypto/sha384.c
969c1d255d3SCy Schubertendif
970c1d255d3SCy Schubertendif
971c1d255d3SCy SchubertOBJS += src/crypto/sha384-prf.c
972c1d255d3SCy Schubertendif
973c1d255d3SCy Schubertifdef NEED_SHA512
974c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_SHA512
975c1d255d3SCy Schubertifneq ($(CONFIG_TLS), openssl)
976c1d255d3SCy Schubertifneq ($(CONFIG_TLS), linux)
977c1d255d3SCy Schubertifneq ($(CONFIG_TLS), gnutls)
978c1d255d3SCy SchubertOBJS += src/crypto/sha512.c
979c1d255d3SCy Schubertendif
980c1d255d3SCy Schubertendif
981c1d255d3SCy Schubertendif
982c1d255d3SCy SchubertOBJS += src/crypto/sha512-prf.c
983c1d255d3SCy Schubertendif
984c1d255d3SCy Schubert
985c1d255d3SCy Schubertifdef CONFIG_INTERNAL_SHA384
986c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_INTERNAL_SHA384
987c1d255d3SCy SchubertOBJS += src/crypto/sha384-internal.c
988c1d255d3SCy Schubertendif
989c1d255d3SCy Schubert
990c1d255d3SCy Schubertifdef CONFIG_INTERNAL_SHA512
991c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_INTERNAL_SHA512
992c1d255d3SCy SchubertOBJS += src/crypto/sha512-internal.c
993c1d255d3SCy Schubertendif
994c1d255d3SCy Schubert
995c1d255d3SCy Schubertifdef NEED_ASN1
996c1d255d3SCy SchubertOBJS += src/tls/asn1.c
997c1d255d3SCy Schubertendif
998c1d255d3SCy Schubert
999c1d255d3SCy Schubertifdef NEED_DH_GROUPS
1000c1d255d3SCy SchubertOBJS += src/crypto/dh_groups.c
1001c1d255d3SCy Schubertendif
1002c1d255d3SCy Schubertifdef NEED_DH_GROUPS_ALL
1003c1d255d3SCy SchubertL_CFLAGS += -DALL_DH_GROUPS
1004c1d255d3SCy Schubertendif
1005c1d255d3SCy Schubertifdef CONFIG_INTERNAL_DH_GROUP5
1006c1d255d3SCy Schubertifdef NEED_DH_GROUPS
1007c1d255d3SCy SchubertOBJS += src/crypto/dh_group5.c
1008c1d255d3SCy Schubertendif
1009c1d255d3SCy Schubertendif
1010c1d255d3SCy Schubert
1011c1d255d3SCy Schubertifdef NEED_ECC
1012c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_ECC
1013c1d255d3SCy Schubertendif
1014c1d255d3SCy Schubert
1015c1d255d3SCy Schubertifdef CONFIG_NO_RANDOM_POOL
1016c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_NO_RANDOM_POOL
1017c1d255d3SCy Schubertelse
1018c1d255d3SCy SchubertOBJS += src/crypto/random.c
1019c1d255d3SCy SchubertHOBJS += src/crypto/random.c
1020c1d255d3SCy SchubertHOBJS += src/utils/eloop.c
1021c1d255d3SCy SchubertHOBJS += $(SHA1OBJS)
1022c1d255d3SCy Schubertifneq ($(CONFIG_TLS), openssl)
1023c1d255d3SCy SchubertHOBJS += src/crypto/md5.c
1024c1d255d3SCy Schubertendif
1025c1d255d3SCy Schubertendif
1026c1d255d3SCy Schubert
1027c1d255d3SCy Schubertifdef CONFIG_RADIUS_SERVER
1028c1d255d3SCy SchubertL_CFLAGS += -DRADIUS_SERVER
1029c1d255d3SCy SchubertOBJS += src/radius/radius_server.c
1030c1d255d3SCy Schubertendif
1031c1d255d3SCy Schubert
1032c1d255d3SCy Schubertifdef CONFIG_IPV6
1033c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_IPV6
1034c1d255d3SCy Schubertendif
1035c1d255d3SCy Schubert
1036c1d255d3SCy Schubertifdef CONFIG_DRIVER_RADIUS_ACL
1037c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_DRIVER_RADIUS_ACL
1038c1d255d3SCy Schubertendif
1039c1d255d3SCy Schubert
1040c1d255d3SCy Schubertifdef NEED_BASE64
1041c1d255d3SCy SchubertOBJS += src/utils/base64.c
1042c1d255d3SCy Schubertendif
1043c1d255d3SCy Schubert
1044c1d255d3SCy Schubertifdef NEED_JSON
1045c1d255d3SCy SchubertOBJS += src/utils/json.c
1046c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_JSON
1047c1d255d3SCy Schubertendif
1048c1d255d3SCy Schubert
1049c1d255d3SCy Schubertifdef NEED_AP_MLME
1050c1d255d3SCy SchubertOBJS += src/ap/wmm.c
1051c1d255d3SCy SchubertOBJS += src/ap/ap_list.c
1052*a90b9d01SCy SchubertOBJS += src/ap/comeback_token.c
1053*a90b9d01SCy SchubertOBJS += src/pasn/pasn_responder.c
1054*a90b9d01SCy SchubertOBJS += src/pasn/pasn_common.c
1055c1d255d3SCy SchubertOBJS += src/ap/ieee802_11.c
1056c1d255d3SCy SchubertOBJS += src/ap/hw_features.c
1057c1d255d3SCy SchubertOBJS += src/ap/dfs.c
1058c1d255d3SCy SchubertL_CFLAGS += -DNEED_AP_MLME
1059c1d255d3SCy Schubertendif
1060c1d255d3SCy SchubertOBJS += src/ap/ieee802_11_ht.c
1061c1d255d3SCy Schubert
1062c1d255d3SCy Schubertifdef CONFIG_IEEE80211AC
1063c1d255d3SCy SchubertOBJS += src/ap/ieee802_11_vht.c
1064c1d255d3SCy Schubertendif
1065c1d255d3SCy Schubert
1066c1d255d3SCy Schubertifdef CONFIG_IEEE80211AX
1067c1d255d3SCy SchubertOBJS += src/ap/ieee802_11_he.c
1068c1d255d3SCy Schubertendif
1069c1d255d3SCy Schubert
1070c1d255d3SCy Schubertifdef CONFIG_P2P_MANAGER
1071c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_P2P_MANAGER
1072c1d255d3SCy SchubertOBJS += src/ap/p2p_hostapd.c
1073c1d255d3SCy Schubertendif
1074c1d255d3SCy Schubert
1075c1d255d3SCy Schubertifdef CONFIG_HS20
1076c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_HS20
1077c1d255d3SCy SchubertOBJS += src/ap/hs20.c
1078c1d255d3SCy SchubertCONFIG_INTERWORKING=y
1079c1d255d3SCy Schubertendif
1080c1d255d3SCy Schubert
1081c1d255d3SCy Schubertifdef CONFIG_INTERWORKING
1082c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_INTERWORKING
1083c1d255d3SCy SchubertNEED_GAS=y
1084c1d255d3SCy Schubertendif
1085c1d255d3SCy Schubert
1086c1d255d3SCy Schubertifdef NEED_GAS
1087c1d255d3SCy SchubertOBJS += src/common/gas.c
1088c1d255d3SCy SchubertOBJS += src/ap/gas_serv.c
1089c1d255d3SCy Schubertendif
1090c1d255d3SCy Schubert
1091c1d255d3SCy Schubertifdef CONFIG_PROXYARP
1092c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_PROXYARP
1093c1d255d3SCy SchubertOBJS += src/ap/x_snoop.c
1094c1d255d3SCy SchubertOBJS += src/ap/dhcp_snoop.c
1095c1d255d3SCy Schubertifdef CONFIG_IPV6
1096c1d255d3SCy SchubertOBJS += src/ap/ndisc_snoop.c
1097c1d255d3SCy Schubertendif
1098c1d255d3SCy Schubertendif
1099c1d255d3SCy Schubert
1100c1d255d3SCy SchubertOBJS += src/drivers/driver_common.c
1101c1d255d3SCy Schubert
1102c1d255d3SCy Schubertifdef CONFIG_ACS
1103c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_ACS
1104c1d255d3SCy SchubertOBJS += src/ap/acs.c
1105c1d255d3SCy SchubertLIBS += -lm
1106c1d255d3SCy Schubertendif
1107c1d255d3SCy Schubert
1108c1d255d3SCy Schubertifdef CONFIG_NO_STDOUT_DEBUG
1109c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_NO_STDOUT_DEBUG
1110c1d255d3SCy Schubertendif
1111c1d255d3SCy Schubert
1112c1d255d3SCy Schubertifdef CONFIG_DEBUG_SYSLOG
1113c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_DEBUG_SYSLOG
1114c1d255d3SCy Schubertendif
1115c1d255d3SCy Schubert
1116c1d255d3SCy Schubertifdef CONFIG_DEBUG_LINUX_TRACING
1117c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_DEBUG_LINUX_TRACING
1118c1d255d3SCy Schubertendif
1119c1d255d3SCy Schubert
1120c1d255d3SCy Schubertifdef CONFIG_DEBUG_FILE
1121c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_DEBUG_FILE
1122c1d255d3SCy Schubertendif
1123c1d255d3SCy Schubert
1124c1d255d3SCy Schubertifdef CONFIG_ANDROID_LOG
1125c1d255d3SCy SchubertL_CFLAGS += -DCONFIG_ANDROID_LOG
1126c1d255d3SCy Schubertendif
1127c1d255d3SCy Schubert
1128c1d255d3SCy SchubertOBJS_c = hostapd_cli.c
1129c1d255d3SCy SchubertOBJS_c += src/common/wpa_ctrl.c
1130c1d255d3SCy SchubertOBJS_c += src/utils/os_$(CONFIG_OS).c
1131c1d255d3SCy SchubertOBJS_c += src/common/cli.c
1132c1d255d3SCy SchubertOBJS_c += src/utils/eloop.c
1133c1d255d3SCy SchubertOBJS_c += src/utils/common.c
1134c1d255d3SCy Schubertifdef CONFIG_WPA_TRACE
1135c1d255d3SCy SchubertOBJS_c += src/utils/trace.c
1136c1d255d3SCy Schubertendif
1137c1d255d3SCy SchubertOBJS_c += src/utils/wpa_debug.c
1138c1d255d3SCy Schubertifdef CONFIG_WPA_CLI_EDIT
1139c1d255d3SCy SchubertOBJS_c += src/utils/edit.c
1140c1d255d3SCy Schubertelse
1141c1d255d3SCy SchubertOBJS_c += src/utils/edit_simple.c
1142c1d255d3SCy Schubertendif
1143c1d255d3SCy Schubert
1144c1d255d3SCy Schubert########################
1145c1d255d3SCy Schubert
1146c1d255d3SCy Schubertinclude $(CLEAR_VARS)
1147c1d255d3SCy SchubertLOCAL_MODULE := hostapd_cli
1148c1d255d3SCy SchubertLOCAL_MODULE_TAGS := debug
1149c1d255d3SCy SchubertLOCAL_PROPRIETARY_MODULE := true
1150c1d255d3SCy SchubertLOCAL_SHARED_LIBRARIES := libc libcutils liblog
1151c1d255d3SCy SchubertLOCAL_CFLAGS := $(L_CFLAGS)
1152c1d255d3SCy SchubertLOCAL_SRC_FILES := $(OBJS_c)
1153c1d255d3SCy SchubertLOCAL_C_INCLUDES := $(INCLUDES)
1154c1d255d3SCy Schubertinclude $(BUILD_EXECUTABLE)
1155c1d255d3SCy Schubert
1156c1d255d3SCy Schubert########################
1157c1d255d3SCy Schubertinclude $(CLEAR_VARS)
1158c1d255d3SCy SchubertLOCAL_MODULE := hostapd
1159c1d255d3SCy SchubertLOCAL_MODULE_TAGS := optional
1160c1d255d3SCy SchubertLOCAL_PROPRIETARY_MODULE := true
1161c1d255d3SCy Schubertifdef CONFIG_DRIVER_CUSTOM
1162c1d255d3SCy SchubertLOCAL_STATIC_LIBRARIES := libCustomWifi
1163c1d255d3SCy Schubertendif
1164c1d255d3SCy Schubertifneq ($(BOARD_HOSTAPD_PRIVATE_LIB),)
1165c1d255d3SCy SchubertLOCAL_STATIC_LIBRARIES += $(BOARD_HOSTAPD_PRIVATE_LIB)
1166c1d255d3SCy Schubertendif
1167c1d255d3SCy SchubertLOCAL_SHARED_LIBRARIES := libc libcutils liblog libcrypto libssl
1168c1d255d3SCy Schubertifdef CONFIG_DRIVER_NL80211
1169c1d255d3SCy Schubertifneq ($(wildcard external/libnl),)
1170c1d255d3SCy SchubertLOCAL_SHARED_LIBRARIES += libnl
1171c1d255d3SCy Schubertelse
1172c1d255d3SCy SchubertLOCAL_STATIC_LIBRARIES += libnl_2
1173c1d255d3SCy Schubertendif
1174c1d255d3SCy Schubertendif
1175c1d255d3SCy SchubertLOCAL_CFLAGS := $(L_CFLAGS)
1176c1d255d3SCy SchubertLOCAL_SRC_FILES := $(OBJS)
1177c1d255d3SCy SchubertLOCAL_C_INCLUDES := $(INCLUDES)
1178c1d255d3SCy SchubertLOCAL_INIT_RC := hostapd.android.rc
1179c1d255d3SCy Schubertinclude $(BUILD_EXECUTABLE)
1180c1d255d3SCy Schubert
1181c1d255d3SCy Schubertendif # ifeq ($(WPA_BUILD_HOSTAPD),true)
1182