xref: /freebsd/usr.sbin/wpa/Makefile.inc (revision b077aed33b7b6aefca7b17ddb250cf521f938613)
1# $FreeBSD$
2
3.include <src.opts.mk>
4
5BINDIR?=	/usr/sbin
6
7WARNS?=		0
8
9WPA_DISTDIR?= 		${SRCTOP}/contrib/wpa
10WPA_SUPPLICANT_DISTDIR?=${WPA_DISTDIR}/wpa_supplicant
11HOSTAPD_DISTDIR?=	${WPA_DISTDIR}/hostapd
12
13.PATH.c:${.CURDIR:H}
14
15CFLAGS+=-I${.CURDIR}
16CFLAGS+=-I${HOSTAPD_DISTDIR}
17CFLAGS+=-I${WPA_DISTDIR}/src
18CFLAGS+=-I${WPA_DISTDIR}/src/ap
19CFLAGS+=-I${WPA_DISTDIR}/src/common
20CFLAGS+=-I${WPA_DISTDIR}/src/crypto
21CFLAGS+=-I${WPA_DISTDIR}/src/drivers
22CFLAGS+=-I${WPA_DISTDIR}/src/eap_common
23CFLAGS+=-I${WPA_DISTDIR}/src/eap_peer
24CFLAGS+=-I${WPA_DISTDIR}/src/eap_server
25CFLAGS+=-I${WPA_DISTDIR}/src/eapol_auth
26CFLAGS+=-I${WPA_DISTDIR}/src/eapol_supp
27CFLAGS+=-I${WPA_DISTDIR}/src/l2_packet
28CFLAGS+=-I${WPA_DISTDIR}/src/radius
29CFLAGS+=-I${WPA_DISTDIR}/src/rsn_supp
30CFLAGS+=-I${WPA_DISTDIR}/src/tls
31CFLAGS+=-I${WPA_DISTDIR}/src/utils
32CFLAGS+=-I${WPA_DISTDIR}/src/wps
33
34CFLAGS+=-DCONFIG_DRIVER_BSD
35CFLAGS+=-DCONFIG_DRIVER_WIRED
36CFLAGS+=-DCONFIG_DRIVER_RADIUS_ACL
37CFLAGS+=-DCONFIG_CTRL_IFACE
38CFLAGS+=-DCONFIG_CTRL_IFACE_UNIX
39CFLAGS+=-DCONFIG_IEEE80211AC
40CFLAGS+=-DCONFIG_IEEE80211N
41CFLAGS+=-DCONFIG_IEEE80211R
42CFLAGS+=-DCONFIG_IEEE80211W
43CFLAGS+=-DTLS_DEFAULT_CIPHERS=\"DEFAULT:!EXP:!LOW\"
44CFLAGS+=-DCONFIG_DEBUG_SYSLOG
45CFLAGS+=-DPKCS12_FUNCS
46CFLAGS+=-DCONFIG_GAS
47CFLAGS+=-DCONFIG_PEERKEY
48CFLAGS+=-DCONFIG_PRIVSEP
49CFLAGS+=-DCONFIG_SMARTCARD
50CFLAGS+=-DCONFIG_TDLS
51CFLAGS+=-DCONFIG_TERMINATE_ONLASTIF
52CFLAGS+=-DCONFIG_TLS=openssl
53CFLAGS+=-DCONFIG_MATCH_IFACE
54CFLAGS+=-DCONFIG_PTKSA_CACHE
55CFLAGS+=-DEAP_SERVER
56CFLAGS+=-DEAP_SERVER_GTC
57CFLAGS+=-DEAP_SERVER_IDENTITY
58CFLAGS+=-DEAP_SERVER_MD5
59CFLAGS+=-DEAP_SERVER_MSCHAPV2
60CFLAGS+=-DEAP_SERVER_PEAP
61CFLAGS+=-DEAP_SERVER_TLS
62CFLAGS+=-DEAP_SERVER_TTLS
63CFLAGS+=-DEAP_SERVER_WSC
64CFLAGS+=-DEAP_TLS_FUNCS
65CFLAGS+=-DCONFIG_WNM
66CFLAGS+=-DCONFIG_WNM_AP
67CFLAGS+=-DCONFIG_MBO
68CFLAGS+=-DCONFIG_RSN_PREAUTH
69CFLAGS+=-DCONFIG_WEP
70
71.if ${MK_WPA_SUPPLICANT_EAPOL} != "no"
72CFLAGS+=-DCONFIG_HS20 \
73	-DEAP_GTC \
74	-DEAP_LEAP \
75	-DEAP_MD5 \
76	-DEAP_MSCHAPv2 \
77	-DEAP_OTP \
78	-DEAP_PEAP \
79	-DEAP_PSK \
80	-DEAP_TLS \
81	-DEAP_TTLS \
82	-DEAP_WSC \
83	-DIEEE8021X_EAPOL \
84	-DCONFIG_INTERWORKING \
85	-DCONFIG_WPS \
86	-DCONFIG_WPS2 \
87	-DCONFIG_WPS_UPNP \
88	-DCONFIG_WPS_OOB
89NEED_AES_EAX=y
90NEED_AES_ENCBLOCK=y
91NEED_AES_OMAC1=y
92.endif
93
94.if ${MK_OPENSSL} != "no"
95CFLAGS+=-DCONFIG_PASN
96.endif
97
98.if !empty(CFLAGS:M*-DEAP_AKA)
99NEED_SIM_COMMON=y
100NEED_AES_CBC=y
101.endif
102
103.if !empty(CFLAGS:M*-DEAP_SIM)
104NEED_SIM_COMMON=y
105NEED_AES_CBC=y
106.endif
107
108.if defined(NEED_SIM_COMMON)
109NEED_FIPS186_2_PRF=y
110.endif
111
112.if !empty(CFLAGS:M*-DEAP_GPSK)
113CFLAGS+=-DEAP_GPSK_SHA256
114NEED_AES_OMAC1=y
115.endif
116