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