xref: /freebsd/contrib/wpa/wpa_supplicant/Android.mk (revision b64c5a0ace59af62eff52bfe110a521dc73c937b)
1#
2# Copyright (C) 2008 The Android Open Source Project
3#
4# This software may be distributed under the terms of the BSD license.
5# See README for more details.
6#
7
8LOCAL_PATH := $(call my-dir)
9PKG_CONFIG ?= pkg-config
10
11ifneq ($(BOARD_WPA_SUPPLICANT_DRIVER),)
12  CONFIG_DRIVER_$(BOARD_WPA_SUPPLICANT_DRIVER) := y
13endif
14
15include $(LOCAL_PATH)/android.config
16
17# To ignore possible wrong network configurations
18L_CFLAGS = -DWPA_IGNORE_CONFIG_ERRORS
19
20L_CFLAGS += -DVERSION_STR_POSTFIX=\"-$(PLATFORM_VERSION)\"
21
22# Set Android log name
23L_CFLAGS += -DANDROID_LOG_NAME=\"wpa_supplicant\"
24
25# Disable unused parameter warnings
26L_CFLAGS += -Wno-unused-parameter
27
28# Set Android extended P2P functionality
29L_CFLAGS += -DANDROID_P2P
30
31ifeq ($(BOARD_WPA_SUPPLICANT_PRIVATE_LIB),)
32L_CFLAGS += -DANDROID_LIB_STUB
33endif
34
35ifneq ($(BOARD_WPA_SUPPLICANT_PRIVATE_LIB_EVENT),)
36L_CFLAGS += -DANDROID_LIB_EVENT
37endif
38
39# Disable roaming in wpa_supplicant
40ifdef CONFIG_NO_ROAMING
41L_CFLAGS += -DCONFIG_NO_ROAMING
42endif
43
44# Use Android specific directory for control interface sockets
45L_CFLAGS += -DCONFIG_CTRL_IFACE_CLIENT_DIR=\"/data/misc/wifi/sockets\"
46L_CFLAGS += -DCONFIG_CTRL_IFACE_DIR=\"/data/misc/wifi/sockets\"
47
48# Use Android specific directory for wpa_cli command completion history
49L_CFLAGS += -DCONFIG_WPA_CLI_HISTORY_DIR=\"/data/misc/wifi\"
50
51# To force sizeof(enum) = 4
52ifeq ($(TARGET_ARCH),arm)
53L_CFLAGS += -mabi=aapcs-linux
54endif
55
56# C++ flags for binder interface
57L_CPPFLAGS := -std=c++11 -Wall -Werror
58# TODO: Remove these allowed warnings later.
59L_CPPFLAGS += -Wno-unused-variable -Wno-unused-parameter
60L_CPPFLAGS += -Wno-unused-private-field
61
62INCLUDES = $(LOCAL_PATH)
63INCLUDES += $(LOCAL_PATH)/src
64INCLUDES += $(LOCAL_PATH)/src/common
65# INCLUDES += $(LOCAL_PATH)/src/crypto # To force proper includes
66INCLUDES += $(LOCAL_PATH)/src/drivers
67INCLUDES += $(LOCAL_PATH)/src/eap_common
68INCLUDES += $(LOCAL_PATH)/src/eapol_supp
69INCLUDES += $(LOCAL_PATH)/src/eap_peer
70INCLUDES += $(LOCAL_PATH)/src/eap_server
71INCLUDES += $(LOCAL_PATH)/src/hlr_auc_gw
72INCLUDES += $(LOCAL_PATH)/src/l2_packet
73INCLUDES += $(LOCAL_PATH)/src/radius
74INCLUDES += $(LOCAL_PATH)/src/rsn_supp
75INCLUDES += $(LOCAL_PATH)/src/tls
76INCLUDES += $(LOCAL_PATH)/src/utils
77INCLUDES += $(LOCAL_PATH)/src/wps
78INCLUDES += $(LOCAL_PATH)/src/pasn
79INCLUDES += system/security/keystore/include
80ifdef CONFIG_DRIVER_NL80211
81ifneq ($(wildcard external/libnl),)
82INCLUDES += external/libnl/include
83else
84INCLUDES += external/libnl-headers
85endif
86endif
87
88ifdef CONFIG_FIPS
89CONFIG_NO_RANDOM_POOL=
90endif
91
92OBJS = config.c
93OBJS += notify.c
94OBJS += bss.c
95OBJS += eap_register.c
96OBJS += src/utils/common.c
97OBJS += src/utils/config.c
98OBJS += src/utils/wpa_debug.c
99OBJS += src/utils/wpabuf.c
100OBJS += src/utils/bitfield.c
101OBJS += src/utils/ip_addr.c
102OBJS += src/utils/crc32.c
103OBJS += src/common/ptksa_cache.c
104OBJS += src/rsn_supp/pmksa_cache.c
105OBJS += twt.c
106OBJS_p = wpa_passphrase.c
107OBJS_p += src/utils/common.c
108OBJS_p += src/utils/wpa_debug.c
109OBJS_p += src/utils/wpabuf.c
110OBJS_c = wpa_cli.c src/common/wpa_ctrl.c
111OBJS_c += src/utils/wpa_debug.c
112OBJS_c += src/utils/common.c
113OBJS_c += src/common/cli.c
114OBJS_d =
115OBJS_priv =
116
117ifndef CONFIG_OS
118ifdef CONFIG_NATIVE_WINDOWS
119CONFIG_OS=win32
120else
121CONFIG_OS=unix
122endif
123endif
124
125ifeq ($(CONFIG_OS), internal)
126L_CFLAGS += -DOS_NO_C_LIB_DEFINES
127endif
128
129OBJS += src/utils/os_$(CONFIG_OS).c
130OBJS_p += src/utils/os_$(CONFIG_OS).c
131OBJS_c += src/utils/os_$(CONFIG_OS).c
132
133ifdef CONFIG_WPA_TRACE
134L_CFLAGS += -DWPA_TRACE
135OBJS += src/utils/trace.c
136OBJS_p += src/utils/trace.c
137OBJS_c += src/utils/trace.c
138LDFLAGS += -rdynamic
139L_CFLAGS += -funwind-tables
140ifdef CONFIG_WPA_TRACE_BFD
141L_CFLAGS += -DWPA_TRACE_BFD
142LIBS += -lbfd
143LIBS_p += -lbfd
144LIBS_c += -lbfd
145endif
146endif
147
148ifndef CONFIG_ELOOP
149CONFIG_ELOOP=eloop
150endif
151OBJS += src/utils/$(CONFIG_ELOOP).c
152OBJS_c += src/utils/$(CONFIG_ELOOP).c
153
154ifdef CONFIG_ELOOP_POLL
155L_CFLAGS += -DCONFIG_ELOOP_POLL
156endif
157
158ifdef CONFIG_ELOOP_EPOLL
159L_CFLAGS += -DCONFIG_ELOOP_EPOLL
160endif
161
162ifdef CONFIG_EAPOL_TEST
163L_CFLAGS += -Werror -DEAPOL_TEST
164endif
165
166ifdef CONFIG_HT_OVERRIDES
167L_CFLAGS += -DCONFIG_HT_OVERRIDES
168endif
169
170ifdef CONFIG_VHT_OVERRIDES
171L_CFLAGS += -DCONFIG_VHT_OVERRIDES
172endif
173
174ifdef CONFIG_HE_OVERRIDES
175L_CFLAGS += -DCONFIG_HE_OVERRIDES
176endif
177
178ifndef CONFIG_BACKEND
179CONFIG_BACKEND=file
180endif
181
182ifeq ($(CONFIG_BACKEND), file)
183OBJS += config_file.c
184ifndef CONFIG_NO_CONFIG_BLOBS
185NEED_BASE64=y
186endif
187L_CFLAGS += -DCONFIG_BACKEND_FILE
188endif
189
190ifeq ($(CONFIG_BACKEND), winreg)
191OBJS += config_winreg.c
192endif
193
194ifeq ($(CONFIG_BACKEND), none)
195OBJS += config_none.c
196endif
197
198ifdef CONFIG_NO_CONFIG_WRITE
199L_CFLAGS += -DCONFIG_NO_CONFIG_WRITE
200endif
201
202ifdef CONFIG_NO_CONFIG_BLOBS
203L_CFLAGS += -DCONFIG_NO_CONFIG_BLOBS
204endif
205
206ifdef CONFIG_NO_SCAN_PROCESSING
207L_CFLAGS += -DCONFIG_NO_SCAN_PROCESSING
208endif
209
210ifdef CONFIG_SUITEB
211L_CFLAGS += -DCONFIG_SUITEB
212endif
213
214ifdef CONFIG_SUITEB192
215L_CFLAGS += -DCONFIG_SUITEB192
216NEED_SHA384=y
217endif
218
219ifdef CONFIG_OCV
220L_CFLAGS += -DCONFIG_OCV
221OBJS += src/common/ocv.c
222endif
223
224ifdef CONFIG_IEEE80211R
225L_CFLAGS += -DCONFIG_IEEE80211R
226OBJS += src/rsn_supp/wpa_ft.c
227endif
228
229ifdef CONFIG_MESH
230NEED_80211_COMMON=y
231NEED_AES_SIV=y
232CONFIG_SAE=y
233CONFIG_AP=y
234L_CFLAGS += -DCONFIG_MESH
235OBJS += mesh.c
236OBJS += mesh_mpm.c
237OBJS += mesh_rsn.c
238endif
239
240ifdef CONFIG_SAE
241L_CFLAGS += -DCONFIG_SAE
242OBJS += src/common/sae.c
243ifdef CONFIG_SAE_PK
244L_CFLAGS += -DCONFIG_SAE_PK
245NEED_AES_SIV=y
246OBJS += src/common/sae_pk.c
247endif
248NEED_ECC=y
249NEED_DH_GROUPS=y
250NEED_HMAC_SHA256_KDF=y
251NEED_DRAGONFLY=y
252ifdef CONFIG_TESTING_OPTIONS
253NEED_DH_GROUPS_ALL=y
254endif
255endif
256
257ifdef CONFIG_DPP
258L_CFLAGS += -DCONFIG_DPP
259OBJS += src/common/dpp.c
260OBJS += src/common/dpp_auth.c
261OBJS += src/common/dpp_backup.c
262OBJS += src/common/dpp_crypto.c
263OBJS += src/common/dpp_pkex.c
264OBJS += src/common/dpp_reconfig.c
265OBJS += src/common/dpp_tcp.c
266OBJS += dpp_supplicant.c
267NEED_AES_SIV=y
268NEED_HMAC_SHA256_KDF=y
269NEED_HMAC_SHA384_KDF=y
270NEED_HMAC_SHA512_KDF=y
271NEED_SHA384=y
272NEED_SHA512=y
273NEED_ECC=y
274NEED_JSON=y
275NEED_GAS_SERVER=y
276NEED_BASE64=y
277NEED_ASN1=y
278ifdef CONFIG_DPP2
279L_CFLAGS += -DCONFIG_DPP2
280endif
281ifdef CONFIG_DPP3
282L_CFLAGS += -DCONFIG_DPP3
283endif
284endif
285
286ifdef CONFIG_NAN_USD
287OBJS += src/common/nan_de.c
288OBJS += nan_usd.c
289L_CFLAGS += -DCONFIG_NAN_USD
290endif
291
292ifdef CONFIG_OWE
293L_CFLAGS += -DCONFIG_OWE
294NEED_ECC=y
295NEED_HMAC_SHA256_KDF=y
296NEED_HMAC_SHA384_KDF=y
297NEED_HMAC_SHA512_KDF=y
298NEED_SHA384=y
299NEED_SHA512=y
300endif
301
302ifdef CONFIG_FILS
303L_CFLAGS += -DCONFIG_FILS
304NEED_SHA384=y
305NEED_AES_SIV=y
306ifdef CONFIG_FILS_SK_PFS
307L_CFLAGS += -DCONFIG_FILS_SK_PFS
308NEED_ECC=y
309endif
310endif
311
312ifdef CONFIG_MBO
313CONFIG_WNM=y
314endif
315
316ifdef CONFIG_BGSCAN_SIMPLE
317CONFIG_WNM=y
318endif
319
320ifdef CONFIG_WNM
321L_CFLAGS += -DCONFIG_WNM
322OBJS += wnm_sta.c
323endif
324
325ifdef CONFIG_TDLS
326L_CFLAGS += -DCONFIG_TDLS
327OBJS += src/rsn_supp/tdls.c
328endif
329
330ifdef CONFIG_TDLS_TESTING
331L_CFLAGS += -DCONFIG_TDLS_TESTING
332endif
333
334ifdef CONFIG_PMKSA_CACHE_EXTERNAL
335L_CFLAGS += -DCONFIG_PMKSA_CACHE_EXTERNAL
336endif
337
338ifndef CONFIG_NO_WPA
339OBJS += src/rsn_supp/wpa.c
340OBJS += src/rsn_supp/preauth.c
341OBJS += src/rsn_supp/wpa_ie.c
342OBJS += src/common/wpa_common.c
343NEED_AES=y
344NEED_SHA1=y
345NEED_MD5=y
346NEED_RC4=y
347else
348L_CFLAGS += -DCONFIG_NO_WPA
349endif
350
351ifdef CONFIG_IBSS_RSN
352NEED_RSN_AUTHENTICATOR=y
353L_CFLAGS += -DCONFIG_IBSS_RSN
354L_CFLAGS += -DCONFIG_NO_VLAN
355OBJS += ibss_rsn.c
356endif
357
358ifdef CONFIG_P2P
359OBJS += p2p_supplicant.c
360OBJS += p2p_supplicant_sd.c
361OBJS += src/p2p/p2p.c
362OBJS += src/p2p/p2p_utils.c
363OBJS += src/p2p/p2p_parse.c
364OBJS += src/p2p/p2p_build.c
365OBJS += src/p2p/p2p_go_neg.c
366OBJS += src/p2p/p2p_sd.c
367OBJS += src/p2p/p2p_pd.c
368OBJS += src/p2p/p2p_invitation.c
369OBJS += src/p2p/p2p_dev_disc.c
370OBJS += src/p2p/p2p_group.c
371OBJS += src/ap/p2p_hostapd.c
372L_CFLAGS += -DCONFIG_P2P
373NEED_GAS=y
374NEED_OFFCHANNEL=y
375CONFIG_WPS=y
376CONFIG_AP=y
377ifdef CONFIG_P2P_STRICT
378L_CFLAGS += -DCONFIG_P2P_STRICT
379endif
380ifdef CONFIG_WIFI_DISPLAY
381L_CFLAGS += -DCONFIG_WIFI_DISPLAY
382OBJS += wifi_display.c
383endif
384endif
385
386ifdef CONFIG_PASN
387L_CFLAGS += -DCONFIG_PASN
388L_CFLAGS += -DCONFIG_PTKSA_CACHE
389NEED_HMAC_SHA256_KDF=y
390NEED_HMAC_SHA384_KDF=y
391NEED_SHA256=y
392NEED_SHA384=y
393OBJS += src/pasn/pasn_initiator.c
394OBJS += src/pasn/pasn_common.c
395OBJS += pasn_supplicant.c
396endif
397
398ifdef CONFIG_HS20
399OBJS += hs20_supplicant.c
400L_CFLAGS += -DCONFIG_HS20
401CONFIG_INTERWORKING=y
402endif
403
404ifdef CONFIG_INTERWORKING
405OBJS += interworking.c
406L_CFLAGS += -DCONFIG_INTERWORKING
407NEED_GAS=y
408endif
409
410ifdef CONFIG_FST
411L_CFLAGS += -DCONFIG_FST
412OBJS += src/fst/fst.c
413OBJS += src/fst/fst_session.c
414OBJS += src/fst/fst_iface.c
415OBJS += src/fst/fst_group.c
416OBJS += src/fst/fst_ctrl_aux.c
417ifdef CONFIG_FST_TEST
418L_CFLAGS += -DCONFIG_FST_TEST
419endif
420ifdef CONFIG_CTRL_IFACE
421OBJS += src/fst/fst_ctrl_iface.c
422endif
423endif
424
425ifdef CONFIG_WEP
426L_CFLAGS += -DCONFIG_WEP
427endif
428
429ifdef CONFIG_NO_TKIP
430L_CFLAGS += -DCONFIG_NO_TKIP
431endif
432
433ifdef CONFIG_NO_RRM
434L_CFLAGS += -DCONFIG_NO_RRM
435else
436OBJS += rrm.c
437ifdef CONFIG_AP
438OBJS += src/ap/rrm.c
439endif
440OBJS += op_classes.c
441endif
442
443ifdef CONFIG_NO_WMM_AC
444L_CFLAGS += -DCONFIG_NO_WMM_AC
445else
446OBJS += wmm_ac.c
447endif
448
449ifdef CONFIG_NO_ROBUST_AV
450L_CFLAGS += -DCONFIG_NO_ROBUST_AV
451else
452OBJS += robust_av.c
453endif
454
455
456include $(LOCAL_PATH)/src/drivers/drivers.mk
457
458ifdef CONFIG_AP
459OBJS_d += $(DRV_BOTH_OBJS)
460L_CFLAGS += $(DRV_BOTH_CFLAGS)
461LDFLAGS += $(DRV_BOTH_LDFLAGS)
462LIBS += $(DRV_BOTH_LIBS)
463else
464NEED_AP_MLME=
465OBJS_d += $(DRV_WPA_OBJS)
466L_CFLAGS += $(DRV_WPA_CFLAGS)
467LDFLAGS += $(DRV_WPA_LDFLAGS)
468LIBS += $(DRV_WPA_LIBS)
469endif
470
471ifndef CONFIG_L2_PACKET
472CONFIG_L2_PACKET=linux
473endif
474
475OBJS_l2 += src/l2_packet/l2_packet_$(CONFIG_L2_PACKET).c
476
477ifeq ($(CONFIG_L2_PACKET), pcap)
478ifdef CONFIG_WINPCAP
479L_CFLAGS += -DCONFIG_WINPCAP
480LIBS += -lwpcap -lpacket
481LIBS_w += -lwpcap
482else
483LIBS += -ldnet -lpcap
484endif
485endif
486
487ifeq ($(CONFIG_L2_PACKET), winpcap)
488LIBS += -lwpcap -lpacket
489LIBS_w += -lwpcap
490endif
491
492ifeq ($(CONFIG_L2_PACKET), freebsd)
493LIBS += -lpcap
494endif
495
496ifdef CONFIG_ERP
497L_CFLAGS += -DCONFIG_ERP
498NEED_HMAC_SHA256_KDF=y
499endif
500
501ifdef CONFIG_EAP_TLS
502# EAP-TLS
503ifeq ($(CONFIG_EAP_TLS), dyn)
504L_CFLAGS += -DEAP_TLS_DYNAMIC
505EAPDYN += src/eap_peer/eap_tls.so
506else
507L_CFLAGS += -DEAP_TLS
508OBJS += src/eap_peer/eap_tls.c
509endif
510TLS_FUNCS=y
511CONFIG_IEEE8021X_EAPOL=y
512ifdef CONFIG_EAP_TLSV1_3
513L_CFLAGS += -DEAP_TLSV1_3
514endif
515endif
516
517ifdef CONFIG_EAP_UNAUTH_TLS
518# EAP-UNAUTH-TLS
519L_CFLAGS += -DEAP_UNAUTH_TLS
520ifndef CONFIG_EAP_TLS
521OBJS += src/eap_peer/eap_tls.c
522TLS_FUNCS=y
523endif
524CONFIG_IEEE8021X_EAPOL=y
525endif
526
527ifdef CONFIG_EAP_PEAP
528# EAP-PEAP
529ifeq ($(CONFIG_EAP_PEAP), dyn)
530L_CFLAGS += -DEAP_PEAP_DYNAMIC
531EAPDYN += src/eap_peer/eap_peap.so
532else
533L_CFLAGS += -DEAP_PEAP
534OBJS += src/eap_peer/eap_peap.c
535OBJS += src/eap_common/eap_peap_common.c
536endif
537TLS_FUNCS=y
538CONFIG_IEEE8021X_EAPOL=y
539endif
540
541ifdef CONFIG_EAP_TTLS
542# EAP-TTLS
543ifeq ($(CONFIG_EAP_TTLS), dyn)
544L_CFLAGS += -DEAP_TTLS_DYNAMIC
545EAPDYN += src/eap_peer/eap_ttls.so
546else
547L_CFLAGS += -DEAP_TTLS
548OBJS += src/eap_peer/eap_ttls.c
549endif
550TLS_FUNCS=y
551ifndef CONFIG_FIPS
552MS_FUNCS=y
553CHAP=y
554endif
555CONFIG_IEEE8021X_EAPOL=y
556endif
557
558ifdef CONFIG_EAP_MD5
559# EAP-MD5
560ifeq ($(CONFIG_EAP_MD5), dyn)
561L_CFLAGS += -DEAP_MD5_DYNAMIC
562EAPDYN += src/eap_peer/eap_md5.so
563else
564L_CFLAGS += -DEAP_MD5
565OBJS += src/eap_peer/eap_md5.c
566endif
567CHAP=y
568CONFIG_IEEE8021X_EAPOL=y
569endif
570
571# backwards compatibility for old spelling
572ifdef CONFIG_MSCHAPV2
573ifndef CONFIG_EAP_MSCHAPV2
574CONFIG_EAP_MSCHAPV2=y
575endif
576endif
577
578ifdef CONFIG_EAP_MSCHAPV2
579# EAP-MSCHAPv2
580ifeq ($(CONFIG_EAP_MSCHAPV2), dyn)
581L_CFLAGS += -DEAP_MSCHAPv2_DYNAMIC
582EAPDYN += src/eap_peer/eap_mschapv2.so
583EAPDYN += src/eap_peer/mschapv2.so
584else
585L_CFLAGS += -DEAP_MSCHAPv2
586OBJS += src/eap_peer/eap_mschapv2.c
587OBJS += src/eap_peer/mschapv2.c
588endif
589MS_FUNCS=y
590CONFIG_IEEE8021X_EAPOL=y
591endif
592
593ifdef CONFIG_EAP_GTC
594# EAP-GTC
595ifeq ($(CONFIG_EAP_GTC), dyn)
596L_CFLAGS += -DEAP_GTC_DYNAMIC
597EAPDYN += src/eap_peer/eap_gtc.so
598else
599L_CFLAGS += -DEAP_GTC
600OBJS += src/eap_peer/eap_gtc.c
601endif
602CONFIG_IEEE8021X_EAPOL=y
603endif
604
605ifdef CONFIG_EAP_OTP
606# EAP-OTP
607ifeq ($(CONFIG_EAP_OTP), dyn)
608L_CFLAGS += -DEAP_OTP_DYNAMIC
609EAPDYN += src/eap_peer/eap_otp.so
610else
611L_CFLAGS += -DEAP_OTP
612OBJS += src/eap_peer/eap_otp.c
613endif
614CONFIG_IEEE8021X_EAPOL=y
615endif
616
617ifdef CONFIG_EAP_SIM
618# EAP-SIM
619ifeq ($(CONFIG_EAP_SIM), dyn)
620L_CFLAGS += -DEAP_SIM_DYNAMIC
621EAPDYN += src/eap_peer/eap_sim.so
622else
623L_CFLAGS += -DEAP_SIM
624OBJS += src/eap_peer/eap_sim.c
625endif
626CONFIG_IEEE8021X_EAPOL=y
627CONFIG_EAP_SIM_COMMON=y
628NEED_AES_CBC=y
629endif
630
631ifdef CONFIG_EAP_LEAP
632# EAP-LEAP
633ifeq ($(CONFIG_EAP_LEAP), dyn)
634L_CFLAGS += -DEAP_LEAP_DYNAMIC
635EAPDYN += src/eap_peer/eap_leap.so
636else
637L_CFLAGS += -DEAP_LEAP
638OBJS += src/eap_peer/eap_leap.c
639endif
640MS_FUNCS=y
641CONFIG_IEEE8021X_EAPOL=y
642endif
643
644ifdef CONFIG_EAP_PSK
645# EAP-PSK
646ifeq ($(CONFIG_EAP_PSK), dyn)
647L_CFLAGS += -DEAP_PSK_DYNAMIC
648EAPDYN += src/eap_peer/eap_psk.so
649else
650L_CFLAGS += -DEAP_PSK
651OBJS += src/eap_peer/eap_psk.c src/eap_common/eap_psk_common.c
652endif
653CONFIG_IEEE8021X_EAPOL=y
654NEED_AES=y
655NEED_AES_ENCBLOCK=y
656NEED_AES_EAX=y
657endif
658
659ifdef CONFIG_EAP_AKA
660# EAP-AKA
661ifeq ($(CONFIG_EAP_AKA), dyn)
662L_CFLAGS += -DEAP_AKA_DYNAMIC
663EAPDYN += src/eap_peer/eap_aka.so
664else
665L_CFLAGS += -DEAP_AKA
666OBJS += src/eap_peer/eap_aka.c
667endif
668CONFIG_IEEE8021X_EAPOL=y
669CONFIG_EAP_SIM_COMMON=y
670NEED_AES_CBC=y
671endif
672
673ifdef CONFIG_EAP_PROXY
674L_CFLAGS += -DCONFIG_EAP_PROXY
675OBJS += src/eap_peer/eap_proxy_$(CONFIG_EAP_PROXY).c
676include $(LOCAL_PATH)/eap_proxy_$(CONFIG_EAP_PROXY).mk
677CONFIG_IEEE8021X_EAPOL=y
678endif
679
680ifdef CONFIG_EAP_AKA_PRIME
681# EAP-AKA'
682ifeq ($(CONFIG_EAP_AKA_PRIME), dyn)
683L_CFLAGS += -DEAP_AKA_PRIME_DYNAMIC
684else
685L_CFLAGS += -DEAP_AKA_PRIME
686endif
687endif
688
689ifdef CONFIG_EAP_SIM_COMMON
690OBJS += src/eap_common/eap_sim_common.c
691NEED_AES=y
692NEED_FIPS186_2_PRF=y
693endif
694
695ifdef CONFIG_EAP_FAST
696# EAP-FAST
697ifeq ($(CONFIG_EAP_FAST), dyn)
698L_CFLAGS += -DEAP_FAST_DYNAMIC
699EAPDYN += src/eap_peer/eap_fast.so
700EAPDYN += src/eap_common/eap_fast_common.c
701else
702L_CFLAGS += -DEAP_FAST
703OBJS += src/eap_peer/eap_fast.c src/eap_peer/eap_fast_pac.c
704OBJS += src/eap_common/eap_fast_common.c
705endif
706TLS_FUNCS=y
707CONFIG_IEEE8021X_EAPOL=y
708NEED_T_PRF=y
709endif
710
711ifdef CONFIG_EAP_TEAP
712# EAP-TEAP
713ifeq ($(CONFIG_EAP_TEAP), dyn)
714L_CFLAGS += -DEAP_YEAP_DYNAMIC
715EAPDYN += src/eap_peer/eap_teap.so
716EAPDYN += src/eap_common/eap_teap_common.c
717else
718L_CFLAGS += -DEAP_TEAP
719OBJS += src/eap_peer/eap_teap.c src/eap_peer/eap_teap_pac.c
720OBJS += src/eap_common/eap_teap_common.c
721endif
722TLS_FUNCS=y
723CONFIG_IEEE8021X_EAPOL=y
724NEED_T_PRF=y
725NEED_SHA384=y
726NEED_TLS_PRF_SHA256=y
727NEED_TLS_PRF_SHA384=y
728endif
729
730ifdef CONFIG_EAP_PAX
731# EAP-PAX
732ifeq ($(CONFIG_EAP_PAX), dyn)
733L_CFLAGS += -DEAP_PAX_DYNAMIC
734EAPDYN += src/eap_peer/eap_pax.so
735else
736L_CFLAGS += -DEAP_PAX
737OBJS += src/eap_peer/eap_pax.c src/eap_common/eap_pax_common.c
738endif
739CONFIG_IEEE8021X_EAPOL=y
740endif
741
742ifdef CONFIG_EAP_SAKE
743# EAP-SAKE
744ifeq ($(CONFIG_EAP_SAKE), dyn)
745L_CFLAGS += -DEAP_SAKE_DYNAMIC
746EAPDYN += src/eap_peer/eap_sake.so
747else
748L_CFLAGS += -DEAP_SAKE
749OBJS += src/eap_peer/eap_sake.c src/eap_common/eap_sake_common.c
750endif
751CONFIG_IEEE8021X_EAPOL=y
752endif
753
754ifdef CONFIG_EAP_GPSK
755# EAP-GPSK
756ifeq ($(CONFIG_EAP_GPSK), dyn)
757L_CFLAGS += -DEAP_GPSK_DYNAMIC
758EAPDYN += src/eap_peer/eap_gpsk.so
759else
760L_CFLAGS += -DEAP_GPSK
761OBJS += src/eap_peer/eap_gpsk.c src/eap_common/eap_gpsk_common.c
762endif
763CONFIG_IEEE8021X_EAPOL=y
764ifdef CONFIG_EAP_GPSK_SHA256
765L_CFLAGS += -DEAP_GPSK_SHA256
766endif
767endif
768
769ifdef CONFIG_EAP_PWD
770L_CFLAGS += -DEAP_PWD
771OBJS += src/eap_peer/eap_pwd.c src/eap_common/eap_pwd_common.c
772CONFIG_IEEE8021X_EAPOL=y
773NEED_ECC=y
774NEED_DRAGONFLY=y
775MS_FUNCS=y
776endif
777
778ifdef CONFIG_EAP_EKE
779# EAP-EKE
780ifeq ($(CONFIG_EAP_EKE), dyn)
781L_CFLAGS += -DEAP_EKE_DYNAMIC
782EAPDYN += src/eap_peer/eap_eke.so
783else
784L_CFLAGS += -DEAP_EKE
785OBJS += src/eap_peer/eap_eke.c src/eap_common/eap_eke_common.c
786endif
787CONFIG_IEEE8021X_EAPOL=y
788NEED_DH_GROUPS=y
789NEED_DH_GROUPS_ALL=y
790NEED_AES_CBC=y
791endif
792
793ifdef CONFIG_WPS
794# EAP-WSC
795L_CFLAGS += -DCONFIG_WPS -DEAP_WSC
796OBJS += wps_supplicant.c
797OBJS += src/utils/uuid.c
798OBJS += src/eap_peer/eap_wsc.c src/eap_common/eap_wsc_common.c
799OBJS += src/wps/wps.c
800OBJS += src/wps/wps_common.c
801OBJS += src/wps/wps_attr_parse.c
802OBJS += src/wps/wps_attr_build.c
803OBJS += src/wps/wps_attr_process.c
804OBJS += src/wps/wps_dev_attr.c
805OBJS += src/wps/wps_enrollee.c
806OBJS += src/wps/wps_registrar.c
807CONFIG_IEEE8021X_EAPOL=y
808NEED_DH_GROUPS=y
809NEED_BASE64=y
810NEED_AES_CBC=y
811NEED_MODEXP=y
812
813ifdef CONFIG_WPS_NFC
814L_CFLAGS += -DCONFIG_WPS_NFC
815OBJS += src/wps/ndef.c
816NEED_WPS_OOB=y
817endif
818
819ifdef NEED_WPS_OOB
820L_CFLAGS += -DCONFIG_WPS_OOB
821endif
822
823ifdef CONFIG_WPS_ER
824CONFIG_WPS_UPNP=y
825L_CFLAGS += -DCONFIG_WPS_ER
826OBJS += src/wps/wps_er.c
827OBJS += src/wps/wps_er_ssdp.c
828endif
829
830ifdef CONFIG_WPS_UPNP
831L_CFLAGS += -DCONFIG_WPS_UPNP
832OBJS += src/wps/wps_upnp.c
833OBJS += src/wps/wps_upnp_ssdp.c
834OBJS += src/wps/wps_upnp_web.c
835OBJS += src/wps/wps_upnp_event.c
836OBJS += src/wps/wps_upnp_ap.c
837OBJS += src/wps/upnp_xml.c
838OBJS += src/wps/httpread.c
839OBJS += src/wps/http_client.c
840OBJS += src/wps/http_server.c
841endif
842
843ifdef CONFIG_WPS_STRICT
844L_CFLAGS += -DCONFIG_WPS_STRICT
845OBJS += src/wps/wps_validate.c
846endif
847
848ifdef CONFIG_WPS_TESTING
849L_CFLAGS += -DCONFIG_WPS_TESTING
850endif
851
852ifdef CONFIG_WPS_REG_DISABLE_OPEN
853L_CFLAGS += -DCONFIG_WPS_REG_DISABLE_OPEN
854endif
855
856endif
857
858ifdef CONFIG_EAP_IKEV2
859# EAP-IKEv2
860ifeq ($(CONFIG_EAP_IKEV2), dyn)
861L_CFLAGS += -DEAP_IKEV2_DYNAMIC
862EAPDYN += src/eap_peer/eap_ikev2.so src/eap_peer/ikev2.c
863EAPDYN += src/eap_common/eap_ikev2_common.c src/eap_common/ikev2_common.c
864else
865L_CFLAGS += -DEAP_IKEV2
866OBJS += src/eap_peer/eap_ikev2.c src/eap_peer/ikev2.c
867OBJS += src/eap_common/eap_ikev2_common.c src/eap_common/ikev2_common.c
868endif
869CONFIG_IEEE8021X_EAPOL=y
870NEED_DH_GROUPS=y
871NEED_DH_GROUPS_ALL=y
872NEED_MODEXP=y
873NEED_CIPHER=y
874endif
875
876ifdef CONFIG_EAP_VENDOR_TEST
877ifeq ($(CONFIG_EAP_VENDOR_TEST), dyn)
878L_CFLAGS += -DEAP_VENDOR_TEST_DYNAMIC
879EAPDYN += src/eap_peer/eap_vendor_test.so
880else
881L_CFLAGS += -DEAP_VENDOR_TEST
882OBJS += src/eap_peer/eap_vendor_test.c
883endif
884CONFIG_IEEE8021X_EAPOL=y
885endif
886
887ifdef CONFIG_EAP_TNC
888# EAP-TNC
889L_CFLAGS += -DEAP_TNC
890OBJS += src/eap_peer/eap_tnc.c
891OBJS += src/eap_peer/tncc.c
892NEED_BASE64=y
893ifndef CONFIG_NATIVE_WINDOWS
894ifndef CONFIG_DRIVER_BSD
895LIBS += -ldl
896endif
897endif
898endif
899
900ifdef CONFIG_IEEE8021X_EAPOL
901# IEEE 802.1X/EAPOL state machines (e.g., for RADIUS authentication)
902L_CFLAGS += -DIEEE8021X_EAPOL
903OBJS += src/eapol_supp/eapol_supp_sm.c
904OBJS += src/eap_peer/eap.c src/eap_peer/eap_methods.c
905NEED_EAP_COMMON=y
906ifdef CONFIG_DYNAMIC_EAP_METHODS
907L_CFLAGS += -DCONFIG_DYNAMIC_EAP_METHODS
908LIBS += -ldl -rdynamic
909endif
910endif
911
912ifdef CONFIG_AP
913NEED_EAP_COMMON=y
914NEED_RSN_AUTHENTICATOR=y
915L_CFLAGS += -DCONFIG_AP
916OBJS += ap.c
917L_CFLAGS += -DCONFIG_NO_RADIUS
918L_CFLAGS += -DCONFIG_NO_ACCOUNTING
919L_CFLAGS += -DCONFIG_NO_VLAN
920OBJS += src/ap/hostapd.c
921OBJS += src/ap/wpa_auth_glue.c
922OBJS += src/ap/utils.c
923OBJS += src/ap/authsrv.c
924OBJS += src/ap/ap_config.c
925OBJS += src/ap/sta_info.c
926OBJS += src/ap/tkip_countermeasures.c
927OBJS += src/ap/ap_mlme.c
928OBJS += src/ap/ieee802_1x.c
929OBJS += src/eapol_auth/eapol_auth_sm.c
930OBJS += src/ap/ieee802_11_auth.c
931OBJS += src/ap/ieee802_11_shared.c
932OBJS += src/ap/drv_callbacks.c
933OBJS += src/ap/ap_drv_ops.c
934OBJS += src/ap/beacon.c
935OBJS += src/ap/bss_load.c
936OBJS += src/ap/eap_user_db.c
937OBJS += src/ap/neighbor_db.c
938OBJS += src/ap/ieee802_11_ht.c
939ifdef CONFIG_IEEE80211AC
940OBJS += src/ap/ieee802_11_vht.c
941endif
942ifdef CONFIG_IEEE80211AX
943OBJS += src/ap/ieee802_11_he.c
944endif
945ifdef CONFIG_IEEE80211BE
946OBJS += src/ap/ieee802_11_eht.c
947endif
948ifdef CONFIG_WNM_AP
949L_CFLAGS += -DCONFIG_WNM_AP
950OBJS += src/ap/wnm_ap.c
951endif
952ifdef CONFIG_MBO
953OBJS += src/ap/mbo_ap.c
954endif
955ifdef CONFIG_FILS
956OBJS += src/ap/fils_hlp.c
957endif
958ifdef CONFIG_CTRL_IFACE
959OBJS += src/ap/ctrl_iface_ap.c
960endif
961
962L_CFLAGS += -DEAP_SERVER -DEAP_SERVER_IDENTITY
963OBJS += src/eap_server/eap_server.c
964OBJS += src/eap_server/eap_server_identity.c
965OBJS += src/eap_server/eap_server_methods.c
966
967ifdef CONFIG_IEEE80211AC
968L_CFLAGS += -DCONFIG_IEEE80211AC
969endif
970ifdef CONFIG_IEEE80211BE
971CONFIG_IEEE80211AX=y
972L_CFLAGS += -DCONFIG_IEEE80211BE
973endif
974ifdef CONFIG_IEEE80211AX
975L_CFLAGS += -DCONFIG_IEEE80211AX
976endif
977
978ifdef NEED_AP_MLME
979OBJS += src/ap/wmm.c
980OBJS += src/ap/ap_list.c
981OBJS += src/ap/comeback_token.c
982OBJS += src/pasn/pasn_responder.c
983OBJS += src/ap/ieee802_11.c
984OBJS += src/ap/hw_features.c
985OBJS += src/ap/dfs.c
986L_CFLAGS += -DNEED_AP_MLME
987endif
988ifdef CONFIG_WPS
989L_CFLAGS += -DEAP_SERVER_WSC
990OBJS += src/ap/wps_hostapd.c
991OBJS += src/eap_server/eap_server_wsc.c
992endif
993ifdef CONFIG_DPP
994OBJS += src/ap/dpp_hostapd.c
995OBJS += src/ap/gas_query_ap.c
996NEED_AP_GAS_SERV=y
997endif
998ifdef CONFIG_NAN_USD
999OBJS += src/ap/nan_usd_ap.c
1000endif
1001ifdef CONFIG_INTERWORKING
1002NEED_AP_GAS_SERV=y
1003endif
1004ifdef NEED_AP_GAS_SERV
1005OBJS += src/ap/gas_serv.c
1006endif
1007ifdef CONFIG_HS20
1008OBJS += src/ap/hs20.c
1009endif
1010endif
1011
1012ifdef CONFIG_MBO
1013OBJS += mbo.c
1014L_CFLAGS += -DCONFIG_MBO
1015endif
1016
1017ifdef CONFIG_TESTING_OPTIONS
1018L_CFLAGS += -DCONFIG_TESTING_OPTIONS
1019NEED_AES_WRAP=y
1020endif
1021
1022ifdef NEED_RSN_AUTHENTICATOR
1023L_CFLAGS += -DCONFIG_NO_RADIUS
1024NEED_AES_WRAP=y
1025OBJS += src/ap/wpa_auth.c
1026OBJS += src/ap/wpa_auth_ie.c
1027OBJS += src/ap/pmksa_cache_auth.c
1028endif
1029
1030ifdef CONFIG_ACS
1031L_CFLAGS += -DCONFIG_ACS
1032OBJS += src/ap/acs.c
1033LIBS += -lm
1034endif
1035
1036ifdef CONFIG_PCSC
1037# PC/SC interface for smartcards (USIM, GSM SIM)
1038L_CFLAGS += -DPCSC_FUNCS -I/usr/include/PCSC
1039OBJS += src/utils/pcsc_funcs.c
1040# -lpthread may not be needed depending on how pcsc-lite was configured
1041ifdef CONFIG_NATIVE_WINDOWS
1042#Once MinGW gets support for WinScard, -lwinscard could be used instead of the
1043#dynamic symbol loading that is now used in pcsc_funcs.c
1044#LIBS += -lwinscard
1045else
1046LIBS += -lpcsclite -lpthread
1047endif
1048endif
1049
1050ifdef CONFIG_SIM_SIMULATOR
1051L_CFLAGS += -DCONFIG_SIM_SIMULATOR
1052NEED_MILENAGE=y
1053endif
1054
1055ifdef CONFIG_USIM_SIMULATOR
1056L_CFLAGS += -DCONFIG_USIM_SIMULATOR
1057NEED_MILENAGE=y
1058endif
1059
1060ifdef NEED_MILENAGE
1061OBJS += src/crypto/milenage.c
1062NEED_AES_ENCBLOCK=y
1063endif
1064
1065ifdef CONFIG_PKCS12
1066L_CFLAGS += -DPKCS12_FUNCS
1067endif
1068
1069ifdef CONFIG_SMARTCARD
1070L_CFLAGS += -DCONFIG_SMARTCARD
1071endif
1072
1073ifdef NEED_DRAGONFLY
1074OBJS += src/common/dragonfly.c
1075endif
1076
1077ifdef MS_FUNCS
1078OBJS += src/crypto/ms_funcs.c
1079NEED_DES=y
1080NEED_MD4=y
1081endif
1082
1083ifdef CHAP
1084OBJS += src/eap_common/chap.c
1085endif
1086
1087ifdef TLS_FUNCS
1088NEED_DES=y
1089# Shared TLS functions (needed for EAP_TLS, EAP_PEAP, EAP_TTLS, and EAP_FAST)
1090OBJS += src/eap_peer/eap_tls_common.c
1091ifndef CONFIG_FIPS
1092NEED_TLS_PRF=y
1093NEED_SHA1=y
1094NEED_MD5=y
1095endif
1096endif
1097
1098ifndef CONFIG_TLS
1099CONFIG_TLS=openssl
1100endif
1101
1102ifdef CONFIG_TLSV11
1103L_CFLAGS += -DCONFIG_TLSV11
1104endif
1105
1106ifdef CONFIG_TLSV12
1107L_CFLAGS += -DCONFIG_TLSV12
1108endif
1109
1110ifeq ($(CONFIG_TLS), openssl)
1111L_CFLAGS += -DCRYPTO_RSA_OAEP_SHA256
1112ifdef TLS_FUNCS
1113L_CFLAGS += -DEAP_TLS_OPENSSL
1114OBJS += src/crypto/tls_openssl.c
1115OBJS += src/crypto/tls_openssl_ocsp.c
1116LIBS += -lssl
1117endif
1118OBJS += src/crypto/crypto_openssl.c
1119OBJS_p += src/crypto/crypto_openssl.c
1120ifdef NEED_FIPS186_2_PRF
1121OBJS += src/crypto/fips_prf_openssl.c
1122endif
1123NEED_TLS_PRF_SHA256=y
1124LIBS += -lcrypto
1125LIBS_p += -lcrypto
1126ifdef CONFIG_TLS_ADD_DL
1127LIBS += -ldl
1128LIBS_p += -ldl
1129endif
1130ifndef CONFIG_TLS_DEFAULT_CIPHERS
1131CONFIG_TLS_DEFAULT_CIPHERS = "DEFAULT:!EXP:!LOW"
1132endif
1133L_CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONFIG_TLS_DEFAULT_CIPHERS)\"
1134endif
1135
1136ifeq ($(CONFIG_TLS), gnutls)
1137ifndef CONFIG_CRYPTO
1138# default to libgcrypt
1139CONFIG_CRYPTO=gnutls
1140endif
1141ifdef TLS_FUNCS
1142OBJS += src/crypto/tls_gnutls.c
1143LIBS += -lgnutls -lgpg-error
1144endif
1145OBJS += src/crypto/crypto_$(CONFIG_CRYPTO).c
1146OBJS_p += src/crypto/crypto_$(CONFIG_CRYPTO).c
1147ifdef NEED_FIPS186_2_PRF
1148OBJS += src/crypto/fips_prf_internal.c
1149OBJS += src/crypto/sha1-internal.c
1150endif
1151ifeq ($(CONFIG_CRYPTO), gnutls)
1152LIBS += -lgcrypt
1153LIBS_p += -lgcrypt
1154CONFIG_INTERNAL_RC4=y
1155CONFIG_INTERNAL_DH_GROUP5=y
1156endif
1157ifeq ($(CONFIG_CRYPTO), nettle)
1158LIBS += -lnettle -lgmp
1159LIBS_p += -lnettle -lgmp
1160CONFIG_INTERNAL_RC4=y
1161CONFIG_INTERNAL_DH_GROUP5=y
1162endif
1163endif
1164
1165ifeq ($(CONFIG_TLS), internal)
1166ifndef CONFIG_CRYPTO
1167CONFIG_CRYPTO=internal
1168endif
1169ifdef TLS_FUNCS
1170OBJS += src/crypto/crypto_internal-rsa.c
1171OBJS += src/crypto/tls_internal.c
1172OBJS += src/tls/tlsv1_common.c
1173OBJS += src/tls/tlsv1_record.c
1174OBJS += src/tls/tlsv1_cred.c
1175OBJS += src/tls/tlsv1_client.c
1176OBJS += src/tls/tlsv1_client_write.c
1177OBJS += src/tls/tlsv1_client_read.c
1178OBJS += src/tls/tlsv1_client_ocsp.c
1179NEED_ASN1=y
1180OBJS += src/tls/rsa.c
1181OBJS += src/tls/x509v3.c
1182OBJS += src/tls/pkcs1.c
1183OBJS += src/tls/pkcs5.c
1184OBJS += src/tls/pkcs8.c
1185NEED_BASE64=y
1186NEED_TLS_PRF=y
1187ifdef CONFIG_TLSV12
1188NEED_TLS_PRF_SHA256=y
1189endif
1190NEED_MODEXP=y
1191NEED_CIPHER=y
1192L_CFLAGS += -DCONFIG_TLS_INTERNAL_CLIENT
1193endif
1194ifdef NEED_CIPHER
1195NEED_DES=y
1196OBJS += src/crypto/crypto_internal-cipher.c
1197endif
1198ifdef NEED_MODEXP
1199OBJS += src/crypto/crypto_internal-modexp.c
1200OBJS += src/tls/bignum.c
1201endif
1202ifeq ($(CONFIG_CRYPTO), libtomcrypt)
1203OBJS += src/crypto/crypto_libtomcrypt.c
1204OBJS_p += src/crypto/crypto_libtomcrypt.c
1205LIBS += -ltomcrypt -ltfm
1206LIBS_p += -ltomcrypt -ltfm
1207CONFIG_INTERNAL_SHA256=y
1208CONFIG_INTERNAL_RC4=y
1209CONFIG_INTERNAL_DH_GROUP5=y
1210endif
1211ifeq ($(CONFIG_CRYPTO), internal)
1212OBJS += src/crypto/crypto_internal.c
1213OBJS_p += src/crypto/crypto_internal.c
1214NEED_AES_ENC=y
1215L_CFLAGS += -DCONFIG_CRYPTO_INTERNAL
1216ifdef CONFIG_INTERNAL_LIBTOMMATH
1217L_CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH
1218ifdef CONFIG_INTERNAL_LIBTOMMATH_FAST
1219L_CFLAGS += -DLTM_FAST
1220endif
1221else
1222LIBS += -ltommath
1223LIBS_p += -ltommath
1224endif
1225CONFIG_INTERNAL_AES=y
1226CONFIG_INTERNAL_DES=y
1227CONFIG_INTERNAL_SHA1=y
1228CONFIG_INTERNAL_MD4=y
1229CONFIG_INTERNAL_MD5=y
1230CONFIG_INTERNAL_SHA256=y
1231CONFIG_INTERNAL_SHA384=y
1232CONFIG_INTERNAL_SHA512=y
1233CONFIG_INTERNAL_RC4=y
1234CONFIG_INTERNAL_DH_GROUP5=y
1235endif
1236ifeq ($(CONFIG_CRYPTO), cryptoapi)
1237OBJS += src/crypto/crypto_cryptoapi.c
1238OBJS_p += src/crypto/crypto_cryptoapi.c
1239L_CFLAGS += -DCONFIG_CRYPTO_CRYPTOAPI
1240CONFIG_INTERNAL_SHA256=y
1241CONFIG_INTERNAL_RC4=y
1242endif
1243endif
1244
1245ifeq ($(CONFIG_TLS), none)
1246ifdef TLS_FUNCS
1247OBJS += src/crypto/tls_none.c
1248L_CFLAGS += -DEAP_TLS_NONE
1249CONFIG_INTERNAL_AES=y
1250CONFIG_INTERNAL_SHA1=y
1251CONFIG_INTERNAL_MD5=y
1252endif
1253OBJS += src/crypto/crypto_none.c
1254OBJS_p += src/crypto/crypto_none.c
1255CONFIG_INTERNAL_SHA256=y
1256CONFIG_INTERNAL_RC4=y
1257endif
1258
1259ifdef TLS_FUNCS
1260ifdef CONFIG_SMARTCARD
1261ifndef CONFIG_NATIVE_WINDOWS
1262ifneq ($(CONFIG_L2_PACKET), freebsd)
1263LIBS += -ldl
1264endif
1265endif
1266endif
1267endif
1268
1269ifndef TLS_FUNCS
1270OBJS += src/crypto/tls_none.c
1271ifeq ($(CONFIG_TLS), internal)
1272CONFIG_INTERNAL_AES=y
1273CONFIG_INTERNAL_SHA1=y
1274CONFIG_INTERNAL_MD5=y
1275CONFIG_INTERNAL_RC4=y
1276endif
1277endif
1278
1279AESOBJS = # none so far (see below)
1280ifdef CONFIG_INTERNAL_AES
1281AESOBJS += src/crypto/aes-internal.c src/crypto/aes-internal-dec.c
1282endif
1283
1284ifneq ($(CONFIG_TLS), openssl)
1285NEED_INTERNAL_AES_WRAP=y
1286endif
1287ifdef CONFIG_OPENSSL_INTERNAL_AES_WRAP
1288# Seems to be needed at least with BoringSSL
1289NEED_INTERNAL_AES_WRAP=y
1290L_CFLAGS += -DCONFIG_OPENSSL_INTERNAL_AES_WRAP
1291endif
1292ifdef CONFIG_FIPS
1293# Have to use internal AES key wrap routines to use OpenSSL EVP since the
1294# OpenSSL AES_wrap_key()/AES_unwrap_key() API is not available in FIPS mode.
1295NEED_INTERNAL_AES_WRAP=y
1296endif
1297
1298ifdef NEED_INTERNAL_AES_WRAP
1299AESOBJS += src/crypto/aes-unwrap.c
1300endif
1301ifdef NEED_AES_EAX
1302AESOBJS += src/crypto/aes-eax.c
1303NEED_AES_CTR=y
1304endif
1305ifdef NEED_AES_SIV
1306AESOBJS += src/crypto/aes-siv.c
1307NEED_AES_CTR=y
1308endif
1309ifdef NEED_AES_CTR
1310AESOBJS += src/crypto/aes-ctr.c
1311endif
1312ifdef NEED_AES_ENCBLOCK
1313AESOBJS += src/crypto/aes-encblock.c
1314endif
1315NEED_AES_ENC=y
1316ifneq ($(CONFIG_TLS), openssl)
1317AESOBJS += src/crypto/aes-omac1.c
1318endif
1319ifdef NEED_AES_WRAP
1320NEED_AES_ENC=y
1321ifdef NEED_INTERNAL_AES_WRAP
1322AESOBJS += src/crypto/aes-wrap.c
1323endif
1324endif
1325ifdef NEED_AES_CBC
1326NEED_AES_ENC=y
1327ifneq ($(CONFIG_TLS), openssl)
1328AESOBJS += src/crypto/aes-cbc.c
1329endif
1330endif
1331ifdef NEED_AES_ENC
1332ifdef CONFIG_INTERNAL_AES
1333AESOBJS += src/crypto/aes-internal-enc.c
1334endif
1335endif
1336ifdef NEED_AES
1337OBJS += $(AESOBJS)
1338endif
1339
1340SHA1OBJS =
1341ifdef NEED_SHA1
1342ifneq ($(CONFIG_TLS), openssl)
1343ifneq ($(CONFIG_TLS), gnutls)
1344SHA1OBJS += src/crypto/sha1.c
1345endif
1346endif
1347SHA1OBJS += src/crypto/sha1-prf.c
1348ifdef CONFIG_INTERNAL_SHA1
1349SHA1OBJS += src/crypto/sha1-internal.c
1350ifdef NEED_FIPS186_2_PRF
1351SHA1OBJS += src/crypto/fips_prf_internal.c
1352endif
1353endif
1354ifdef CONFIG_NO_WPA_PASSPHRASE
1355L_CFLAGS += -DCONFIG_NO_PBKDF2
1356else
1357ifneq ($(CONFIG_TLS), openssl)
1358SHA1OBJS += src/crypto/sha1-pbkdf2.c
1359endif
1360endif
1361ifdef NEED_T_PRF
1362SHA1OBJS += src/crypto/sha1-tprf.c
1363endif
1364ifdef NEED_TLS_PRF
1365SHA1OBJS += src/crypto/sha1-tlsprf.c
1366endif
1367endif
1368
1369MD5OBJS =
1370ifndef CONFIG_FIPS
1371ifneq ($(CONFIG_TLS), openssl)
1372ifneq ($(CONFIG_TLS), gnutls)
1373MD5OBJS += src/crypto/md5.c
1374endif
1375endif
1376endif
1377ifdef NEED_MD5
1378ifdef CONFIG_INTERNAL_MD5
1379MD5OBJS += src/crypto/md5-internal.c
1380endif
1381OBJS += $(MD5OBJS)
1382OBJS_p += $(MD5OBJS)
1383endif
1384
1385ifdef NEED_MD4
1386ifdef CONFIG_INTERNAL_MD4
1387OBJS += src/crypto/md4-internal.c
1388endif
1389endif
1390
1391DESOBJS = # none needed when not internal
1392ifdef NEED_DES
1393ifdef CONFIG_INTERNAL_DES
1394DESOBJS += src/crypto/des-internal.c
1395endif
1396endif
1397
1398ifdef CONFIG_NO_RC4
1399L_CFLAGS += -DCONFIG_NO_RC4
1400endif
1401
1402ifdef NEED_RC4
1403ifdef CONFIG_INTERNAL_RC4
1404ifndef CONFIG_NO_RC4
1405OBJS += src/crypto/rc4.c
1406endif
1407endif
1408endif
1409
1410ifdef CONFIG_SAE
1411ifdef NEED_SHA384
1412# Need to add HMAC-SHA384 KDF as well, if SHA384 was enabled.
1413NEED_HMAC_SHA384_KDF=y
1414endif
1415ifdef NEED_SHA512
1416# Need to add HMAC-SHA512 KDF as well, if SHA512 was enabled.
1417NEED_HMAC_SHA512_KDF=y
1418endif
1419endif
1420
1421SHA256OBJS = # none by default
1422L_CFLAGS += -DCONFIG_SHA256
1423ifneq ($(CONFIG_TLS), openssl)
1424ifneq ($(CONFIG_TLS), gnutls)
1425SHA256OBJS += src/crypto/sha256.c
1426endif
1427endif
1428SHA256OBJS += src/crypto/sha256-prf.c
1429ifdef CONFIG_INTERNAL_SHA256
1430SHA256OBJS += src/crypto/sha256-internal.c
1431endif
1432ifdef CONFIG_INTERNAL_SHA384
1433L_CFLAGS += -DCONFIG_INTERNAL_SHA384
1434SHA256OBJS += src/crypto/sha384-internal.c
1435endif
1436ifdef CONFIG_INTERNAL_SHA512
1437L_CFLAGS += -DCONFIG_INTERNAL_SHA512
1438SHA256OBJS += src/crypto/sha512-internal.c
1439endif
1440ifdef NEED_TLS_PRF_SHA256
1441SHA256OBJS += src/crypto/sha256-tlsprf.c
1442endif
1443ifdef NEED_TLS_PRF_SHA384
1444SHA256OBJS += src/crypto/sha384-tlsprf.c
1445endif
1446ifdef NEED_HMAC_SHA256_KDF
1447L_CFLAGS += -DCONFIG_HMAC_SHA256_KDF
1448SHA256OBJS += src/crypto/sha256-kdf.c
1449endif
1450ifdef NEED_HMAC_SHA384_KDF
1451L_CFLAGS += -DCONFIG_HMAC_SHA384_KDF
1452SHA256OBJS += src/crypto/sha384-kdf.c
1453endif
1454ifdef NEED_HMAC_SHA512_KDF
1455L_CFLAGS += -DCONFIG_HMAC_SHA512_KDF
1456SHA256OBJS += src/crypto/sha512-kdf.c
1457endif
1458OBJS += $(SHA256OBJS)
1459ifdef NEED_SHA384
1460L_CFLAGS += -DCONFIG_SHA384
1461ifneq ($(CONFIG_TLS), openssl)
1462ifneq ($(CONFIG_TLS), gnutls)
1463OBJS += src/crypto/sha384.c
1464endif
1465endif
1466OBJS += src/crypto/sha384-prf.c
1467endif
1468ifdef NEED_SHA512
1469L_CFLAGS += -DCONFIG_SHA512
1470ifneq ($(CONFIG_TLS), openssl)
1471ifneq ($(CONFIG_TLS), gnutls)
1472OBJS += src/crypto/sha512.c
1473endif
1474endif
1475OBJS += src/crypto/sha512-prf.c
1476endif
1477
1478ifdef NEED_ASN1
1479OBJS += src/tls/asn1.c
1480endif
1481
1482ifdef NEED_DH_GROUPS
1483OBJS += src/crypto/dh_groups.c
1484endif
1485ifdef NEED_DH_GROUPS_ALL
1486L_CFLAGS += -DALL_DH_GROUPS
1487endif
1488ifdef CONFIG_INTERNAL_DH_GROUP5
1489ifdef NEED_DH_GROUPS
1490OBJS += src/crypto/dh_group5.c
1491endif
1492endif
1493
1494ifdef NEED_ECC
1495L_CFLAGS += -DCONFIG_ECC
1496endif
1497
1498ifdef CONFIG_NO_RANDOM_POOL
1499L_CFLAGS += -DCONFIG_NO_RANDOM_POOL
1500else
1501OBJS += src/crypto/random.c
1502endif
1503
1504ifdef CONFIG_CTRL_IFACE
1505ifeq ($(CONFIG_CTRL_IFACE), y)
1506ifdef CONFIG_NATIVE_WINDOWS
1507CONFIG_CTRL_IFACE=named_pipe
1508else
1509CONFIG_CTRL_IFACE=unix
1510endif
1511endif
1512L_CFLAGS += -DCONFIG_CTRL_IFACE
1513ifeq ($(CONFIG_CTRL_IFACE), unix)
1514L_CFLAGS += -DCONFIG_CTRL_IFACE_UNIX
1515OBJS += src/common/ctrl_iface_common.c
1516endif
1517ifeq ($(CONFIG_CTRL_IFACE), udp)
1518L_CFLAGS += -DCONFIG_CTRL_IFACE_UDP
1519endif
1520ifeq ($(CONFIG_CTRL_IFACE), named_pipe)
1521L_CFLAGS += -DCONFIG_CTRL_IFACE_NAMED_PIPE
1522endif
1523ifeq ($(CONFIG_CTRL_IFACE), udp-remote)
1524CONFIG_CTRL_IFACE=udp
1525L_CFLAGS += -DCONFIG_CTRL_IFACE_UDP
1526L_CFLAGS += -DCONFIG_CTRL_IFACE_UDP_REMOTE
1527endif
1528OBJS += ctrl_iface.c ctrl_iface_$(CONFIG_CTRL_IFACE).c
1529endif
1530
1531ifdef CONFIG_CTRL_IFACE_DBUS_NEW
1532L_CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_NEW
1533OBJS += dbus/dbus_dict_helpers.c
1534OBJS += dbus/dbus_new_helpers.c
1535OBJS += dbus/dbus_new.c dbus/dbus_new_handlers.c
1536OBJS += dbus/dbus_common.c
1537ifdef CONFIG_WPS
1538OBJS += dbus/dbus_new_handlers_wps.c
1539endif
1540ifdef CONFIG_P2P
1541OBJS += dbus/dbus_new_handlers_p2p.c
1542endif
1543ifdef CONFIG_CTRL_IFACE_DBUS_INTRO
1544OBJS += dbus/dbus_new_introspect.c
1545L_CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_INTRO
1546endif
1547L_CFLAGS += $(DBUS_INCLUDE)
1548endif
1549
1550ifdef CONFIG_CTRL_IFACE_BINDER
1551WPA_SUPPLICANT_USE_BINDER=y
1552L_CFLAGS += -DCONFIG_BINDER -DCONFIG_CTRL_IFACE_BINDER
1553endif
1554
1555ifdef CONFIG_READLINE
1556OBJS_c += src/utils/edit_readline.c
1557LIBS_c += -lncurses -lreadline
1558else
1559ifdef CONFIG_WPA_CLI_EDIT
1560OBJS_c += src/utils/edit.c
1561else
1562OBJS_c += src/utils/edit_simple.c
1563endif
1564endif
1565
1566ifdef CONFIG_NATIVE_WINDOWS
1567L_CFLAGS += -DCONFIG_NATIVE_WINDOWS
1568LIBS += -lws2_32 -lgdi32 -lcrypt32
1569LIBS_c += -lws2_32
1570LIBS_p += -lws2_32 -lgdi32
1571ifeq ($(CONFIG_CRYPTO), cryptoapi)
1572LIBS_p += -lcrypt32
1573endif
1574endif
1575
1576ifdef CONFIG_NO_STDOUT_DEBUG
1577L_CFLAGS += -DCONFIG_NO_STDOUT_DEBUG
1578ifndef CONFIG_CTRL_IFACE
1579L_CFLAGS += -DCONFIG_NO_WPA_MSG
1580endif
1581endif
1582
1583ifdef CONFIG_ANDROID_LOG
1584L_CFLAGS += -DCONFIG_ANDROID_LOG
1585endif
1586
1587ifdef CONFIG_IPV6
1588# for eapol_test only
1589L_CFLAGS += -DCONFIG_IPV6
1590endif
1591
1592ifdef NEED_BASE64
1593OBJS += src/utils/base64.c
1594endif
1595
1596ifdef NEED_SME
1597OBJS += sme.c
1598L_CFLAGS += -DCONFIG_SME
1599endif
1600
1601OBJS += src/common/ieee802_11_common.c
1602OBJS += src/common/hw_features_common.c
1603
1604ifdef NEED_EAP_COMMON
1605OBJS += src/eap_common/eap_common.c
1606endif
1607
1608ifndef CONFIG_MAIN
1609CONFIG_MAIN=main
1610endif
1611
1612ifdef CONFIG_DEBUG_SYSLOG
1613L_CFLAGS += -DCONFIG_DEBUG_SYSLOG
1614ifdef CONFIG_DEBUG_SYSLOG_FACILITY
1615L_CFLAGS += -DLOG_HOSTAPD="$(CONFIG_DEBUG_SYSLOG_FACILITY)"
1616endif
1617endif
1618
1619ifdef CONFIG_DEBUG_LINUX_TRACING
1620L_CFLAGS += -DCONFIG_DEBUG_LINUX_TRACING
1621endif
1622
1623ifdef CONFIG_DEBUG_FILE
1624L_CFLAGS += -DCONFIG_DEBUG_FILE
1625endif
1626
1627ifdef CONFIG_DELAYED_MIC_ERROR_REPORT
1628L_CFLAGS += -DCONFIG_DELAYED_MIC_ERROR_REPORT
1629endif
1630
1631ifdef CONFIG_FIPS
1632L_CFLAGS += -DCONFIG_FIPS
1633endif
1634
1635OBJS += $(SHA1OBJS) $(DESOBJS)
1636
1637OBJS_p += $(SHA1OBJS)
1638OBJS_p += $(SHA256OBJS)
1639
1640ifdef CONFIG_BGSCAN_SIMPLE
1641L_CFLAGS += -DCONFIG_BGSCAN_SIMPLE
1642OBJS += bgscan_simple.c
1643NEED_BGSCAN=y
1644endif
1645
1646ifdef CONFIG_BGSCAN_LEARN
1647L_CFLAGS += -DCONFIG_BGSCAN_LEARN
1648OBJS += bgscan_learn.c
1649NEED_BGSCAN=y
1650endif
1651
1652ifdef NEED_BGSCAN
1653L_CFLAGS += -DCONFIG_BGSCAN
1654OBJS += bgscan.c
1655endif
1656
1657ifdef CONFIG_AUTOSCAN_EXPONENTIAL
1658L_CFLAGS += -DCONFIG_AUTOSCAN_EXPONENTIAL
1659OBJS += autoscan_exponential.c
1660NEED_AUTOSCAN=y
1661endif
1662
1663ifdef CONFIG_AUTOSCAN_PERIODIC
1664L_CFLAGS += -DCONFIG_AUTOSCAN_PERIODIC
1665OBJS += autoscan_periodic.c
1666NEED_AUTOSCAN=y
1667endif
1668
1669ifdef NEED_AUTOSCAN
1670L_CFLAGS += -DCONFIG_AUTOSCAN
1671OBJS += autoscan.c
1672endif
1673
1674ifdef CONFIG_EXT_PASSWORD_TEST
1675OBJS += src/utils/ext_password_test.c
1676L_CFLAGS += -DCONFIG_EXT_PASSWORD_TEST
1677NEED_EXT_PASSWORD=y
1678endif
1679
1680ifdef CONFIG_EXT_PASSWORD_FILE
1681OBJS += src/utils/ext_password_file.c
1682L_CFLAGS += -DCONFIG_EXT_PASSWORD_FILE
1683NEED_EXT_PASSWORD=y
1684endif
1685
1686ifdef NEED_EXT_PASSWORD
1687OBJS += src/utils/ext_password.c
1688L_CFLAGS += -DCONFIG_EXT_PASSWORD
1689endif
1690
1691ifdef NEED_GAS_SERVER
1692OBJS += src/common/gas_server.c
1693L_CFLAGS += -DCONFIG_GAS_SERVER
1694NEED_GAS=y
1695endif
1696
1697ifdef NEED_GAS
1698OBJS += src/common/gas.c
1699OBJS += gas_query.c
1700L_CFLAGS += -DCONFIG_GAS
1701NEED_OFFCHANNEL=y
1702endif
1703
1704ifdef NEED_OFFCHANNEL
1705OBJS += offchannel.c
1706L_CFLAGS += -DCONFIG_OFFCHANNEL
1707endif
1708
1709ifdef NEED_JSON
1710OBJS += src/utils/json.c
1711L_CFLAGS += -DCONFIG_JSON
1712endif
1713
1714OBJS += src/drivers/driver_common.c
1715
1716OBJS += wpa_supplicant.c events.c bssid_ignore.c wpas_glue.c scan.c
1717OBJS_t := $(OBJS) $(OBJS_l2) eapol_test.c
1718OBJS_t += src/radius/radius_client.c
1719OBJS_t += src/radius/radius.c
1720OBJS_t2 := $(OBJS) $(OBJS_l2) preauth_test.c
1721OBJS += $(CONFIG_MAIN).c
1722
1723ifdef CONFIG_PRIVSEP
1724OBJS_priv += $(OBJS_d) src/drivers/drivers.c
1725OBJS_priv += $(OBJS_l2)
1726OBJS_priv += src/utils/os_$(CONFIG_OS).c
1727OBJS_priv += src/utils/$(CONFIG_ELOOP).c
1728OBJS_priv += src/utils/common.c
1729OBJS_priv += src/utils/wpa_debug.c
1730OBJS_priv += src/utils/wpabuf.c
1731OBJS_priv += wpa_priv.c
1732ifdef CONFIG_DRIVER_NL80211
1733OBJS_priv += src/common/ieee802_11_common.c
1734endif
1735OBJS += src/l2_packet/l2_packet_privsep.c
1736OBJS += src/drivers/driver_privsep.c
1737EXTRA_progs += wpa_priv
1738else
1739OBJS += $(OBJS_d) src/drivers/drivers.c
1740OBJS += $(OBJS_l2)
1741endif
1742
1743ifdef CONFIG_NDIS_EVENTS_INTEGRATED
1744L_CFLAGS += -DCONFIG_NDIS_EVENTS_INTEGRATED
1745OBJS += src/drivers/ndis_events.c
1746EXTRALIBS += -loleaut32 -lole32 -luuid
1747ifdef PLATFORMSDKLIB
1748EXTRALIBS += $(PLATFORMSDKLIB)/WbemUuid.Lib
1749else
1750EXTRALIBS += WbemUuid.Lib
1751endif
1752endif
1753
1754ifndef LDO
1755LDO=$(CC)
1756endif
1757
1758PASNOBJS =
1759PASNOBJS += src/utils/$(CONFIG_ELOOP).c
1760PASNOBJS += src/utils/wpa_debug.c
1761PASNOBJS += src/utils/wpabuf.c
1762PASNOBJS += src/utils/os_$(CONFIG_OS).c
1763PASNOBJS += src/utils/config.c
1764PASNOBJS += src/utils/common.c
1765
1766ifdef NEED_BASE64
1767PASNOBJS += src/utils/base64.c
1768endif
1769
1770ifdef CONFIG_WPA_TRACE
1771PASNOBJS += src/utils/trace.c
1772endif
1773
1774ifdef CONFIG_EXT_PASSWORD_FILE
1775PASNOBJS += src/utils/ext_password_file.c
1776endif
1777
1778ifdef CONFIG_EXT_PASSWORD_TEST
1779PASNOBJS += src/utils/ext_password_test.c
1780endif
1781
1782ifdef NEED_EXT_PASSWORD
1783PASNOBJS += src/utils/ext_password.c
1784endif
1785
1786ifdef CONFIG_SAE
1787PASNOBJS += src/common/sae.c
1788endif
1789
1790ifdef CONFIG_SAE_PK
1791PASNOBJS += src/common/sae_pk.c
1792endif
1793
1794ifndef CONFIG_NO_WPA
1795PASNOBJS += src/common/wpa_common.c
1796endif
1797
1798PASNOBJS += src/common/ieee802_11_common.c
1799
1800ifdef NEED_DRAGONFLY
1801PASNOBJS += src/common/dragonfly.c
1802endif
1803
1804PASNOBJS += src/common/ptksa_cache.c
1805
1806PASNOBJS += src/rsn_supp/pmksa_cache.c
1807
1808ifndef CONFIG_NO_WPA
1809PASNOBJS += src/rsn_supp/wpa_ie.c
1810endif
1811
1812PASNOBJS += src/ap/comeback_token.c
1813PASNOBJS += src/ap/pmksa_cache_auth.c
1814
1815ifdef NEED_EAP_COMMON
1816PASNOBJS += src/eap_common/eap_common.c
1817endif
1818
1819ifdef CHAP
1820PASNOBJS += src/eap_common/chap.c
1821endif
1822
1823ifdef CONFIG_IEEE8021X_EAPOL
1824PASNOBJS += src/eap_peer/eap.c
1825PASNOBJS += src/eap_peer/eap_methods.c
1826PASNOBJS += src/eapol_supp/eapol_supp_sm.c
1827endif
1828
1829ifeq ($(CONFIG_TLS), openssl)
1830PASNOBJS += src/crypto/crypto_openssl.c
1831ifdef TLS_FUNCS
1832PASNOBJS += src/crypto/tls_openssl.c
1833PASNOBJS += -lssl -lcrypto
1834NEED_TLS_PRF_SHA256=y
1835endif
1836endif
1837
1838ifeq ($(CONFIG_TLS), gnutls)
1839PASNOBJS += src/crypto/crypto_$(CONFIG_CRYPTO).c
1840ifdef TLS_FUNCS
1841PASNOBJS += src/crypto/tls_gnutls.c
1842PASNOBJS += -lgnutls -lgpg-error
1843PASNOBJS += -lgcrypt
1844endif
1845endif
1846
1847ifdef NEED_TLS_PRF_SHA256
1848PASNOBJS += src/crypto/sha256-tlsprf.c
1849endif
1850
1851ifdef NEED_SHA512
1852PASNOBJS += src/crypto/sha512-prf.c
1853endif
1854
1855ifdef NEED_SHA384
1856PASNOBJS += src/crypto/sha384-prf.c
1857endif
1858
1859PASNOBJS += src/crypto/sha256-prf.c
1860
1861ifdef NEED_HMAC_SHA512_KDF
1862PASNOBJS += src/crypto/sha512-kdf.c
1863endif
1864
1865ifdef NEED_HMAC_SHA384_KDF
1866PASNOBJS += src/crypto/sha384-kdf.c
1867endif
1868
1869ifdef NEED_HMAC_SHA256_KDF
1870PASNOBJS += src/crypto/sha256-kdf.c
1871endif
1872
1873ifdef NEED_DH_GROUPS
1874PASNOBJS += src/crypto/dh_groups.c
1875endif
1876
1877ifdef NEED_AES_SIV
1878PASNOBJS += src/crypto/aes-siv.c
1879endif
1880
1881ifdef NEED_AES_CTR
1882PASNOBJS += src/crypto/aes-ctr.c
1883endif
1884
1885ifdef NEED_SHA1
1886PASNOBJS += src/crypto/sha1-prf.c
1887ifdef NEED_TLS_PRF
1888PASNOBJS += src/crypto/sha1-tlsprf.c
1889endif
1890endif
1891
1892PASNOBJS += src/pasn/pasn_initiator.c
1893PASNOBJS += src/pasn/pasn_responder.c
1894PASNOBJS += src/pasn/pasn_common.c
1895
1896########################
1897
1898include $(CLEAR_VARS)
1899LOCAL_MODULE := wpa_cli
1900LOCAL_MODULE_TAGS := debug
1901LOCAL_SHARED_LIBRARIES := libc libcutils liblog
1902LOCAL_CFLAGS := $(L_CFLAGS)
1903LOCAL_SRC_FILES := $(OBJS_c)
1904LOCAL_C_INCLUDES := $(INCLUDES)
1905include $(BUILD_EXECUTABLE)
1906
1907########################
1908include $(CLEAR_VARS)
1909LOCAL_MODULE := wpa_supplicant
1910ifdef CONFIG_DRIVER_CUSTOM
1911LOCAL_STATIC_LIBRARIES := libCustomWifi
1912endif
1913ifneq ($(BOARD_WPA_SUPPLICANT_PRIVATE_LIB),)
1914LOCAL_STATIC_LIBRARIES += $(BOARD_WPA_SUPPLICANT_PRIVATE_LIB)
1915endif
1916LOCAL_SHARED_LIBRARIES := libc libcutils liblog
1917ifdef CONFIG_EAP_PROXY
1918LOCAL_STATIC_LIBRARIES += $(LIB_STATIC_EAP_PROXY)
1919LOCAL_SHARED_LIBRARIES += $(LIB_SHARED_EAP_PROXY)
1920endif
1921ifeq ($(CONFIG_TLS), openssl)
1922LOCAL_SHARED_LIBRARIES += libcrypto libssl libkeystore_binder
1923endif
1924
1925# With BoringSSL we need libkeystore-engine in order to provide access to
1926# keystore keys.
1927LOCAL_SHARED_LIBRARIES += libkeystore-engine
1928
1929ifdef CONFIG_DRIVER_NL80211
1930ifneq ($(wildcard external/libnl),)
1931LOCAL_SHARED_LIBRARIES += libnl
1932else
1933LOCAL_STATIC_LIBRARIES += libnl_2
1934endif
1935endif
1936LOCAL_CFLAGS := $(L_CFLAGS)
1937LOCAL_SRC_FILES := $(OBJS)
1938LOCAL_C_INCLUDES := $(INCLUDES)
1939ifeq ($(DBUS), y)
1940LOCAL_SHARED_LIBRARIES += libdbus
1941endif
1942ifeq ($(WPA_SUPPLICANT_USE_BINDER), y)
1943LOCAL_SHARED_LIBRARIES += libbinder libutils
1944LOCAL_STATIC_LIBRARIES += libwpa_binder libwpa_binder_interface
1945endif
1946include $(BUILD_EXECUTABLE)
1947
1948########################
1949#
1950#include $(CLEAR_VARS)
1951#LOCAL_MODULE := eapol_test
1952#ifdef CONFIG_DRIVER_CUSTOM
1953#LOCAL_STATIC_LIBRARIES := libCustomWifi
1954#endif
1955#LOCAL_SHARED_LIBRARIES := libc libcrypto libssl
1956#LOCAL_CFLAGS := $(L_CFLAGS)
1957#LOCAL_SRC_FILES := $(OBJS_t)
1958#LOCAL_C_INCLUDES := $(INCLUDES)
1959#include $(BUILD_EXECUTABLE)
1960#
1961########################
1962#
1963#local_target_dir := $(TARGET_OUT)/etc/wifi
1964#
1965#include $(CLEAR_VARS)
1966#LOCAL_MODULE := wpa_supplicant.conf
1967#LOCAL_MODULE_CLASS := ETC
1968#LOCAL_MODULE_PATH := $(local_target_dir)
1969#LOCAL_SRC_FILES := $(LOCAL_MODULE)
1970#include $(BUILD_PREBUILT)
1971#
1972########################
1973
1974include $(CLEAR_VARS)
1975LOCAL_MODULE = libwpa_client
1976LOCAL_CFLAGS = $(L_CFLAGS)
1977LOCAL_SRC_FILES = src/common/wpa_ctrl.c src/utils/os_$(CONFIG_OS).c
1978LOCAL_C_INCLUDES = $(INCLUDES)
1979LOCAL_SHARED_LIBRARIES := libcutils liblog
1980LOCAL_COPY_HEADERS_TO := libwpa_client
1981LOCAL_COPY_HEADERS := src/common/wpa_ctrl.h
1982LOCAL_COPY_HEADERS += src/common/qca-vendor.h
1983include $(BUILD_SHARED_LIBRARY)
1984
1985ifeq ($(WPA_SUPPLICANT_USE_BINDER), y)
1986### Binder interface library ###
1987########################
1988
1989include $(CLEAR_VARS)
1990LOCAL_MODULE := libwpa_binder_interface
1991LOCAL_AIDL_INCLUDES := \
1992    $(LOCAL_PATH)/binder \
1993    frameworks/native/aidl/binder
1994LOCAL_EXPORT_C_INCLUDE_DIRS := \
1995    $(LOCAL_PATH)/binder
1996LOCAL_CPPFLAGS := $(L_CPPFLAGS)
1997LOCAL_SRC_FILES := \
1998    binder/binder_constants.cpp \
1999    binder/fi/w1/wpa_supplicant/ISupplicant.aidl \
2000    binder/fi/w1/wpa_supplicant/ISupplicantCallbacks.aidl \
2001    binder/fi/w1/wpa_supplicant/IIface.aidl
2002LOCAL_SHARED_LIBRARIES := libbinder
2003include $(BUILD_STATIC_LIBRARY)
2004
2005### Binder service library ###
2006########################
2007
2008include $(CLEAR_VARS)
2009LOCAL_MODULE := libwpa_binder
2010LOCAL_CPPFLAGS := $(L_CPPFLAGS)
2011LOCAL_CFLAGS := $(L_CFLAGS)
2012LOCAL_C_INCLUDES := $(INCLUDES)
2013LOCAL_SRC_FILES := \
2014    binder/binder.cpp binder/binder_manager.cpp \
2015    binder/supplicant.cpp binder/iface.cpp
2016LOCAL_SHARED_LIBRARIES := \
2017    libbinder \
2018    libutils
2019LOCAL_STATIC_LIBRARIES := libwpa_binder_interface
2020include $(BUILD_STATIC_LIBRARY)
2021
2022endif # BINDER == y
2023
2024include $(CLEAR_VARS)
2025LOCAL_MODULE = libpasn
2026LOCAL_CFLAGS = $(L_CFLAGS)
2027LOCAL_SRC_FILES = $(PASNOBJS)
2028LOCAL_C_INCLUDES = $(INCLUDES)
2029LOCAL_SHARED_LIBRARIES := libc libcutils liblog
2030ifeq ($(CONFIG_TLS), openssl)
2031LOCAL_SHARED_LIBRARIES := libcrypto libssl
2032endif
2033include $(BUILD_SHARED_LIBRARY)
2034