1# $FreeBSD: head/usr.sbin/wpa/wpa_supplicant/Makefile 265420 2014-05-06 04:22:01Z imp $
2
3.include "${.CURDIR}/../Makefile.inc"
4
5.PATH.c:${WPA_DISTDIR}/wpa_supplicant \
6	${WPA_DISTDIR}/src/drivers \
7	${WPA_DISTDIR}/src/eap_peer \
8	${WPA_DISTDIR}/src/rsn_supp
9
10PROG=	wpa_supplicant
11SRCS=	aes-unwrap.c base64.c blacklist.c bss.c common.c config.c \
12	config_file.c ctrl_iface.c ctrl_iface_unix.c driver_bsd.c \
13	driver_common.c driver_ndis.c driver_wired.c drivers.c \
14	eap_register.c eloop.c events.c gas.c gas_query.c hs20.c \
15	hs20_supplicant.c http_client.c http_server.c httpread.c \
16	ieee802_11_common.c interworking.c l2_packet.c main.c \
17	md5.c notify.c offchannel.c os_unix.c peerkey.c pmksa_cache.c \
18	preauth.c scan.c upnp_xml.c uuid.c wpa.c wpa_common.c wpa_debug.c \
19	wpa_ft.c wpa_ie.c wpa_supplicant.c wpabuf.c wpas_glue.c wps.c \
20	wps_attr_build.c wps_attr_parse.c wps_attr_process.c \
21	wps_common.c wps_dev_attr.c wps_enrollee.c wps_registrar.c \
22	wps_supplicant.c wps_upnp.c wps_upnp_ap.c wps_upnp_event.c \
23	wps_upnp_ssdp.c wps_upnp_web.c Packet32.c
24
25MAN=	wpa_supplicant.8 wpa_supplicant.conf.5
26
27WARNS=	0
28
29#.if ${MK_EXAMPLES} != "no"
30#FILESDIR= ${SHAREDIR}/examples/etc
31#.PATH:	${WPA_SUPPLICANT_DISTDIR}
32#FILES=	wpa_supplicant.conf
33#.endif
34
35CFLAGS+=-DCONFIG_BACKEND_FILE \
36	-DCONFIG_DEBUG_SYSLOG \
37	-DCONFIG_DRIVER_BSD \
38	-DCONFIG_DRIVER_NDIS \
39	-DCONFIG_DRIVER_WIRED \
40	-DCONFIG_PEERKEY \
41	-DCONFIG_SMARTCARD \
42	-DCONFIG_TERMINATE_ONLASTIF \
43	-DCONFIG_WPS \
44	-DCONFIG_WPS2 \
45	-DCONFIG_WPS_UPNP \
46	-DCONFIG_TLS=openssl \
47	-DCONFIG_IEEE80211R \
48	-DCONFIG_INTERWORKING \
49	-DCONFIG_PRIVSEP \
50	-DCONFIG_HS20 \
51	-DCONFIG_GAS \
52	-DPKCS12_FUNCS
53#CFLAGS+= -g
54DPADD+=	${LIBPCAP}
55LDADD+=	-lpcap
56
57# User customizations to the wpa_supplicant build environment
58CFLAGS+=${WPA_SUPPLICANT_CFLAGS}
59#DPADD+=${WPA_SUPPLICANT_DPADD}
60LDADD+=${WPA_SUPPLICANT_LDADD}
61#LDFLAGS+=${WPA_SUPPLICANT_LDFLAGS}
62
63#.if ${MK_WPA_SUPPLICANT_EAPOL} != "no"
64CFLAGS+=-DEAP_GTC \
65	-DEAP_LEAP \
66	-DEAP_MD5 \
67	-DEAP_MSCHAPv2 \
68	-DEAP_OTP \
69	-DEAP_PEAP \
70	-DEAP_PSK \
71	-DEAP_TLS \
72	-DEAP_TTLS \
73	-DEAP_GTC \
74	-DEAP_OTP \
75	-DEAP_LEAP \
76	-DIEEE8021X_EAPOL
77SRCS+=	chap.c \
78	eap.c \
79	eap_common.c \
80	eap_gtc.c \
81	eap_leap.c \
82	eap_md5.c \
83	eap_methods.c \
84	eap_mschapv2.c \
85	eap_otp.c \
86	eap_peap.c \
87	eap_peap_common.c \
88	eap_psk.c \
89	eap_psk_common.c \
90	eap_tls.c \
91	eap_tls_common.c \
92	eap_ttls.c \
93	eapol_supp_sm.c \
94	ms_funcs.c \
95	mschapv2.c
96TLS_FUNCS=y
97NEED_AES_EAX=y
98NEED_AES_ENCBLOCK=y
99NEED_AES_OMAC1=y
100#.endif
101
102.if !empty(CFLAGS:M-DCONFIG_WPS)
103NEED_AES_CBC=y
104.endif
105
106.if !empty(CFLAGS:M*-DEAP_AKA)
107SRCS+=	eap_aka.c
108NEED_SIM_COMMON=y
109NEED_AES_CBC=y
110.endif
111
112.if !empty(CFLAGS:M*-DEAP_SIM)
113SRCS+=	eap_sim.c
114NEED_SIM_COMMON=y
115NEED_AES_CBC=y
116.endif
117
118.if defined(NEED_SIM_COMMON)
119SRCS+=	eap_sim_common.c
120NEED_FIPS186_2_PRF=y
121.endif
122
123# PC/SC interface for smartcards (USIM, GSM SIM)
124# GSM/UMTS authentication algorithm (for EAP-SIM/EAP-AKA)
125# NB: requires devel/pcsc-lite
126#
127# WPA_SUPPLICANT_CFLAGS=-DEAP_AKA -DPCSC_FUNCS -I/usr/local/include/PCSC
128# WPA_SUPPLICANT_LDADD=-L/usr/local/lib
129#
130.if !empty(CFLAGS:M*-DPCSC_FUNCS)
131SRCS+=	pcsc_funcs.c
132DPADD+=${LIBPTHREAD}
133LDADD+=-lpcsclite -lpthread
134.endif
135
136.if !empty(CFLAGS:M*-DEAP_GPSK)
137CFLAGS+=-DEAP_GPSK_SHA256
138SRCS+=	eap_gpsk.c \
139	eap_gpsk_common.c
140NEED_AES_OMAC1=y
141.endif
142
143.if !empty(CFLAGS:M*-DEAP_PAX)
144SRCS+=	eap_pax.c \
145	eap_pax_common.c
146.endif
147
148.if !empty(CFLAGS:M*-DEAP_SAKE)
149SRCS+=	eap_sake.c \
150	eap_sake_common.c
151.endif
152
153.include "${.CURDIR}/../Makefile.crypto"
154
155.include <bsd.prog.mk>
156