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