xref: /freebsd/usr.sbin/wpa/hostapd/Makefile (revision a90b9d0159070121c221b966469c3e36d912bf82)
1.include <src.opts.mk>
2.include "../Makefile.inc"
3
4.include "../Makefile.crypto"
5
6.PATH.c:${HOSTAPD_DISTDIR} \
7	${WPA_DISTDIR}/src/drivers
8
9PACKAGE=	hostapd
10PROG=	hostapd
11SRCS=	config_file.c \
12	ctrl_iface.c \
13	driver_bsd.c \
14	eap_register.c \
15	main.c
16
17MAN=	hostapd.8 hostapd.conf.5
18
19.if ${MK_EXAMPLES} != "no"
20FILESDIR= ${SHAREDIR}/examples/hostapd
21.PATH:	${HOSTAPD_DISTDIR}
22FILES=	hostapd.conf hostapd.eap_user hostapd.wpa_psk
23.endif
24
25CFLAGS+=-I${.CURDIR:H}/wpa_supplicant \
26	-I${WPA_DISTDIR}/src/eap_peer \
27	-DHOSTAPD
28.if ${MK_INET6} != "no"
29CFLAGS+= -DCONFIG_IPV6
30.endif
31#CFLAGS+= -g
32LIBADD+=	pcap util \
33		wpadrivers wpaap wpal2_packet wpaeap_server \
34		wpaeapol_auth wpaeap_common \
35		wparadius wpatls wpawps wpacommon wpacrypto wpautils \
36		wpapasn
37
38# User customizations for wpa_supplicant/hostapd build environment
39CFLAGS+=${HOSTAPD_CFLAGS}
40#DPADD+=${HOSTAPD_DPADD}
41LDADD+=${HOSTAPD_LDADD}
42#LDFLAGS+=${HOSTAPD_LDFLAGS}
43
44# For WPS, EAP modes, etc
45NEED_DH_GROUPS=y
46NEED_DH_GROUPS_ALL=y
47
48.if !empty(CFLAGS:M*-DCONFIG_WPS)
49NEED_SIM_COMMON=y
50.endif
51
52.if !empty(CFLAGS:M*-DEAP_SERVER_AKA)
53NEED_SIM_COMMON=y
54.endif
55
56.if !empty(CFLAGS:M*-DEAP_SERVER_SIM)
57NEED_SIM_COMMON=y
58.endif
59
60.if defined(NEED_SIM_COMMON)
61NEED_FIPS186_2_PRF=y
62.endif
63
64.if !empty(CFLAGS:M*-DEAP_SERVER_GPSK)
65CFLAGS+=-DEAP_GPSK_SHA256
66NEED_AES_OMAC1=y
67.endif
68
69.include <bsd.prog.mk>
70