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 49DPADD+= ${LIBPCAP} ${LIBUTIL} 50LDADD+= -lpcap -lutil 51 52# User customizations for wpa_supplicant/hostapd build environment 53CFLAGS+=${HOSTAPD_CFLAGS} 54#DPADD+=${HOSTAPD_DPADD} 55LDADD+=${HOSTAPD_LDADD} 56#LDFLAGS+=${HOSTAPD_LDFLAGS} 57 58CFLAGS+=-DDPKCS12_FUNCS \ 59 -DEAP_SERVER \ 60 -DEAP_SERVER_GTC \ 61 -DEAP_SERVER_IDENTITY \ 62 -DEAP_SERVER_MD5 \ 63 -DEAP_SERVER_MSCHAPV2 \ 64 -DEAP_SERVER_PEAP \ 65 -DEAP_SERVER_TLS \ 66 -DEAP_SERVER_TTLS \ 67 -DEAP_TLS_FUNCS \ 68 -DEAP_SERVER_WSC \ 69 -DCONFIG_NO_DUMP_STATE 70SRCS+= dump_state.c \ 71 eap_server_gtc.c \ 72 eap_server_identity.c \ 73 eap_server_md5.c \ 74 eap_server_mschapv2.c \ 75 eap_server_peap.c \ 76 eap_server_tls.c \ 77 eap_server_tls_common.c \ 78 eap_server_ttls.c \ 79 eap_server_wsc.c \ 80 eap_wsc_common.c 81TLS_FUNCS=y 82 83.if !empty(CFLAGS:M*-DCONFIG_WPS) 84NEED_SIM_COMMON=y 85.endif 86 87.if !empty(CFLAGS:M*-DEAP_SERVER_AKA) 88SRCS+= eap_server_aka.c 89NEED_SIM_COMMON=y 90.endif 91 92.if !empty(CFLAGS:M*-DEAP_SERVER_SIM) 93SRCS+= eap_server_sim.c 94NEED_SIM_COMMON=y 95.endif 96 97.if defined(NEED_SIM_COMMON) 98SRCS+= eap_sim_common.c \ 99 eap_sim_db.c 100NEED_AES_CBC=y 101NEED_FIPS186_2_PRF=y 102.endif 103 104.if !empty(CFLAGS:M*-DEAP_SERVER_GPSK) 105CFLAGS+=-DEAP_GPSK_SHA256 106SRCS+= eap_server_gpsk.c \ 107 eap_gpsk_common.c 108NEED_AES_OMAC1=y 109.endif 110 111.if !empty(CFLAGS:M*-DEAP_SERVER_PAX) 112SRCS+= eap_server_pax.c \ 113 eap_pax_common.c 114.endif 115 116.if !empty(CFLAGS:M*-DEAP_SERVER_SAKE) 117SRCS+= eap_server_sake.c \ 118 eap_sake_common.c 119.endif 120 121.include "${.CURDIR}/../Makefile.crypto" 122 123.include <bsd.prog.mk> 124