summaryrefslogtreecommitdiffstats
path: root/usr.sbin/wpa/hostapd/Makefile
blob: 530cf020d2c50c136b1644d970dead1634349d2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# $FreeBSD$

.include "${.CURDIR}/../Makefile.inc"

.PATH.c:${HOSTAPD_DISTDIR} \
	${WPA_DISTDIR}/src/drivers

PROG=	hostapd
SRCS=	accounting.c aes-wrap.c ap_config.c ap_drv_ops.c ap_mlme.c authsrv.c \
	base64.c beacon.c chap.c common.c config_file.c ctrl_iface.c \
	ctrl_iface_ap.c driver_common.c l2_packet_freebsd.c driver_bsd.c \
	drivers.c drv_callbacks.c eap_common.c eap_peap_common.c \
	eap_register.c eap_server.c eap_server_methods.c eap_user_db.c \
	eapol_auth_dump.c eapol_auth_sm.c eloop.c gas.c gas_serv.c hostapd.c \
	hs20.c http_client.c http_server.c httpread.c ieee802_11_auth.c \
	ieee802_11_common.c ieee802_11_shared.c ieee802_1x.c ip_addr.c \
	main.c md5.c ms_funcs.c os_unix.c peerkey_auth.c pmksa_cache_auth.c \
	preauth_auth.c radius.c radius_client.c radius_das.c sta_info.c \
	tkip_countermeasures.c upnp_xml.c utils.c uuid.c vlan_init.c \
	wpa_auth.c wpa_auth_glue.c wpa_auth_ie.c wpa_common.c wpa_debug.c \
	wpabuf.c wps.c wps_attr_build.c wps_attr_parse.c wps_attr_process.c \
	wps_common.c wps_dev_attr.c wps_enrollee.c wps_hostapd.c \
	wps_registrar.c wps_upnp.c wps_upnp_ap.c wps_upnp_event.c \
	wps_upnp_ssdp.c wps_upnp_web.c

MAN=	hostapd.8 hostapd.conf.5

.if ${MK_EXAMPLES} != "no"
FILESDIR= ${SHAREDIR}/examples/hostapd
.PATH:	${HOSTAPD_DISTDIR}
FILES=	hostapd.conf hostapd.eap_user hostapd.wpa_psk
.endif

CFLAGS+=-DCONFIG_DRIVER_BSD \
	-DHOSTAPD \
	-DCONFIG_DRIVER_RADIUS_ACL \
	-DCONFIG_RSN_PREAUTH \
	-DCONFIG_PEERKEY \
	-DCONFIG_WPS \
	-DCONFIG_WPS2 \
	-DCONFIG_WPS_UPNP \
	-DCONFIG_INTERWORKING \
	-DCONFIG_HS20
.if ${MK_INET6} != "no"
CFLAGS+= -DCONFIG_IPV6
.endif
#CFLAGS+= -g
DPADD+=	${LIBPCAP}
LDADD+=	-lpcap

# User customizations for wpa_supplicant/hostapd build environment
CFLAGS+=${HOSTAPD_CFLAGS}
#DPADD+=${HOSTAPD_DPADD}
LDADD+=${HOSTAPD_LDADD}
#LDFLAGS+=${HOSTAPD_LDFLAGS}

CFLAGS+=-DDPKCS12_FUNCS \
	-DEAP_SERVER \
	-DEAP_SERVER_GTC \
	-DEAP_SERVER_IDENTITY \
	-DEAP_SERVER_MD5 \
	-DEAP_SERVER_MSCHAPV2 \
	-DEAP_SERVER_PEAP \
	-DEAP_SERVER_TLS \
	-DEAP_SERVER_TTLS \
	-DEAP_TLS_FUNCS \
	-DEAP_SERVER_WSC \
	-DCONFIG_NO_DUMP_STATE
SRCS+=	dump_state.c \
	eap_server_gtc.c \
	eap_server_identity.c \
	eap_server_md5.c \
	eap_server_mschapv2.c \
	eap_server_peap.c \
	eap_server_tls.c \
	eap_server_tls_common.c \
	eap_server_ttls.c \
	eap_server_wsc.c \
	eap_wsc_common.c
TLS_FUNCS=y

.if !empty(CFLAGS:M*-DCONFIG_WPS)
NEED_SIM_COMMON=y
.endif

.if !empty(CFLAGS:M*-DEAP_SERVER_AKA)
SRCS+=	eap_server_aka.c
NEED_SIM_COMMON=y
.endif

.if !empty(CFLAGS:M*-DEAP_SERVER_SIM)
SRCS+=	eap_server_sim.c
NEED_SIM_COMMON=y
.endif

.if defined(NEED_SIM_COMMON)
SRCS+=	eap_sim_common.c \
	eap_sim_db.c
NEED_AES_CBC=y
NEED_FIPS186_2_PRF=y
.endif

.if !empty(CFLAGS:M*-DEAP_SERVER_GPSK)
CFLAGS+=-DEAP_GPSK_SHA256
SRCS+=	eap_server_gpsk.c \
	eap_gpsk_common.c
NEED_AES_OMAC1=y
.endif

.if !empty(CFLAGS:M*-DEAP_SERVER_PAX)
SRCS+=	eap_server_pax.c \
	eap_pax_common.c
.endif

.if !empty(CFLAGS:M*-DEAP_SERVER_SAKE)
SRCS+=	eap_server_sake.c \
	eap_sake_common.c
.endif

.include "${.CURDIR}/../Makefile.crypto"

.include <bsd.prog.mk>
OpenPOWER on IntegriCloud