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