6 CFLAGS
= -MMD
-O2
-Wall
-g
10 CFLAGS
+= -I..
/src
/crypto
11 CFLAGS
+= -I..
/src
/utils
12 CFLAGS
+= -I..
/src
/common
13 CFLAGS
+= -I..
/src
/rsn_supp
15 ALL
=wpa_supplicant wpa_passphrase wpa_cli
17 all: verify_config
$(ALL
) dynamic_eap_methods
20 @if
[ ! -r .config
]; then \
21 echo
'Building wpa_supplicant requires a configuration file'; \
22 echo
'(.config). See README for more instructions. You can'; \
23 echo
'run "cp defconfig .config" to create an example'; \
24 echo
'configuration.'; \
29 @if
[ -e .config
]; then \
30 echo
'.config exists - did not replace it'; \
33 echo CONFIG_DRIVER_HOSTAP
=y
>> .config
34 echo CONFIG_DRIVER_WEXT
=y
>> .config
35 echo CONFIG_WIRELESS_EXTENSION
=y
>> .config
38 mkdir
-p
$(DESTDIR
)/usr
/local
/sbin
/
39 for i in
$(ALL
); do cp
$$i $(DESTDIR
)/usr
/local
/sbin
/$$i; done
42 OBJS
+= ..
/src
/utils
/common.o
43 OBJS
+= ..
/src
/utils
/wpa_debug.o
44 OBJS
+= ..
/src
/utils
/wpabuf.o
45 OBJS
+= ..
/src
/crypto
/md5.o
46 OBJS
+= ..
/src
/crypto
/rc4.o
47 OBJS
+= ..
/src
/crypto
/md4.o
48 OBJS
+= ..
/src
/crypto
/sha1.o
49 OBJS
+= ..
/src
/crypto
/des.o
50 OBJS_p
= wpa_passphrase.o
51 OBJS_p
+= ..
/src
/utils
/common.o
52 OBJS_p
+= ..
/src
/utils
/wpa_debug.o
53 OBJS_p
+= ..
/src
/crypto
/md5.o
54 OBJS_p
+= ..
/src
/crypto
/md4.o
55 OBJS_p
+= ..
/src
/crypto
/sha1.o
56 OBJS_p
+= ..
/src
/crypto
/des.o
57 OBJS_c
= wpa_cli.o ..
/src
/common
/wpa_ctrl.o
62 ifdef CONFIG_NATIVE_WINDOWS
69 ifeq ($(CONFIG_OS
), internal
)
70 CFLAGS
+= -DOS_NO_C_LIB_DEFINES
73 OBJS
+= ..
/src
/utils
/os_
$(CONFIG_OS
).o
74 OBJS_p
+= ..
/src
/utils
/os_
$(CONFIG_OS
).o
75 OBJS_c
+= ..
/src
/utils
/os_
$(CONFIG_OS
).o
80 OBJS
+= ..
/src
/utils
/$(CONFIG_ELOOP
).o
83 ifdef CONFIG_EAPOL_TEST
84 CFLAGS
+= -Werror
-DEAPOL_TEST
91 ifeq ($(CONFIG_BACKEND
), file
)
93 ifndef CONFIG_NO_CONFIG_BLOBS
96 CFLAGS
+= -DCONFIG_BACKEND_FILE
99 ifeq ($(CONFIG_BACKEND
), winreg
)
100 OBJS
+= config_winreg.o
103 ifeq ($(CONFIG_BACKEND
), none
)
104 OBJS
+= config_none.o
107 ifdef CONFIG_NO_CONFIG_WRITE
108 CFLAGS
+= -DCONFIG_NO_CONFIG_WRITE
111 ifdef CONFIG_NO_CONFIG_BLOBS
112 CFLAGS
+= -DCONFIG_NO_CONFIG_BLOBS
115 ifdef CONFIG_NO_SCAN_PROCESSING
116 CFLAGS
+= -DCONFIG_NO_SCAN_PROCESSING
119 ifdef CONFIG_DRIVER_HOSTAP
120 CFLAGS
+= -DCONFIG_DRIVER_HOSTAP
121 OBJS_d
+= ..
/src
/drivers
/driver_hostap.o
122 CONFIG_WIRELESS_EXTENSION
=y
125 ifdef CONFIG_DRIVER_WEXT
126 CFLAGS
+= -DCONFIG_DRIVER_WEXT
127 CONFIG_WIRELESS_EXTENSION
=y
130 ifdef CONFIG_DRIVER_NL80211
131 CFLAGS
+= -DCONFIG_DRIVER_NL80211
132 OBJS_d
+= ..
/src
/drivers
/driver_nl80211.o
136 ifdef CONFIG_DRIVER_PRISM54
137 CFLAGS
+= -DCONFIG_DRIVER_PRISM54
138 OBJS_d
+= ..
/src
/drivers
/driver_prism54.o
139 CONFIG_WIRELESS_EXTENSION
=y
142 ifdef CONFIG_DRIVER_HERMES
143 CFLAGS
+= -DCONFIG_DRIVER_HERMES
144 OBJS_d
+= ..
/src
/drivers
/driver_hermes.o
145 CONFIG_WIRELESS_EXTENSION
=y
148 ifdef CONFIG_DRIVER_MADWIFI
149 CFLAGS
+= -DCONFIG_DRIVER_MADWIFI
150 OBJS_d
+= ..
/src
/drivers
/driver_madwifi.o
151 CONFIG_WIRELESS_EXTENSION
=y
154 ifdef CONFIG_DRIVER_ATMEL
155 CFLAGS
+= -DCONFIG_DRIVER_ATMEL
156 OBJS_d
+= ..
/src
/drivers
/driver_atmel.o
157 CONFIG_WIRELESS_EXTENSION
=y
160 ifdef CONFIG_DRIVER_NDISWRAPPER
161 CFLAGS
+= -DCONFIG_DRIVER_NDISWRAPPER
162 OBJS_d
+= ..
/src
/drivers
/driver_ndiswrapper.o
163 CONFIG_WIRELESS_EXTENSION
=y
166 ifdef CONFIG_DRIVER_RALINK
167 CFLAGS
+= -DCONFIG_DRIVER_RALINK
168 OBJS_d
+= ..
/src
/drivers
/driver_ralink.o
171 ifdef CONFIG_DRIVER_BROADCOM
172 CFLAGS
+= -DCONFIG_DRIVER_BROADCOM
173 OBJS_d
+= ..
/src
/drivers
/driver_broadcom.o
176 ifdef CONFIG_DRIVER_IPW
177 CFLAGS
+= -DCONFIG_DRIVER_IPW
178 OBJS_d
+= ..
/src
/drivers
/driver_ipw.o
179 CONFIG_WIRELESS_EXTENSION
=y
182 ifdef CONFIG_DRIVER_BSD
183 CFLAGS
+= -DCONFIG_DRIVER_BSD
184 OBJS_d
+= ..
/src
/drivers
/driver_bsd.o
185 ifndef CONFIG_L2_PACKET
186 CONFIG_L2_PACKET
=freebsd
190 ifdef CONFIG_DRIVER_NDIS
191 CFLAGS
+= -DCONFIG_DRIVER_NDIS
192 OBJS_d
+= ..
/src
/drivers
/driver_ndis.o
193 ifdef CONFIG_NDIS_EVENTS_INTEGRATED
194 OBJS_d
+= ..
/src
/drivers
/driver_ndis_.o
196 ifndef CONFIG_L2_PACKET
197 CONFIG_L2_PACKET
=pcap
200 ifdef CONFIG_USE_NDISUIO
201 CFLAGS
+= -DCONFIG_USE_NDISUIO
205 ifdef CONFIG_DRIVER_WIRED
206 CFLAGS
+= -DCONFIG_DRIVER_WIRED
207 OBJS_d
+= ..
/src
/drivers
/driver_wired.o
210 ifdef CONFIG_DRIVER_TEST
211 CFLAGS
+= -DCONFIG_DRIVER_TEST
212 OBJS_d
+= ..
/src
/drivers
/driver_test.o
215 ifdef CONFIG_DRIVER_OSX
216 CFLAGS
+= -DCONFIG_DRIVER_OSX
217 OBJS_d
+= ..
/src
/drivers
/driver_osx.o
218 LDFLAGS
+= -framework CoreFoundation
219 LDFLAGS
+= -F
/System
/Library
/PrivateFrameworks
-framework Apple80211
222 ifdef CONFIG_DRIVER_PS3
223 CFLAGS
+= -DCONFIG_DRIVER_PS3
-m64
224 OBJS_d
+= ..
/src
/drivers
/driver_ps3.o
228 ifdef CONFIG_DRIVER_IPHONE
229 CFLAGS
+= -DCONFIG_DRIVER_IPHONE
230 OBJS_d
+= ..
/src
/drivers
/driver_iphone.o
231 OBJS_d
+= ..
/src
/drivers
/MobileApple80211.o
232 LIBS
+= -framework CoreFoundation
235 ifndef CONFIG_L2_PACKET
236 CONFIG_L2_PACKET
=linux
239 OBJS_l2
+= ..
/src
/l2_packet
/l2_packet_
$(CONFIG_L2_PACKET
).o
241 ifeq ($(CONFIG_L2_PACKET
), pcap
)
243 CFLAGS
+= -DCONFIG_WINPCAP
244 LIBS
+= -lwpcap
-lpacket
247 LIBS
+= -ldnet
-lpcap
251 ifeq ($(CONFIG_L2_PACKET
), winpcap
)
252 LIBS
+= -lwpcap
-lpacket
256 ifeq ($(CONFIG_L2_PACKET
), freebsd
)
262 ifeq ($(CONFIG_EAP_TLS
), dyn
)
263 CFLAGS
+= -DEAP_TLS_DYNAMIC
264 EAPDYN
+= ..
/src
/eap_peer
/eap_tls.so
267 OBJS
+= ..
/src
/eap_peer
/eap_tls.o
268 OBJS_h
+= ..
/src
/eap_server
/eap_tls.o
271 CONFIG_IEEE8021X_EAPOL
=y
274 ifdef CONFIG_EAP_PEAP
276 ifeq ($(CONFIG_EAP_PEAP
), dyn
)
277 CFLAGS
+= -DEAP_PEAP_DYNAMIC
278 EAPDYN
+= ..
/src
/eap_peer
/eap_peap.so
281 OBJS
+= ..
/src
/eap_peer
/eap_peap.o
282 OBJS
+= ..
/src
/eap_common
/eap_peap_common.o
283 OBJS_h
+= ..
/src
/eap_server
/eap_peap.o
286 CONFIG_IEEE8021X_EAPOL
=y
289 ifdef CONFIG_EAP_TTLS
291 ifeq ($(CONFIG_EAP_TTLS
), dyn
)
292 CFLAGS
+= -DEAP_TTLS_DYNAMIC
293 EAPDYN
+= ..
/src
/eap_peer
/eap_ttls.so
296 OBJS
+= ..
/src
/eap_peer
/eap_ttls.o
297 OBJS_h
+= ..
/src
/eap_server
/eap_ttls.o
302 CONFIG_IEEE8021X_EAPOL
=y
307 ifeq ($(CONFIG_EAP_MD5
), dyn
)
308 CFLAGS
+= -DEAP_MD5_DYNAMIC
309 EAPDYN
+= ..
/src
/eap_peer
/eap_md5.so
312 OBJS
+= ..
/src
/eap_peer
/eap_md5.o
313 OBJS_h
+= ..
/src
/eap_server
/eap_md5.o
316 CONFIG_IEEE8021X_EAPOL
=y
319 # backwards compatibility for old spelling
320 ifdef CONFIG_MSCHAPV2
321 ifndef CONFIG_EAP_MSCHAPV2
322 CONFIG_EAP_MSCHAPV2
=y
326 ifdef CONFIG_EAP_MSCHAPV2
328 ifeq ($(CONFIG_EAP_MSCHAPV2
), dyn
)
329 CFLAGS
+= -DEAP_MSCHAPv2_DYNAMIC
330 EAPDYN
+= ..
/src
/eap_peer
/eap_mschapv2.so
331 EAPDYN
+= ..
/src
/eap_peer
/mschapv2.so
333 CFLAGS
+= -DEAP_MSCHAPv2
334 OBJS
+= ..
/src
/eap_peer
/eap_mschapv2.o
335 OBJS
+= ..
/src
/eap_peer
/mschapv2.o
336 OBJS_h
+= ..
/src
/eap_server
/eap_mschapv2.o
339 CONFIG_IEEE8021X_EAPOL
=y
344 ifeq ($(CONFIG_EAP_GTC
), dyn
)
345 CFLAGS
+= -DEAP_GTC_DYNAMIC
346 EAPDYN
+= ..
/src
/eap_peer
/eap_gtc.so
349 OBJS
+= ..
/src
/eap_peer
/eap_gtc.o
350 OBJS_h
+= ..
/src
/eap_server
/eap_gtc.o
352 CONFIG_IEEE8021X_EAPOL
=y
357 ifeq ($(CONFIG_EAP_OTP
), dyn
)
358 CFLAGS
+= -DEAP_OTP_DYNAMIC
359 EAPDYN
+= ..
/src
/eap_peer
/eap_otp.so
362 OBJS
+= ..
/src
/eap_peer
/eap_otp.o
364 CONFIG_IEEE8021X_EAPOL
=y
369 ifeq ($(CONFIG_EAP_SIM
), dyn
)
370 CFLAGS
+= -DEAP_SIM_DYNAMIC
371 EAPDYN
+= ..
/src
/eap_peer
/eap_sim.so
374 OBJS
+= ..
/src
/eap_peer
/eap_sim.o
375 OBJS_h
+= ..
/src
/eap_server
/eap_sim.o
377 CONFIG_IEEE8021X_EAPOL
=y
378 CONFIG_EAP_SIM_COMMON
=y
381 ifdef CONFIG_EAP_LEAP
383 ifeq ($(CONFIG_EAP_LEAP
), dyn
)
384 CFLAGS
+= -DEAP_LEAP_DYNAMIC
385 EAPDYN
+= ..
/src
/eap_peer
/eap_leap.so
388 OBJS
+= ..
/src
/eap_peer
/eap_leap.o
391 CONFIG_IEEE8021X_EAPOL
=y
396 ifeq ($(CONFIG_EAP_PSK
), dyn
)
397 CFLAGS
+= -DEAP_PSK_DYNAMIC
398 EAPDYN
+= ..
/src
/eap_peer
/eap_psk.so
401 OBJS
+= ..
/src
/eap_peer
/eap_psk.o ..
/src
/eap_common
/eap_psk_common.o
402 OBJS_h
+= ..
/src
/eap_server
/eap_psk.o
404 CONFIG_IEEE8021X_EAPOL
=y
410 ifeq ($(CONFIG_EAP_AKA
), dyn
)
411 CFLAGS
+= -DEAP_AKA_DYNAMIC
412 EAPDYN
+= ..
/src
/eap_peer
/eap_aka.so
415 OBJS
+= ..
/src
/eap_peer
/eap_aka.o
416 OBJS_h
+= ..
/src
/eap_server
/eap_aka.o
418 CONFIG_IEEE8021X_EAPOL
=y
419 CONFIG_EAP_SIM_COMMON
=y
422 ifdef CONFIG_EAP_SIM_COMMON
423 OBJS
+= ..
/src
/eap_common
/eap_sim_common.o
424 OBJS_h
+= ..
/src
/eap_server
/eap_sim_db.o
429 ifdef CONFIG_EAP_FAST
431 ifeq ($(CONFIG_EAP_FAST
), dyn
)
432 CFLAGS
+= -DEAP_FAST_DYNAMIC
433 EAPDYN
+= ..
/src
/eap_peer
/eap_fast.so
434 EAPDYN
+= ..
/src
/eap_common
/eap_fast_common.o
437 OBJS
+= ..
/src
/eap_peer
/eap_fast.o ..
/src
/eap_peer
/eap_fast_pac.o
438 OBJS
+= ..
/src
/eap_common
/eap_fast_common.o
439 OBJS_h
+= ..
/src
/eap_server
/eap_fast.o
447 ifeq ($(CONFIG_EAP_PAX
), dyn
)
448 CFLAGS
+= -DEAP_PAX_DYNAMIC
449 EAPDYN
+= ..
/src
/eap_peer
/eap_pax.so
452 OBJS
+= ..
/src
/eap_peer
/eap_pax.o ..
/src
/eap_common
/eap_pax_common.o
453 OBJS_h
+= ..
/src
/eap_server
/eap_pax.o
455 CONFIG_IEEE8021X_EAPOL
=y
458 ifdef CONFIG_EAP_SAKE
460 ifeq ($(CONFIG_EAP_SAKE
), dyn
)
461 CFLAGS
+= -DEAP_SAKE_DYNAMIC
462 EAPDYN
+= ..
/src
/eap_peer
/eap_sake.so
465 OBJS
+= ..
/src
/eap_peer
/eap_sake.o ..
/src
/eap_common
/eap_sake_common.o
466 OBJS_h
+= ..
/src
/eap_server
/eap_sake.o
468 CONFIG_IEEE8021X_EAPOL
=y
471 ifdef CONFIG_EAP_GPSK
473 ifeq ($(CONFIG_EAP_GPSK
), dyn
)
474 CFLAGS
+= -DEAP_GPSK_DYNAMIC
475 EAPDYN
+= ..
/src
/eap_peer
/eap_gpsk.so
478 OBJS
+= ..
/src
/eap_peer
/eap_gpsk.o ..
/src
/eap_common
/eap_gpsk_common.o
479 OBJS_h
+= ..
/src
/eap_server
/eap_gpsk.o
481 CONFIG_IEEE8021X_EAPOL
=y
482 ifdef CONFIG_EAP_GPSK_SHA256
483 CFLAGS
+= -DEAP_GPSK_SHA256
488 ifdef CONFIG_EAP_IKEV2
490 ifeq ($(CONFIG_EAP_IKEV2
), dyn
)
491 CFLAGS
+= -DEAP_IKEV2_DYNAMIC
492 EAPDYN
+= ..
/src
/eap_peer
/eap_ikev2.so ..
/src
/eap_peer
/ikev2.o
493 EAPDYN
+= ..
/src
/eap_common
/eap_ikev2_common.o ..
/src
/eap_common
/ikev2_common.o
495 CFLAGS
+= -DEAP_IKEV2
496 OBJS
+= ..
/src
/eap_peer
/eap_ikev2.o ..
/src
/eap_peer
/ikev2.o
497 OBJS
+= ..
/src
/eap_common
/eap_ikev2_common.o ..
/src
/eap_common
/ikev2_common.o
498 OBJS_h
+= ..
/src
/eap_server
/eap_ikev2.o
499 OBJS_h
+= ..
/src
/eap_server
/ikev2.o
501 CONFIG_IEEE8021X_EAPOL
=y
505 ifdef CONFIG_EAP_VENDOR_TEST
506 ifeq ($(CONFIG_EAP_VENDOR_TEST
), dyn
)
507 CFLAGS
+= -DEAP_VENDOR_TEST_DYNAMIC
508 EAPDYN
+= ..
/src
/eap_peer
/eap_vendor_test.so
510 CFLAGS
+= -DEAP_VENDOR_TEST
511 OBJS
+= ..
/src
/eap_peer
/eap_vendor_test.o
512 OBJS_h
+= ..
/src
/eap_server
/eap_vendor_test.o
514 CONFIG_IEEE8021X_EAPOL
=y
520 OBJS
+= ..
/src
/eap_peer
/eap_tnc.o
521 OBJS
+= ..
/src
/eap_peer
/tncc.o
525 ifdef CONFIG_IEEE8021X_EAPOL
526 # IEEE 802.1X/EAPOL state machines (e.g., for RADIUS authentication)
527 CFLAGS
+= -DIEEE8021X_EAPOL
528 OBJS
+= ..
/src
/eapol_supp
/eapol_supp_sm.o ..
/src
/eap_peer
/eap.o ..
/src
/eap_common
/eap_common.o ..
/src
/eap_peer
/eap_methods.o
529 ifdef CONFIG_DYNAMIC_EAP_METHODS
530 CFLAGS
+= -DCONFIG_DYNAMIC_EAP_METHODS
531 LIBS
+= -ldl
-rdynamic
535 ifdef CONFIG_EAP_SERVER
536 CFLAGS
+= -DEAP_SERVER
537 OBJS_h
+= ..
/src
/eap_server
/eap.o
538 OBJS_h
+= ..
/src
/eap_server
/eap_identity.o
539 OBJS_h
+= ..
/src
/eap_server
/eap_methods.o
542 ifdef CONFIG_RADIUS_CLIENT
543 OBJS_h
+= ..
/src
/utils
/ip_addr.o
544 OBJS_h
+= ..
/src
/radius
/radius.o
545 OBJS_h
+= ..
/src
/radius
/radius_client.o
548 ifdef CONFIG_AUTHENTICATOR
549 OBJS_h
+= ..
/hostapd
/eapol_sm.o
550 OBJS_h
+= ..
/hostapd
/ieee802_1x.o
553 ifdef CONFIG_WPA_AUTHENTICATOR
554 OBJS_h
+= ..
/hostapd
/wpa.o
555 OBJS_h
+= ..
/hostapd
/wpa_auth_ie.o
556 ifdef CONFIG_IEEE80211R
557 OBJS_h
+= ..
/hostapd
/wpa_ft.o
560 OBJS_h
+= ..
/hostapd
/peerkey.o
565 # PC/SC interface for smartcards (USIM, GSM SIM)
566 CFLAGS
+= -DPCSC_FUNCS
-I
/usr
/include/PCSC
567 OBJS
+= ..
/src
/utils
/pcsc_funcs.o
568 # -lpthread may not be needed depending on how pcsc-lite was configured
569 ifdef CONFIG_NATIVE_WINDOWS
570 #Once MinGW gets support for WinScard, -lwinscard could be used instead of the
571 #dynamic symbol loading that is now used in pcsc_funcs.c
574 LIBS
+= -lpcsclite
-lpthread
582 ifeq ($(CONFIG_TLS
), internal
)
584 CONFIG_CRYPTO
=internal
587 ifeq ($(CONFIG_CRYPTO
), libtomcrypt
)
588 CFLAGS
+= -DCONFIG_INTERNAL_X509
590 ifeq ($(CONFIG_CRYPTO
), internal
)
591 CFLAGS
+= -DCONFIG_INTERNAL_X509
596 # Shared TLS functions (needed for EAP_TLS, EAP_PEAP, EAP_TTLS, and EAP_FAST)
597 CFLAGS
+= -DEAP_TLS_FUNCS
598 OBJS
+= ..
/src
/eap_peer
/eap_tls_common.o
599 OBJS_h
+= ..
/src
/eap_server
/eap_tls_common.o
601 ifeq ($(CONFIG_TLS
), openssl
)
602 CFLAGS
+= -DEAP_TLS_OPENSSL
603 OBJS
+= ..
/src
/crypto
/tls_openssl.o
604 LIBS
+= -lssl
-lcrypto
607 ifeq ($(CONFIG_TLS
), gnutls
)
608 OBJS
+= ..
/src
/crypto
/tls_gnutls.o
609 LIBS
+= -lgnutls
-lgcrypt
-lgpg-error
611 ifdef CONFIG_GNUTLS_EXTRA
612 CFLAGS
+= -DCONFIG_GNUTLS_EXTRA
613 LIBS
+= -lgnutls-extra
616 ifeq ($(CONFIG_TLS
), schannel
)
617 OBJS
+= ..
/src
/crypto
/tls_schannel.o
619 ifeq ($(CONFIG_TLS
), internal
)
620 OBJS
+= ..
/src
/crypto
/tls_internal.o
621 OBJS
+= ..
/src
/tls
/tlsv1_common.o ..
/src
/tls
/tlsv1_record.o
622 OBJS
+= ..
/src
/tls
/tlsv1_cred.o ..
/src
/tls
/tlsv1_client.o
623 OBJS
+= ..
/src
/tls
/tlsv1_client_write.o ..
/src
/tls
/tlsv1_client_read.o
624 OBJS
+= ..
/src
/tls
/asn1.o ..
/src
/tls
/x509v3.o
625 OBJS_p
+= ..
/src
/tls
/asn1.o
626 OBJS_p
+= ..
/src
/crypto
/rc4.o ..
/src
/crypto
/aes_wrap.o ..
/src
/crypto
/aes.o
629 CFLAGS
+= -DCONFIG_TLS_INTERNAL
630 CFLAGS
+= -DCONFIG_TLS_INTERNAL_CLIENT
631 ifeq ($(CONFIG_CRYPTO
), internal
)
632 ifdef CONFIG_INTERNAL_LIBTOMMATH
633 CFLAGS
+= -DCONFIG_INTERNAL_LIBTOMMATH
634 ifdef CONFIG_INTERNAL_LIBTOMMATH_FAST
642 ifeq ($(CONFIG_CRYPTO
), libtomcrypt
)
643 LIBS
+= -ltomcrypt
-ltfm
644 LIBS_p
+= -ltomcrypt
-ltfm
647 ifeq ($(CONFIG_TLS
), none
)
648 OBJS
+= ..
/src
/crypto
/tls_none.o
649 CFLAGS
+= -DEAP_TLS_NONE
650 CONFIG_INTERNAL_AES
=y
651 CONFIG_INTERNAL_SHA1
=y
652 CONFIG_INTERNAL_MD5
=y
653 CONFIG_INTERNAL_SHA256
=y
655 ifdef CONFIG_SMARTCARD
656 ifndef CONFIG_NATIVE_WINDOWS
657 ifneq ($(CONFIG_L2_PACKET
), freebsd
)
664 OBJS
+= ..
/src
/crypto
/tls_none.o
668 CFLAGS
+= -DPKCS12_FUNCS
671 ifdef CONFIG_SMARTCARD
672 CFLAGS
+= -DCONFIG_SMARTCARD
676 OBJS
+= ..
/src
/crypto
/ms_funcs.o
681 OBJS
+= ..
/src
/eap_common
/chap.o
686 ifeq ($(CONFIG_TLS
), openssl
)
690 ifeq ($(CONFIG_TLS
), gnutls
)
694 ifeq ($(CONFIG_TLS
), schannel
)
696 ifeq ($(CONFIG_TLS
), internal
)
697 ifeq ($(CONFIG_CRYPTO
), libtomcrypt
)
698 LIBS
+= -ltomcrypt
-ltfm
699 LIBS_p
+= -ltomcrypt
-ltfm
703 ifeq ($(CONFIG_TLS
), openssl
)
704 OBJS
+= ..
/src
/crypto
/crypto_openssl.o
705 OBJS_p
+= ..
/src
/crypto
/crypto_openssl.o
706 CONFIG_INTERNAL_SHA256
=y
708 ifeq ($(CONFIG_TLS
), gnutls
)
709 OBJS
+= ..
/src
/crypto
/crypto_gnutls.o
710 OBJS_p
+= ..
/src
/crypto
/crypto_gnutls.o
711 CONFIG_INTERNAL_SHA256
=y
713 ifeq ($(CONFIG_TLS
), schannel
)
714 OBJS
+= ..
/src
/crypto
/crypto_cryptoapi.o
715 OBJS_p
+= ..
/src
/crypto
/crypto_cryptoapi.o
716 CONFIG_INTERNAL_SHA256
=y
718 ifeq ($(CONFIG_TLS
), internal
)
719 ifeq ($(CONFIG_CRYPTO
), libtomcrypt
)
720 OBJS
+= ..
/src
/crypto
/crypto_libtomcrypt.o
721 OBJS_p
+= ..
/src
/crypto
/crypto_libtomcrypt.o
722 CONFIG_INTERNAL_SHA256
=y
724 ifeq ($(CONFIG_CRYPTO
), internal
)
725 OBJS
+= ..
/src
/crypto
/crypto_internal.o ..
/src
/tls
/rsa.o ..
/src
/tls
/bignum.o
726 OBJS_p
+= ..
/src
/crypto
/crypto_internal.o ..
/src
/tls
/rsa.o ..
/src
/tls
/bignum.o
727 CFLAGS
+= -DCONFIG_CRYPTO_INTERNAL
728 CONFIG_INTERNAL_AES
=y
729 CONFIG_INTERNAL_DES
=y
730 CONFIG_INTERNAL_SHA1
=y
731 CONFIG_INTERNAL_MD4
=y
732 CONFIG_INTERNAL_MD5
=y
733 CONFIG_INTERNAL_SHA256
=y
735 ifeq ($(CONFIG_CRYPTO
), cryptoapi
)
736 OBJS
+= ..
/src
/crypto
/crypto_cryptoapi.o
737 OBJS_p
+= ..
/src
/crypto
/crypto_cryptoapi.o
738 CFLAGS
+= -DCONFIG_CRYPTO_CRYPTOAPI
739 CONFIG_INTERNAL_SHA256
=y
742 ifeq ($(CONFIG_TLS
), none
)
743 OBJS
+= ..
/src
/crypto
/crypto_none.o
744 OBJS_p
+= ..
/src
/crypto
/crypto_none.o
745 CONFIG_INTERNAL_SHA256
=y
748 CONFIG_INTERNAL_AES
=y
749 CONFIG_INTERNAL_SHA1
=y
750 CONFIG_INTERNAL_MD5
=y
753 ifdef CONFIG_INTERNAL_AES
754 CFLAGS
+= -DINTERNAL_AES
756 ifdef CONFIG_INTERNAL_SHA1
757 CFLAGS
+= -DINTERNAL_SHA1
759 ifdef CONFIG_INTERNAL_SHA256
760 CFLAGS
+= -DINTERNAL_SHA256
762 ifdef CONFIG_INTERNAL_MD5
763 CFLAGS
+= -DINTERNAL_MD5
765 ifdef CONFIG_INTERNAL_MD4
766 CFLAGS
+= -DINTERNAL_MD4
768 ifdef CONFIG_INTERNAL_DES
769 CFLAGS
+= -DINTERNAL_DES
772 ifdef CONFIG_IEEE80211R
777 OBJS
+= ..
/src
/crypto
/sha256.o
780 ifdef CONFIG_WIRELESS_EXTENSION
781 CFLAGS
+= -DCONFIG_WIRELESS_EXTENSION
782 OBJS_d
+= ..
/src
/drivers
/driver_wext.o
785 ifdef CONFIG_CTRL_IFACE
786 ifeq ($(CONFIG_CTRL_IFACE
), y
)
787 ifdef CONFIG_NATIVE_WINDOWS
788 CONFIG_CTRL_IFACE
=named_pipe
790 CONFIG_CTRL_IFACE
=unix
793 CFLAGS
+= -DCONFIG_CTRL_IFACE
794 ifeq ($(CONFIG_CTRL_IFACE
), unix
)
795 CFLAGS
+= -DCONFIG_CTRL_IFACE_UNIX
797 ifeq ($(CONFIG_CTRL_IFACE
), udp
)
798 CFLAGS
+= -DCONFIG_CTRL_IFACE_UDP
800 ifeq ($(CONFIG_CTRL_IFACE
), named_pipe
)
801 CFLAGS
+= -DCONFIG_CTRL_IFACE_NAMED_PIPE
803 OBJS
+= ctrl_iface.o ctrl_iface_
$(CONFIG_CTRL_IFACE
).o
806 ifdef CONFIG_CTRL_IFACE_DBUS
807 CFLAGS
+= -DCONFIG_CTRL_IFACE_DBUS
-DDBUS_API_SUBJECT_TO_CHANGE
808 OBJS
+= ctrl_iface_dbus.o ctrl_iface_dbus_handlers.o dbus_dict_helpers.o
810 DBUS_LIBS
:= $(shell pkg-config
--libs dbus-1
)
814 DBUS_INCLUDE
:= $(shell pkg-config
--cflags dbus-1
)
816 dbus_version
=$(subst .
, ,$(shell pkg-config
--modversion dbus-1
))
817 DBUS_VERSION_MAJOR
=$(word 1,$(dbus_version
))
818 DBUS_VERSION_MINOR
=$(word 2,$(dbus_version
))
819 ifeq ($(DBUS_VERSION_MAJOR
),)
822 ifeq ($(DBUS_VERSION_MINOR
),)
825 DBUS_INCLUDE
+= -DDBUS_VERSION_MAJOR
=$(DBUS_VERSION_MAJOR
)
826 DBUS_INCLUDE
+= -DDBUS_VERSION_MINOR
=$(DBUS_VERSION_MINOR
)
827 CFLAGS
+= $(DBUS_INCLUDE
)
830 ifdef CONFIG_READLINE
831 CFLAGS
+= -DCONFIG_READLINE
832 LIBS_c
+= -lncurses
-lreadline
835 ifdef CONFIG_NATIVE_WINDOWS
836 CFLAGS
+= -DCONFIG_NATIVE_WINDOWS
837 LIBS
+= -lws2_32
-lgdi32
-lcrypt32
839 LIBS_p
+= -lws2_32
-lgdi32
840 ifeq ($(CONFIG_CRYPTO
), cryptoapi
)
845 ifdef CONFIG_NO_STDOUT_DEBUG
846 CFLAGS
+= -DCONFIG_NO_STDOUT_DEBUG
847 ifndef CONFIG_CTRL_IFACE
848 CFLAGS
+= -DCONFIG_NO_WPA_MSG
853 # for eapol_test only
854 CFLAGS
+= -DCONFIG_IPV6
858 CFLAGS
+= -DCONFIG_PEERKEY
861 ifdef CONFIG_IEEE80211W
862 CFLAGS
+= -DCONFIG_IEEE80211W
866 ifdef CONFIG_IEEE80211R
867 CFLAGS
+= -DCONFIG_IEEE80211R
868 OBJS
+= ..
/src
/rsn_supp
/wpa_ft.o
872 OBJS
+= ..
/src
/rsn_supp
/wpa.o
873 OBJS
+= ..
/src
/rsn_supp
/preauth.o
874 OBJS
+= ..
/src
/rsn_supp
/pmksa_cache.o
875 OBJS
+= ..
/src
/rsn_supp
/peerkey.o
876 OBJS
+= ..
/src
/rsn_supp
/wpa_ie.o
877 OBJS
+= ..
/src
/common
/wpa_common.o
880 CFLAGS
+= -DCONFIG_NO_WPA
-DCONFIG_NO_WPA2
884 CFLAGS
+= -DCONFIG_NO_WPA2
887 ifdef CONFIG_NO_WPA_PASSPHRASE
888 CFLAGS
+= -DCONFIG_NO_PBKDF2
891 ifdef CONFIG_NO_AES_EXTRAS
892 CFLAGS
+= -DCONFIG_NO_AES_WRAP
893 CFLAGS
+= -DCONFIG_NO_AES_CTR
-DCONFIG_NO_AES_OMAC1
894 CFLAGS
+= -DCONFIG_NO_AES_EAX
-DCONFIG_NO_AES_CBC
895 CFLAGS
+= -DCONFIG_NO_AES_ENCRYPT
896 CFLAGS
+= -DCONFIG_NO_AES_ENCRYPT_BLOCK
900 OBJS
+= ..
/src
/crypto
/aes_wrap.o ..
/src
/crypto
/aes.o
904 OBJS
+= ..
/src
/crypto
/dh_groups.o
907 ifndef NEED_FIPS186_2_PRF
908 CFLAGS
+= -DCONFIG_NO_FIPS186_2_PRF
912 CFLAGS
+= -DCONFIG_NO_T_PRF
916 CFLAGS
+= -DCONFIG_NO_TLS_PRF
920 OBJS
+= ..
/src
/utils
/base64.o
923 ifdef CONFIG_CLIENT_MLME
925 CFLAGS
+= -DCONFIG_CLIENT_MLME
932 ifdef CONFIG_DEBUG_FILE
933 CFLAGS
+= -DCONFIG_DEBUG_FILE
936 OBJS
+= ..
/src
/drivers
/scan_helpers.o
938 OBJS_wpa_rm
:= ctrl_iface.o mlme.o ctrl_iface_unix.o
939 OBJS_wpa
:= $(filter-out $(OBJS_wpa_rm
),$(OBJS
)) $(OBJS_h
) tests
/test_wpa.o
940 ifdef CONFIG_AUTHENTICATOR
941 OBJS_wpa
+= tests
/link_test.o
943 OBJS_wpa
+= $(OBJS_l2
)
944 OBJS
+= wpa_supplicant.o events.o blacklist.o wpas_glue.o scan.o
945 OBJS_t
:= $(OBJS
) $(OBJS_l2
) eapol_test.o ..
/src
/radius
/radius.o ..
/src
/radius
/radius_client.o
946 OBJS_t
+= ..
/src
/utils
/ip_addr.o
947 OBJS_t2
:= $(OBJS
) $(OBJS_l2
) preauth_test.o
948 OBJS
+= $(CONFIG_MAIN
).o
951 OBJS_priv
+= $(OBJS_d
) ..
/src
/drivers
/drivers.o ..
/src
/drivers
/scan_helpers.o
952 OBJS_priv
+= $(OBJS_l2
)
953 OBJS_priv
+= ..
/src
/utils
/os_
$(CONFIG_OS
).o
954 OBJS_priv
+= ..
/src
/utils
/$(CONFIG_ELOOP
).o
955 OBJS_priv
+= ..
/src
/utils
/common.o
956 OBJS_priv
+= ..
/src
/utils
/wpa_debug.o
957 OBJS_priv
+= wpa_priv.o
958 ifdef CONFIG_DRIVER_TEST
959 OBJS_priv
+= ..
/src
/crypto
/sha1.o
960 OBJS_priv
+= ..
/src
/crypto
/md5.o
961 ifeq ($(CONFIG_TLS
), openssl
)
962 OBJS_priv
+= ..
/src
/crypto
/crypto_openssl.o
964 ifeq ($(CONFIG_TLS
), gnutls
)
965 OBJS_priv
+= ..
/src
/crypto
/crypto_gnutls.o
967 ifeq ($(CONFIG_TLS
), internal
)
968 ifeq ($(CONFIG_CRYPTO
), libtomcrypt
)
969 OBJS_priv
+= ..
/src
/crypto
/crypto_libtomcrypt.o
971 OBJS_priv
+= ..
/src
/crypto
/crypto_internal.o
974 endif # CONFIG_DRIVER_TEST
975 OBJS
+= ..
/src
/l2_packet
/l2_packet_privsep.o
976 OBJS
+= ..
/src
/drivers
/driver_privsep.o
977 EXTRA_progs
+= wpa_priv
979 OBJS
+= $(OBJS_d
) ..
/src
/drivers
/drivers.o
983 ifdef CONFIG_NDIS_EVENTS_INTEGRATED
984 CFLAGS
+= -DCONFIG_NDIS_EVENTS_INTEGRATED
985 OBJS
+= ..
/src
/drivers
/ndis_events.o
986 EXTRALIBS
+= -loleaut32
-lole32
-luuid
988 EXTRALIBS
+= $(PLATFORMSDKLIB
)/WbemUuid.Lib
990 EXTRALIBS
+= WbemUuid.Lib
998 dynamic_eap_methods
: $(EAPDYN
)
1000 wpa_priv
: $(OBJS_priv
)
1001 $(LDO
) $(LDFLAGS
) -o wpa_priv
$(OBJS_priv
) $(LIBS
)
1003 wpa_supplicant
: .config
$(OBJS
) $(EXTRA_progs
)
1004 $(LDO
) $(LDFLAGS
) -o wpa_supplicant
$(OBJS
) $(LIBS
) $(EXTRALIBS
)
1006 eapol_test
: .config
$(OBJS_t
)
1007 $(LDO
) $(LDFLAGS
) -o eapol_test
$(OBJS_t
) $(LIBS
)
1009 preauth_test
: .config
$(OBJS_t2
)
1010 $(LDO
) $(LDFLAGS
) -o preauth_test
$(OBJS_t2
) $(LIBS
)
1012 wpa_passphrase
: $(OBJS_p
)
1013 $(LDO
) $(LDFLAGS
) -o wpa_passphrase
$(OBJS_p
) $(LIBS_p
)
1016 $(LDO
) $(LDFLAGS
) -o wpa_cli
$(OBJS_c
) $(LIBS_c
)
1018 link_test
: $(OBJS
) $(OBJS_h
) tests
/link_test.o
1019 $(LDO
) $(LDFLAGS
) -o link_test
$(OBJS
) $(OBJS_h
) tests
/link_test.o
$(LIBS
)
1021 test_wpa
: $(OBJS_wpa
) $(OBJS_h
)
1022 $(LDO
) $(LDFLAGS
) -o test_wpa
$(OBJS_wpa
) $(LIBS
)
1024 OBJSa
=..
/src
/tls
/asn1_test.o ..
/src
/tls
/asn1.o ..
/src
/tls
/x509v3.o ..
/src
/utils
/common.o ..
/src
/utils
/wpa_debug.o ..
/src
/utils
/os_unix.o \
1025 ..
/src
/crypto
/crypto_
$(CONFIG_CRYPTO
).o ..
/src
/crypto
/md5.o ..
/src
/crypto
/sha1.o \
1026 ..
/src
/crypto
/rc4.o ..
/src
/crypto
/des.o ..
/src
/crypto
/aes_wrap.o \
1027 ..
/src
/crypto
/aes.o ..
/src
/tls
/bignum.o ..
/src
/tls
/rsa.o
1029 $(LDO
) $(LDFLAGS
) -o asn1_test
$(OBJSa
)
1031 OBJSx
=tests
/test_x509v3.o ..
/src
/tls
/asn1.o ..
/src
/tls
/x509v3.o \
1032 ..
/src
/utils
/common.o ..
/src
/utils
/wpa_debug.o ..
/src
/utils
/os_unix.o \
1033 ..
/src
/crypto
/crypto_
$(CONFIG_CRYPTO
).o \
1034 ..
/src
/crypto
/md5.o ..
/src
/crypto
/sha1.o ..
/src
/crypto
/aes.o \
1035 ..
/src
/crypto
/rc4.o ..
/src
/crypto
/des.o ..
/src
/crypto
/aes_wrap.o \
1036 ..
/src
/tls
/bignum.o ..
/src
/tls
/rsa.o
1037 test_x509v3
: $(OBJSx
)
1038 $(LDO
) $(LDFLAGS
) -o test_x509v3
$(OBJSx
)
1040 win_if_list
: win_if_list.c
1041 $(LDO
) $(LDFLAGS
) -o
$@ win_if_list.c
$(CFLAGS
) $(LIBS_w
)
1043 eap_psk.so
: ..
/src
/eap_peer
/eap_psk.c ..
/src
/eap_common
/eap_psk_common.c
1044 $(CC
) -o
$@
$(CFLAGS
) -shared
-rdynamic
-fPIC
$^ \
1045 -Deap_peer_psk_register
=eap_peer_method_dynamic_init
1047 eap_pax.so
: ..
/src
/eap_peer
/eap_pax.c ..
/src
/eap_common
/eap_pax_common.c
1048 $(CC
) -o
$@
$(CFLAGS
) -shared
-rdynamic
-fPIC
$^ \
1049 -Deap_peer_pax_register
=eap_peer_method_dynamic_init
1051 eap_sake.so
: ..
/src
/eap_peer
/eap_sake.c ..
/src
/eap_common
/eap_sake_common.c
1052 $(CC
) -o
$@
$(CFLAGS
) -shared
-rdynamic
-fPIC
$^ \
1053 -Deap_peer_sake_register
=eap_peer_method_dynamic_init
1055 eap_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
1056 $(CC
) -o
$@
$(CFLAGS
) -shared
-rdynamic
-fPIC
$^ \
1057 -Deap_peer_ikev2_register
=eap_peer_method_dynamic_init
1060 $(CC
) -o
$@
$(CFLAGS
) -shared
-rdynamic
-fPIC
$< \
1061 -D
$(*:eap_
%=eap_peer_
%)_register
=eap_peer_method_dynamic_init
1064 wpa_supplicant.exe
: wpa_supplicant
1066 wpa_cli.exe
: wpa_cli
1068 wpa_passphrase.exe
: wpa_passphrase
1070 win_if_list.exe
: win_if_list
1072 eapol_test.exe
: eapol_test
1075 WINALL
=wpa_supplicant.exe wpa_cli.exe wpa_passphrase.exe win_if_list.exe
1077 windows-bin
: $(WINALL
)
1081 qmake
-o wpa_gui
/Makefile wpa_gui
/wpa_gui.pro
1083 wpa_gui
: wpa_gui
/Makefile
1086 wpa_gui-qt4
/Makefile
:
1087 qmake
-o wpa_gui-qt4
/Makefile wpa_gui-qt4
/wpa_gui.pro
1089 wpa_gui-qt4
: wpa_gui-qt4
/Makefile
1090 $(MAKE
) -C wpa_gui-qt4
1092 TEST_MS_FUNCS_OBJS
= ..
/src
/crypto
/crypto_openssl.o ..
/src
/crypto
/sha1.o ..
/src
/crypto
/md5.o \
1093 ..
/src
/utils
/os_unix.o ..
/src
/crypto
/rc4.o tests
/test_ms_funcs.o
1094 test-ms_funcs
: $(TEST_MS_FUNCS_OBJS
)
1095 $(LDO
) $(LDFLAGS
) -o
$@
$(TEST_MS_FUNCS_OBJS
) $(LIBS
) -lcrypto
1099 TEST_SHA1_OBJS
= ..
/src
/crypto
/sha1.o ..
/src
/crypto
/md5.o tests
/test_sha1.o
#../src/crypto/crypto_openssl.o
1100 test-sha1
: $(TEST_SHA1_OBJS
)
1101 $(LDO
) $(LDFLAGS
) -o
$@
$(TEST_SHA1_OBJS
) $(LIBS
)
1105 TEST_SHA256_OBJS
= ..
/src
/crypto
/sha256.o ..
/src
/crypto
/md5.o tests
/test_sha256.o ..
/src
/crypto
/crypto_openssl.o
1106 test-sha256
: $(TEST_SHA256_OBJS
)
1107 $(LDO
) $(LDFLAGS
) -o
$@
$(TEST_SHA256_OBJS
) $(LIBS
)
1111 TEST_AES_OBJS
= ..
/src
/crypto
/aes_wrap.o ..
/src
/crypto
/aes.o tests
/test_aes.o
1112 test-aes
: $(TEST_AES_OBJS
)
1113 $(LDO
) $(LDFLAGS
) -o
$@
$(TEST_AES_OBJS
) $(LIBS
)
1117 TEST_EAP_SIM_COMMON_OBJS
= ..
/src
/crypto
/sha1.o ..
/src
/crypto
/md5.o \
1118 ..
/src
/crypto
/aes_wrap.o ..
/src
/utils
/common.o ..
/src
/utils
/os_unix.o \
1119 ..
/src
/utils
/wpa_debug.o ..
/src
/crypto
/aes.o \
1120 tests
/test_eap_sim_common.o
1121 test-eap_sim_common
: $(TEST_EAP_SIM_COMMON_OBJS
)
1122 $(LDO
) $(LDFLAGS
) -o
$@
$(TEST_AES_OBJS
) $(LIBS
)
1123 .
/test-eap_sim_common
1124 rm test-eap_sim_common
1126 TEST_MD4_OBJS
= ..
/src
/crypto
/md4.o tests
/test_md4.o
#../src/crypto/crypto_openssl.o
1127 test-md4
: $(TEST_MD4_OBJS
)
1128 $(LDO
) $(LDFLAGS
) -o
$@
$(TEST_MD4_OBJS
) $(LIBS
)
1132 TEST_MD5_OBJS
= ..
/src
/crypto
/md5.o tests
/test_md5.o
#../src/crypto/crypto_openssl.o
1133 test-md5
: $(TEST_MD5_OBJS
)
1134 $(LDO
) $(LDFLAGS
) -o
$@
$(TEST_MD5_OBJS
) $(LIBS
)
1138 tests
: test-ms_funcs test-sha1 test-aes test-eap_sim_common test-md4 test-md5
1141 $(MAKE
) -C ..
/src
clean
1142 rm -f core
*~
*.o
*.d eap_
*.so
$(ALL
) $(WINALL
)
1145 fig2dev
-L eps
$*.fig
$*.eps
1148 fig2dev
-L png
-m
3 $*.fig | pngtopnm | pnmscale
0.4 | pnmtopng \
1151 docs-pics
: doc
/wpa_supplicant.png doc
/wpa_supplicant.eps
1154 (cd ..
; doxygen wpa_supplicant
/doc
/doxygen.full
; cd wpa_supplicant
)
1155 $(MAKE
) -C doc
/latex
1156 cp doc
/latex
/refman.pdf wpa_supplicant-devel.pdf
1158 docs-fast
: docs-pics
1159 doxygen doc
/doxygen.fast
1162 rm -rf doc
/latex doc
/html
1163 rm -f doc
/wpa_supplicant.
{eps
,png
} wpa_supplicant-devel.pdf
1165 wpa_supplicant-sparse
: .config
$(OBJS
)
1166 @echo Sparse run completed
1169 CC
="sparse -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -D__INT_MAX__=2147483647 -D__SHRT_MAX__=32767 -D__LONG_MAX__=2147483647 -D__SCHAR_MAX__=127 -Wbitwise" $(MAKE
) wpa_supplicant-sparse
1171 -include $(OBJS
:%.o
=%.d
)