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