xref: /freebsd/usr.sbin/wpa/wpa_supplicant/Makefile (revision 1f4bcc459a76b7aa664f3fd557684cd0ba6da352)
1# $FreeBSD$
2
3.include <src.opts.mk>
4
5.include "${.CURDIR}/../Makefile.inc"
6
7.PATH.c:${WPA_SUPPLICANT_DISTDIR} \
8	${WPA_DISTDIR}/src/drivers
9
10PROG=	wpa_supplicant
11SRCS=	ap_drv_ops.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	hw_features_common.c \
17	ieee802_11_common.c ieee802_11_shared.c \
18	interworking.c l2_packet_freebsd.c main.c \
19	notify.c offchannel.c os_unix.c peerkey.c pmksa_cache.c \
20	preauth.c scan.c upnp_xml.c uuid.c wmm_ac.c \
21	wpa.c wpa_common.c wpa_debug.c \
22	wpa_ft.c wpa_ie.c wpa_supplicant.c wpabuf.c wpas_glue.c wps.c \
23	wps_attr_build.c wps_attr_parse.c wps_attr_process.c \
24	wps_common.c wps_dev_attr.c wps_enrollee.c wps_registrar.c \
25	wps_supplicant.c wps_upnp.c wps_upnp_ap.c wps_upnp_event.c \
26	wps_upnp_ssdp.c wps_upnp_web.c Packet32.c
27
28MAN=	wpa_supplicant.8 wpa_supplicant.conf.5
29
30.if ${MK_EXAMPLES} != "no"
31FILESDIR= ${SHAREDIR}/examples/etc
32.PATH:	${WPA_SUPPLICANT_DISTDIR}
33FILES=	wpa_supplicant.conf
34.endif
35
36CFLAGS+=-DCONFIG_BACKEND_FILE \
37	-DCONFIG_DEBUG_SYSLOG \
38	-DCONFIG_DRIVER_BSD \
39	-DCONFIG_DRIVER_NDIS \
40	-DCONFIG_DRIVER_WIRED \
41	-DCONFIG_GAS \
42	-DCONFIG_HS20 \
43	-DCONFIG_IEEE80211R \
44	-DCONFIG_INTERWORKING \
45	-DCONFIG_PEERKEY \
46	-DCONFIG_PRIVSEP \
47	-DCONFIG_SMARTCARD \
48	-DCONFIG_TERMINATE_ONLASTIF \
49	-DCONFIG_TLS=openssl \
50	-DCONFIG_WPS \
51	-DCONFIG_WPS2 \
52	-DCONFIG_WPS_UPNP \
53	-DPKCS12_FUNCS
54#CFLAGS+= -g
55LIBADD=	pcap util
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	-DIEEE8021X_EAPOL
74SRCS+=	chap.c \
75	eap.c \
76	eap_common.c \
77	eap_gtc.c \
78	eap_leap.c \
79	eap_md5.c \
80	eap_methods.c \
81	eap_mschapv2.c \
82	eap_otp.c \
83	eap_peap.c \
84	eap_peap_common.c \
85	eap_psk.c \
86	eap_psk_common.c \
87	eap_tls.c \
88	eap_tls_common.c \
89	eap_ttls.c \
90	eapol_supp_sm.c \
91	ms_funcs.c \
92	mschapv2.c
93TLS_FUNCS=y
94NEED_AES_EAX=y
95NEED_AES_ENCBLOCK=y
96NEED_AES_OMAC1=y
97.endif
98
99.if !empty(CFLAGS:M*-DEAP_AKA)
100SRCS+=	eap_aka.c
101NEED_SIM_COMMON=y
102NEED_AES_CBC=y
103.endif
104
105.if !empty(CFLAGS:M*-DEAP_SIM)
106SRCS+=	eap_sim.c
107NEED_SIM_COMMON=y
108NEED_AES_CBC=y
109.endif
110
111.if defined(NEED_SIM_COMMON)
112SRCS+=	eap_sim_common.c
113NEED_FIPS186_2_PRF=y
114.endif
115
116# PC/SC interface for smartcards (USIM, GSM SIM)
117# GSM/UMTS authentication algorithm (for EAP-SIM/EAP-AKA)
118# NB: requires devel/pcsc-lite
119#
120# WPA_SUPPLICANT_CFLAGS=-DEAP_AKA -DPCSC_FUNCS -I/usr/local/include/PCSC
121# WPA_SUPPLICANT_LDADD=-L/usr/local/lib
122#
123.if !empty(CFLAGS:M*-DPCSC_FUNCS)
124SRCS+=	pcsc_funcs.c
125LIBADD+=	pcslite pthread
126.endif
127
128.if !empty(CFLAGS:M*-DEAP_GPSK)
129CFLAGS+=-DEAP_GPSK_SHA256
130SRCS+=	eap_gpsk.c \
131	eap_gpsk_common.c
132NEED_AES_OMAC1=y
133.endif
134
135.if !empty(CFLAGS:M*-DEAP_PAX)
136SRCS+=	eap_pax.c \
137	eap_pax_common.c
138.endif
139
140.if !empty(CFLAGS:M*-DEAP_SAKE)
141SRCS+=	eap_sake.c \
142	eap_sake_common.c
143.endif
144
145.include "${.CURDIR}/../Makefile.crypto"
146
147.include <bsd.prog.mk>
148