xref: /freebsd/usr.sbin/wpa/hostapd/Makefile (revision 7661de35d15f582ab33e3bd6b8d909601557e436)
1# $FreeBSD$
2
3.include "${.CURDIR}/../Makefile.inc"
4
5.PATH.c:${HOSTAPD_DISTDIR} \
6	${WPA_DISTDIR}/src/drivers
7
8PROG=	hostapd
9SRCS=	accounting.c aes-wrap.c ap_config.c ap_drv_ops.c ap_mlme.c authsrv.c \
10	base64.c beacon.c chap.c common.c config_file.c ctrl_iface.c \
11	ctrl_iface_ap.c driver_common.c l2_packet_freebsd.c driver_bsd.c \
12	drivers.c drv_callbacks.c eap_common.c eap_peap_common.c \
13	eap_register.c eap_server.c eap_server_methods.c eap_user_db.c \
14	eapol_auth_dump.c eapol_auth_sm.c eloop.c gas.c gas_serv.c hostapd.c \
15	hs20.c http_client.c http_server.c httpread.c ieee802_11_auth.c \
16	ieee802_11_common.c ieee802_11_shared.c ieee802_1x.c ip_addr.c \
17	main.c md5.c ms_funcs.c os_unix.c peerkey_auth.c pmksa_cache_auth.c \
18	preauth_auth.c radius.c radius_client.c radius_das.c sta_info.c \
19	tkip_countermeasures.c upnp_xml.c utils.c uuid.c vlan_init.c \
20	wpa_auth.c wpa_auth_glue.c wpa_auth_ie.c wpa_common.c wpa_debug.c \
21	wpabuf.c wps.c wps_attr_build.c wps_attr_parse.c wps_attr_process.c \
22	wps_common.c wps_dev_attr.c wps_enrollee.c wps_hostapd.c \
23	wps_registrar.c wps_upnp.c wps_upnp_ap.c wps_upnp_event.c \
24	wps_upnp_ssdp.c wps_upnp_web.c
25
26MAN=	hostapd.8 hostapd.conf.5
27
28.if ${MK_EXAMPLES} != "no"
29FILESDIR= ${SHAREDIR}/examples/hostapd
30.PATH:	${HOSTAPD_DISTDIR}
31FILES=	hostapd.conf hostapd.eap_user hostapd.wpa_psk
32.endif
33
34CFLAGS+=-DCONFIG_DRIVER_BSD \
35	-DHOSTAPD \
36	-DCONFIG_DRIVER_RADIUS_ACL \
37	-DCONFIG_RSN_PREAUTH \
38	-DCONFIG_PEERKEY \
39	-DCONFIG_WPS \
40	-DCONFIG_WPS2 \
41	-DCONFIG_WPS_UPNP \
42	-DCONFIG_INTERWORKING \
43	-DCONFIG_HS20
44.if ${MK_INET6} != "no"
45CFLAGS+= -DCONFIG_IPV6
46.endif
47#CFLAGS+= -g
48DPADD+=	${LIBPCAP}
49LDADD+=	-lpcap
50
51# User customizations for wpa_supplicant/hostapd build environment
52CFLAGS+=${HOSTAPD_CFLAGS}
53#DPADD+=${HOSTAPD_DPADD}
54LDADD+=${HOSTAPD_LDADD}
55#LDFLAGS+=${HOSTAPD_LDFLAGS}
56
57CFLAGS+=-DDPKCS12_FUNCS \
58	-DEAP_SERVER \
59	-DEAP_SERVER_GTC \
60	-DEAP_SERVER_IDENTITY \
61	-DEAP_SERVER_MD5 \
62	-DEAP_SERVER_MSCHAPV2 \
63	-DEAP_SERVER_PEAP \
64	-DEAP_SERVER_TLS \
65	-DEAP_SERVER_TTLS \
66	-DEAP_TLS_FUNCS \
67	-DEAP_SERVER_WSC \
68	-DCONFIG_NO_DUMP_STATE
69SRCS+=	dump_state.c \
70	eap_server_gtc.c \
71	eap_server_identity.c \
72	eap_server_md5.c \
73	eap_server_mschapv2.c \
74	eap_server_peap.c \
75	eap_server_tls.c \
76	eap_server_tls_common.c \
77	eap_server_ttls.c \
78	eap_server_wsc.c \
79	eap_wsc_common.c
80TLS_FUNCS=y
81
82.if !empty(CFLAGS:M*-DCONFIG_WPS)
83NEED_SIM_COMMON=y
84.endif
85
86.if !empty(CFLAGS:M*-DEAP_SERVER_AKA)
87SRCS+=	eap_server_aka.c
88NEED_SIM_COMMON=y
89.endif
90
91.if !empty(CFLAGS:M*-DEAP_SERVER_SIM)
92SRCS+=	eap_server_sim.c
93NEED_SIM_COMMON=y
94.endif
95
96.if defined(NEED_SIM_COMMON)
97SRCS+=	eap_sim_common.c \
98	eap_sim_db.c
99NEED_AES_CBC=y
100NEED_FIPS186_2_PRF=y
101.endif
102
103.if !empty(CFLAGS:M*-DEAP_SERVER_GPSK)
104CFLAGS+=-DEAP_GPSK_SHA256
105SRCS+=	eap_server_gpsk.c \
106	eap_gpsk_common.c
107NEED_AES_OMAC1=y
108.endif
109
110.if !empty(CFLAGS:M*-DEAP_SERVER_PAX)
111SRCS+=	eap_server_pax.c \
112	eap_pax_common.c
113.endif
114
115.if !empty(CFLAGS:M*-DEAP_SERVER_SAKE)
116SRCS+=	eap_server_sake.c \
117	eap_sake_common.c
118.endif
119
120.include "${.CURDIR}/../Makefile.crypto"
121
122.include <bsd.prog.mk>
123