xref: /freebsd/usr.sbin/wpa/hostapd/Makefile (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1# $FreeBSD$
2
3.include <src.opts.mk>
4.include "../Makefile.inc"
5
6.PATH.c:${HOSTAPD_DISTDIR} \
7	${WPA_DISTDIR}/src/ap \
8	${WPA_DISTDIR}/src/eap_server \
9	${WPA_DISTDIR}/src/eap_peer \
10	${WPA_DISTDIR}/src/drivers \
11	${WPA_DISTDIR}/wpa_supplicant
12
13PACKAGE=	hostapd
14PROG=	hostapd
15SRCS=	accounting.c \
16	ap_config.c \
17	ap_drv_ops.c \
18	ap_list.c \
19	ap_mlme.c \
20	authsrv.c \
21	base64.c \
22	beacon.c \
23	bss_load.c \
24	chap.c \
25	common.c \
26	config_file.c \
27	ctrl_iface.c \
28	ctrl_iface_ap.c \
29	ctrl_iface_common.c \
30	dfs.c \
31	driver_bsd.c \
32	driver_common.c \
33	drivers.c \
34	drv_callbacks.c \
35	eloop.c \
36	gas.c \
37	gas_serv.c \
38	http_client.c \
39	http_server.c \
40	httpread.c \
41	hostapd.c \
42	hs20.c \
43	hw_features.c \
44	hw_features_common.c \
45	ieee802_11.c \
46	ieee802_11_auth.c \
47	ieee802_11_common.c \
48	ieee802_11_he.c \
49	ieee802_11_ht.c \
50	ieee802_11_shared.c \
51	ieee802_11_vht.c \
52	ieee802_1x.c \
53	ip_addr.c \
54	l2_packet_freebsd.c \
55	main.c \
56	mbo_ap.c \
57	ms_funcs.c \
58	neighbor_db.c \
59	os_unix.c \
60	pmksa_cache_auth.c \
61	preauth_auth.c \
62	radius.c \
63	radius_client.c \
64	radius_das.c \
65	rrm.c \
66	sta_info.c \
67	tkip_countermeasures.c \
68	upnp_xml.c \
69	utils.c \
70	uuid.c \
71	vlan.c \
72	vlan_ifconfig.c \
73	vlan_init.c \
74	wmm.c \
75	wpa_auth.c \
76	wpa_auth_glue.c \
77	wpa_auth_ie.c \
78	wpa_common.c \
79	wpa_ctrl.c \
80	wpa_debug.c \
81	wpabuf.c \
82	wps.c \
83	wps_attr_build.c \
84	wps_attr_process.c \
85	wps_attr_parse.c \
86	wps_common.c \
87	wps_dev_attr.c \
88	wps_enrollee.c \
89	wps_hostapd.c \
90	wps_registrar.c \
91	wps_upnp.c \
92	wps_upnp_ap.c \
93	wps_upnp_event.c \
94	wps_upnp_ssdp.c \
95	wps_upnp_web.c
96
97MAN=	hostapd.8 hostapd.conf.5
98
99.if ${MK_EXAMPLES} != "no"
100FILESDIR= ${SHAREDIR}/examples/hostapd
101.PATH:	${HOSTAPD_DISTDIR}
102FILES=	hostapd.conf hostapd.eap_user hostapd.wpa_psk
103.endif
104
105CFLAGS+=-I${.CURDIR:H}/wpa_supplicant \
106	-I${WPA_DISTDIR}/src/eap_peer \
107	-DCONFIG_DRIVER_BSD \
108	-DCONFIG_DRIVER_RADIUS_ACL \
109	-DCONFIG_HS20 \
110	-DCONFIG_MBO \
111	-DCONFIG_IEEE80211N \
112	-DCONFIG_IEEE80211W \
113	-DCONFIG_IEEE80211AC \
114	-DCONFIG_IEEE80211AX \
115	-DCONFIG_INTERWORKING \
116	-DCONFIG_PEERKEY \
117	-DCONFIG_RSN_PREAUTH \
118	-DCONFIG_WPS \
119	-DCONFIG_WPS2 \
120	-DCONFIG_WPS_UPNP \
121	-DHOSTAPD
122.if ${MK_INET6} != "no"
123CFLAGS+= -DCONFIG_IPV6
124.endif
125#CFLAGS+= -g
126LIBADD+=	pcap util
127
128# User customizations for wpa_supplicant/hostapd build environment
129CFLAGS+=${HOSTAPD_CFLAGS}
130#DPADD+=${HOSTAPD_DPADD}
131LDADD+=${HOSTAPD_LDADD}
132#LDFLAGS+=${HOSTAPD_LDFLAGS}
133
134CFLAGS+=-DDPKCS12_FUNCS \
135	-DEAP_SERVER \
136	-DEAP_SERVER_GTC \
137	-DEAP_SERVER_IDENTITY \
138	-DEAP_SERVER_MD5 \
139	-DEAP_SERVER_MSCHAPV2 \
140	-DEAP_SERVER_PEAP \
141	-DEAP_SERVER_TLS \
142	-DEAP_SERVER_TTLS \
143	-DEAP_SERVER_WSC \
144	-DEAP_TLS_FUNCS
145
146SRCS+=	eap_server_gtc.c \
147	eap_common.c \
148	eap_peap_common.c \
149	eap_register.c \
150	eap_server.c \
151	eap_server_identity.c \
152	eap_server_md5.c \
153	eap_server_methods.c \
154	eap_server_mschapv2.c \
155	eap_server_peap.c \
156	eap_server_tls.c \
157	eap_server_tls_common.c \
158	eap_server_ttls.c \
159	eap_server_wsc.c \
160	eap_user_db.c \
161	eap_wsc_common.c \
162	eapol_auth_dump.c \
163	eapol_auth_sm.c
164TLS_FUNCS=y
165
166# For WPS, EAP modes, etc
167NEED_DH_GROUPS=y
168NEED_DH_GROUPS_ALL=y
169
170.if !empty(CFLAGS:M*-DCONFIG_WPS)
171NEED_SIM_COMMON=y
172.endif
173
174.if !empty(CFLAGS:M*-DEAP_SERVER_AKA)
175SRCS+=	eap_server_aka.c
176NEED_SIM_COMMON=y
177.endif
178
179.if !empty(CFLAGS:M*-DEAP_SERVER_SIM)
180SRCS+=	eap_server_sim.c
181NEED_SIM_COMMON=y
182.endif
183
184.if defined(NEED_SIM_COMMON)
185SRCS+=	eap_sim_common.c \
186	eap_sim_db.c
187NEED_FIPS186_2_PRF=y
188.endif
189
190.if !empty(CFLAGS:M*-DEAP_SERVER_GPSK)
191CFLAGS+=-DEAP_GPSK_SHA256
192SRCS+=	eap_server_gpsk.c \
193	eap_gpsk_common.c
194NEED_AES_OMAC1=y
195.endif
196
197.if !empty(CFLAGS:M*-DEAP_SERVER_PAX)
198SRCS+=	eap_server_pax.c \
199	eap_pax_common.c
200.endif
201
202.if !empty(CFLAGS:M*-DEAP_SERVER_SAKE)
203SRCS+=	eap_server_sake.c \
204	eap_sake_common.c
205.endif
206
207.include "../Makefile.crypto"
208
209.include <bsd.prog.mk>
210