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