1# $FreeBSD$ 2 3.include "${.CURDIR}/../Makefile.inc" 4 5.PATH.c:${HOSTAPD_DISTDIR} \ 6 ${WPA_DISTDIR}/src/ap \ 7 ${WPA_DISTDIR}/src/eap_server \ 8 ${WPA_DISTDIR}/src/eap_common \ 9 ${WPA_DISTDIR}/src/eapol_auth \ 10 ${WPA_DISTDIR}/src/drivers \ 11 ${WPA_DISTDIR}/src/radius \ 12 ${WPA_DISTDIR} 13 14PROG= hostapd 15SRCS= accounting.c aes-wrap.c ap_config.c \ 16 ap_drv_ops.c ap_mlme.c authsrv.c \ 17 chap.c common.c config_file.c ctrl_iface.c crypto_openssl.c \ 18 ctrl_iface_ap.c drivers.c drv_callbacks.c dump_state.c \ 19 eap_common.c eap_peap_common.c eap_register.c eap_server.c \ 20 eap_server_gtc.c eap_server_identity.c eap_server_md5.c \ 21 eap_server_methods.c eap_server_mschapv2.c eap_server_peap.c \ 22 eap_server_tls.c eap_server_tls_common.c eap_server_ttls.c \ 23 eapol_auth_dump.c eapol_auth_sm.c eloop.c hostapd.c ieee802_11_auth.c \ 24 ieee802_11_common.c ieee802_11_ht.c ieee802_1x.c ip_addr.c \ 25 md5.c main.c ms_funcs.c peerkey_auth.c pmksa_cache_auth.c \ 26 preauth_auth.c radius.c radius_client.c sta_info.c \ 27 sha1-pbkdf2.c sha1-tlsprf.c sha1-tprf.c sha1.c \ 28 tkip_countermeasures.c utils.c \ 29 vlan_init.c wpa_auth.c wpa_auth_glue.c wpa_auth_ie.c wpa_common.c \ 30 wpa_debug.c wpabuf.c 31SRCS+= l2_packet_freebsd.c driver_freebsd.c os_unix.c 32 33MAN= hostapd.8 hostapd.conf.5 34 35.if ${MK_EXAMPLES} != "no" 36FILESDIR= ${SHAREDIR}/examples/hostapd 37.PATH: ${HOSTAPD_DISTDIR} 38FILES= hostapd.conf hostapd.eap_user hostapd.wpa_psk 39.endif 40 41CFLAGS+= -I${HOSTAPD_DISTDIR} -I${WPA_DISTDIR}/src/drivers 42 43CFLAGS+= -DCONFIG_DRIVER_BSD -DHOSTAPD 44CFLAGS+= -DCONFIG_DRIVER_RADIUS_ACL 45.if ${MK_INET6} != "no" 46CFLAGS+= -DCONFIG_IPV6 47.endif 48#CFLAGS+= -g 49DPADD+= ${LIBPCAP} ${LIBSSL} 50LDADD+= -lpcap -lssl 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 58.if !empty(CFLAGS:M*-DEAP_SERVER) 59#SRCS+= eap.c eap_methods.c eap_identity.c 60 61.if ${MK_OPENSSL} != "no" && !defined(RELEASE_CRUNCH) 62 63CFLAGS+=-DEAP_TLS -DEAP_PEAP -DEAP_MSCHAPv2 -DEAP_PSK \ 64 -DEAP_TLS_FUNCS -DEAP_TLS_OPENSSL 65SRCS+= crypto_openssl.c 66SRCS+= eap_tls.c eap_peap.c eap_peap_common.c eap_mschapv2.c \ 67 eap_psk.c eap_psk_common.c \ 68 eap_tls_common.c tls_openssl.c ms_funcs.c chap.c 69 70CFLAGS+=-DEAP_TTLS -DEAP_MD5 71SRCS+= eap_ttls.c eap_md5.c 72 73.if !empty(CFLAGS:M*-DEAP_GTC) 74SRCS+= eap_gtc.c 75.endif 76 77.if !empty(CFLAGS:M*-DEAP_AKA) 78NEED_SIM_COMMON= true 79SRCS+= eap_aka.c 80.endif 81 82.if !empty(CFLAGS:M*-DEAP_SIM) 83NEED_SIM_COMMON= true 84SRCS+= eap_sim.c 85.endif 86 87.if defined(NEED_SIM_COMMON) 88SRCS+= eap_sim_common.c eap_sim_db.c 89.endif 90 91.if !empty(CFLAGS:M*-DEAP_GPSK) 92CFLAGS+=-DEAP_GPSK_SHA256 93SRCS+= eap_gpsk.c eap_gpsk_common.c 94NEED_SHA256= true 95.endif 96 97.if !empty(CFLAGS:M*-DEAP_PAX) 98SRCS+= eap_pax.c eap_pax_common.c 99.endif 100 101.if !empty(CFLAGS:M*-DEAP_SAKE) 102SRCS+= eap_sake.c eap_sake_common.c 103.endif 104 105DPADD+= ${LIBSSL} ${LIBCRYPTO} 106LDADD+= -lssl -lcrypto 107.else 108NEED_TLS_NONE= true 109.endif 110 111.else 112NEED_TLS_NONE= true 113.endif 114 115.if defined(NEED_SHA256) 116CFLAGS+=-DINTERNAL_SHA256 117SRCS+= sha256.c 118.endif 119 120.if defined(NEED_TLS_NONE) 121CFLAGS+= -DEAP_TLS_NONE 122CFLAGS+= -DINTERNAL_AES 123CFLAGS+= -DINTERNAL_SHA1 124CFLAGS+= -DINTERNAL_MD5 125SRCS+= tls_none.c 126.endif 127 128.include <bsd.prog.mk> 129