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