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