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