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