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