xref: /freebsd/usr.sbin/wpa/Makefile.inc (revision dd41de95a84d979615a2ef11df6850622bf6184e)
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/common
19CFLAGS+=-I${WPA_DISTDIR}/src/crypto
20CFLAGS+=-I${WPA_DISTDIR}/src/drivers
21CFLAGS+=-I${WPA_DISTDIR}/src/l2_packet
22CFLAGS+=-I${WPA_DISTDIR}/src/utils
23CFLAGS+=-I${WPA_DISTDIR}/src/wps
24
25CFLAGS+=-DCONFIG_DRIVER_BSD
26CFLAGS+=-DCONFIG_DRIVER_WIRED
27CFLAGS+=-DCONFIG_DRIVER_RADIUS_ACL
28CFLAGS+=-DCONFIG_CTRL_IFACE
29CFLAGS+=-DCONFIG_CTRL_IFACE_UNIX
30CFLAGS+=-DCONFIG_IEEE80211AC
31CFLAGS+=-DCONFIG_IEEE80211N
32CFLAGS+=-DCONFIG_IEEE80211R
33CFLAGS+=-DCONFIG_IEEE80211W
34CFLAGS+=-DCONFIG_IEEE80211AX
35CFLAGS+=-DNEED_AP_MLME
36CFLAGS+=-DTLS_DEFAULT_CIPHERS=\"DEFAULT:!EXP:!LOW\"
37CFLAGS+=-DCONFIG_DEBUG_SYSLOG
38CFLAGS+=-DCONFIG_WPS
39CFLAGS+=-DCONFIG_WPS2
40CFLAGS+=-DCONFIG_WPS_UPNP
41CFLAGS+=-DCONFIG_WPS_OOB
42CFLAGS+=-DCONFIG_INTERWORKING
43CFLAGS+=-DPKCS12_FUNCS
44CFLAGS+=-DCONFIG_GAS
45CFLAGS+=-DCONFIG_PEERKEY
46CFLAGS+=-DCONFIG_PRIVSEP
47CFLAGS+=-DCONFIG_SMARTCARD
48CFLAGS+=-DCONFIG_TERMINATE_ONLASTIF
49CFLAGS+=-DCONFIG_TLS=openssl
50CFLAGS+=-DCONFIG_MATCH_IFACE
51CFLAGS+=-DEAP_SERVER
52CFLAGS+=-DEAP_SERVER_GTC
53CFLAGS+=-DEAP_SERVER_IDENTITY
54CFLAGS+=-DEAP_SERVER_MD5
55CFLAGS+=-DEAP_SERVER_MSCHAPV2
56CFLAGS+=-DEAP_SERVER_PEAP
57CFLAGS+=-DEAP_SERVER_TLS
58CFLAGS+=-DEAP_SERVER_TTLS
59CFLAGS+=-DEAP_SERVER_WSC
60CFLAGS+=-DEAP_TLS_FUNCS
61
62.if ${MK_WPA_SUPPLICANT_EAPOL} != "no"
63CFLAGS+=-DCONFIG_HS20 \
64	-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
75NEED_AES_EAX=y
76NEED_AES_ENCBLOCK=y
77NEED_AES_OMAC1=y
78.endif
79
80.if !empty(CFLAGS:M*-DEAP_AKA)
81NEED_SIM_COMMON=y
82NEED_AES_CBC=y
83.endif
84
85.if !empty(CFLAGS:M*-DEAP_SIM)
86NEED_SIM_COMMON=y
87NEED_AES_CBC=y
88.endif
89
90.if defined(NEED_SIM_COMMON)
91NEED_FIPS186_2_PRF=y
92.endif
93
94.if !empty(CFLAGS:M*-DEAP_GPSK)
95CFLAGS+=-DEAP_GPSK_SHA256
96NEED_AES_OMAC1=y
97.endif
98
99.include <bsd.own.mk>
100