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