xref: /freebsd/usr.sbin/wpa/hostapd/Makefile (revision a812392203d7c4c3f0db9d8a0f3391374c49c71f)
1# $FreeBSD$
2
3.include <src.opts.mk>
4.include "${.CURDIR}/../Makefile.inc"
5
6.PATH.c:${HOSTAPD_DISTDIR} \
7	${WPA_DISTDIR}/src/drivers
8
9PROG=	hostapd
10SRCS=	accounting.c aes-wrap.c ap_config.c ap_drv_ops.c ap_mlme.c authsrv.c \
11	base64.c beacon.c chap.c common.c config_file.c ctrl_iface.c \
12	ctrl_iface_ap.c driver_common.c l2_packet_freebsd.c driver_bsd.c \
13	drivers.c drv_callbacks.c eap_common.c eap_peap_common.c \
14	eap_register.c eap_server.c eap_server_methods.c eap_user_db.c \
15	eapol_auth_dump.c eapol_auth_sm.c eloop.c gas.c gas_serv.c hostapd.c \
16	hs20.c http_client.c http_server.c httpread.c ieee802_11_auth.c \
17	ieee802_11_common.c ieee802_11_shared.c ieee802_1x.c ip_addr.c \
18	main.c md5.c ms_funcs.c os_unix.c peerkey_auth.c pmksa_cache_auth.c \
19	preauth_auth.c radius.c radius_client.c radius_das.c sta_info.c \
20	tkip_countermeasures.c upnp_xml.c utils.c uuid.c vlan_init.c \
21	wpa_auth.c wpa_auth_glue.c wpa_auth_ie.c wpa_common.c wpa_debug.c \
22	wpabuf.c wps.c wps_attr_build.c wps_attr_parse.c wps_attr_process.c \
23	wps_common.c wps_dev_attr.c wps_enrollee.c wps_hostapd.c \
24	wps_registrar.c wps_upnp.c wps_upnp_ap.c wps_upnp_event.c \
25	wps_upnp_ssdp.c wps_upnp_web.c
26
27MAN=	hostapd.8 hostapd.conf.5
28
29.if ${MK_EXAMPLES} != "no"
30FILESDIR= ${SHAREDIR}/examples/hostapd
31.PATH:	${HOSTAPD_DISTDIR}
32FILES=	hostapd.conf hostapd.eap_user hostapd.wpa_psk
33.endif
34
35CFLAGS+=-DCONFIG_DRIVER_BSD \
36	-DHOSTAPD \
37	-DCONFIG_DRIVER_RADIUS_ACL \
38	-DCONFIG_RSN_PREAUTH \
39	-DCONFIG_PEERKEY \
40	-DCONFIG_WPS \
41	-DCONFIG_WPS2 \
42	-DCONFIG_WPS_UPNP \
43	-DCONFIG_INTERWORKING \
44	-DCONFIG_HS20
45.if ${MK_INET6} != "no"
46CFLAGS+= -DCONFIG_IPV6
47.endif
48#CFLAGS+= -g
49LIBADD+=	pcap util
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