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