xref: /freebsd/usr.sbin/wpa/wpa_supplicant/Makefile (revision 3332f1b444d4a73238e9f59cca27bfc95fe936bd)
1# $FreeBSD$
2
3.include <src.opts.mk>
4
5.include "../Makefile.inc"
6
7.include "../Makefile.crypto"
8
9.PATH.c:${WPA_SUPPLICANT_DISTDIR} \
10	${WPA_DISTDIR}/src/drivers
11
12PACKAGE=	wpa
13PROG=	wpa_supplicant
14
15SRCS=	bss.c \
16	bssid_ignore.c \
17	config.c \
18	config_file.c \
19	ctrl_iface.c \
20	ctrl_iface_unix.c \
21	driver_bsd.c \
22	eap_register.c \
23	events.c \
24	gas_query.c \
25	main.c \
26	mbo.c \
27	notify.c \
28	op_classes.c \
29	offchannel.c \
30	pasn_supplicant.c \
31	robust_av.c \
32	rrm.c \
33	scan.c \
34	twt.c \
35	wmm_ac.c \
36	wnm_sta.c \
37	wpa_supplicant.c \
38	wpas_glue.c
39
40MAN=	wpa_supplicant.8 wpa_supplicant.conf.5
41
42.if ${MK_EXAMPLES} != "no"
43FILESDIR= ${SHAREDIR}/examples/etc
44.PATH:	${WPA_SUPPLICANT_DISTDIR}
45FILES=	wpa_supplicant.conf
46.endif
47
48CFLAGS+=-DCONFIG_BACKEND_FILE
49#CFLAGS+= -g
50LIBADD+=pcap util wpadrivers wpaeapol_supp \
51	wpaeap_server \
52	wpaeap_peer wpaeap_common wpal2_packet wparsn_supp wpatls wpawps \
53	wpacommon wpacrypto wpautils
54
55# User customizations to the wpa_supplicant build environment
56CFLAGS+=${WPA_SUPPLICANT_CFLAGS}
57#DPADD+=${WPA_SUPPLICANT_DPADD}
58LDADD+=${WPA_SUPPLICANT_LDADD}
59#LDFLAGS+=${WPA_SUPPLICANT_LDFLAGS}
60
61.if ${MK_WPA_SUPPLICANT_EAPOL} != "no"
62CFLAGS+=-DEAP_GTC \
63	-DEAP_LEAP \
64	-DEAP_MD5 \
65	-DEAP_MSCHAPv2 \
66	-DEAP_OTP \
67	-DEAP_PEAP \
68	-DEAP_PSK \
69	-DEAP_TLS \
70	-DEAP_TTLS \
71	-DEAP_WSC \
72	-DIEEE8021X_EAPOL
73SRCS+=	hs20_supplicant.c \
74	interworking.c \
75	wps_supplicant.c
76NEED_AES_EAX=y
77NEED_AES_ENCBLOCK=y
78NEED_AES_OMAC1=y
79.endif
80
81.if !empty(CFLAGS:M*-DEAP_AKA)
82SRCS+=	eap_aka.c
83NEED_SIM_COMMON=y
84NEED_AES_CBC=y
85.endif
86
87.if !empty(CFLAGS:M*-DEAP_SIM)
88SRCS+=	eap_sim.c
89NEED_SIM_COMMON=y
90NEED_AES_CBC=y
91.endif
92
93.if defined(NEED_SIM_COMMON)
94SRCS+=	eap_sim_common.c
95NEED_FIPS186_2_PRF=y
96.endif
97
98# PC/SC interface for smartcards (USIM, GSM SIM)
99# GSM/UMTS authentication algorithm (for EAP-SIM/EAP-AKA)
100# NB: requires devel/pcsc-lite
101#
102# WPA_SUPPLICANT_CFLAGS=-DEAP_AKA -DPCSC_FUNCS -I/usr/local/include/PCSC
103# WPA_SUPPLICANT_LDADD=-L/usr/local/lib
104#
105.if !empty(CFLAGS:M*-DPCSC_FUNCS)
106SRCS+=	pcsc_funcs.c
107LIBADD+=	pcslite pthread
108.endif
109
110.if !empty(CFLAGS:M*-DEAP_GPSK)
111CFLAGS+=-DEAP_GPSK_SHA256
112SRCS+=	eap_gpsk.c \
113	eap_gpsk_common.c
114NEED_AES_OMAC1=y
115.endif
116
117.if !empty(CFLAGS:M*-DEAP_PAX)
118SRCS+=	eap_pax.c \
119	eap_pax_common.c
120.endif
121
122.if !empty(CFLAGS:M*-DEAP_SAKE)
123SRCS+=	eap_sake.c \
124	eap_sake_common.c
125.endif
126
127.include <bsd.prog.mk>
128