1# $FreeBSD$ 2 3.include <src.opts.mk> 4 5.include "${.CURDIR}/../Makefile.inc" 6 7.PATH.c:${WPA_SUPPLICANT_DISTDIR} \ 8 ${WPA_DISTDIR}/src/drivers 9 10PROG= wpa_supplicant 11SRCS= aes-unwrap.c base64.c blacklist.c bss.c common.c config.c \ 12 config_file.c ctrl_iface.c ctrl_iface_unix.c driver_bsd.c \ 13 driver_common.c driver_ndis.c driver_wired.c drivers.c \ 14 eap_register.c eloop.c events.c gas.c gas_query.c hs20.c \ 15 hs20_supplicant.c http_client.c http_server.c httpread.c \ 16 ieee802_11_common.c interworking.c l2_packet_freebsd.c main.c \ 17 md5.c notify.c offchannel.c os_unix.c peerkey.c pmksa_cache.c \ 18 preauth.c scan.c upnp_xml.c uuid.c wpa.c wpa_common.c wpa_debug.c \ 19 wpa_ft.c wpa_ie.c wpa_supplicant.c wpabuf.c wpas_glue.c wps.c \ 20 wps_attr_build.c wps_attr_parse.c wps_attr_process.c \ 21 wps_common.c wps_dev_attr.c wps_enrollee.c wps_registrar.c \ 22 wps_supplicant.c wps_upnp.c wps_upnp_ap.c wps_upnp_event.c \ 23 wps_upnp_ssdp.c wps_upnp_web.c Packet32.c 24 25MAN= wpa_supplicant.8 wpa_supplicant.conf.5 26 27.if ${MK_EXAMPLES} != "no" 28FILESDIR= ${SHAREDIR}/examples/etc 29.PATH: ${WPA_SUPPLICANT_DISTDIR} 30FILES= wpa_supplicant.conf 31.endif 32 33CFLAGS+=-DCONFIG_BACKEND_FILE \ 34 -DCONFIG_DEBUG_SYSLOG \ 35 -DCONFIG_DRIVER_BSD \ 36 -DCONFIG_DRIVER_NDIS \ 37 -DCONFIG_DRIVER_WIRED \ 38 -DCONFIG_PEERKEY \ 39 -DCONFIG_SMARTCARD \ 40 -DCONFIG_TERMINATE_ONLASTIF \ 41 -DCONFIG_WPS \ 42 -DCONFIG_WPS2 \ 43 -DCONFIG_WPS_UPNP \ 44 -DCONFIG_TLS=openssl \ 45 -DCONFIG_IEEE80211R \ 46 -DCONFIG_INTERWORKING \ 47 -DCONFIG_PRIVSEP \ 48 -DCONFIG_HS20 \ 49 -DCONFIG_GAS \ 50 -DPKCS12_FUNCS 51#CFLAGS+= -g 52DPADD+= ${LIBPCAP} ${LIBUTIL} 53LDADD+= -lpcap -lutil 54 55# User customizations to the wpa_supplicant build environment 56CFLAGS+=${WPA_SUPPLICANT_CFLAGS} 57#DPADD+=${WPA_SUPPLICANT_DPADD} 58LDADD+=${WPA_SUPPLICANT_LDADD} 59#LDFLAGS+=${WPA_SUPPLICANT_LDFLAGS} 60 61.if ${MK_WPA_SUPPLICANT_EAPOL} != "no" 62CFLAGS+=-DEAP_GTC \ 63 -DEAP_LEAP \ 64 -DEAP_MD5 \ 65 -DEAP_MSCHAPv2 \ 66 -DEAP_OTP \ 67 -DEAP_PEAP \ 68 -DEAP_PSK \ 69 -DEAP_TLS \ 70 -DEAP_TTLS \ 71 -DEAP_GTC \ 72 -DEAP_OTP \ 73 -DEAP_LEAP \ 74 -DIEEE8021X_EAPOL 75SRCS+= chap.c \ 76 eap.c \ 77 eap_common.c \ 78 eap_gtc.c \ 79 eap_leap.c \ 80 eap_md5.c \ 81 eap_methods.c \ 82 eap_mschapv2.c \ 83 eap_otp.c \ 84 eap_peap.c \ 85 eap_peap_common.c \ 86 eap_psk.c \ 87 eap_psk_common.c \ 88 eap_tls.c \ 89 eap_tls_common.c \ 90 eap_ttls.c \ 91 eapol_supp_sm.c \ 92 ms_funcs.c \ 93 mschapv2.c 94TLS_FUNCS=y 95NEED_AES_EAX=y 96NEED_AES_ENCBLOCK=y 97NEED_AES_OMAC1=y 98.endif 99 100.if !empty(CFLAGS:M-DCONFIG_WPS) 101NEED_AES_CBC=y 102.endif 103 104.if !empty(CFLAGS:M*-DEAP_AKA) 105SRCS+= eap_aka.c 106NEED_SIM_COMMON=y 107NEED_AES_CBC=y 108.endif 109 110.if !empty(CFLAGS:M*-DEAP_SIM) 111SRCS+= eap_sim.c 112NEED_SIM_COMMON=y 113NEED_AES_CBC=y 114.endif 115 116.if defined(NEED_SIM_COMMON) 117SRCS+= eap_sim_common.c 118NEED_FIPS186_2_PRF=y 119.endif 120 121# PC/SC interface for smartcards (USIM, GSM SIM) 122# GSM/UMTS authentication algorithm (for EAP-SIM/EAP-AKA) 123# NB: requires devel/pcsc-lite 124# 125# WPA_SUPPLICANT_CFLAGS=-DEAP_AKA -DPCSC_FUNCS -I/usr/local/include/PCSC 126# WPA_SUPPLICANT_LDADD=-L/usr/local/lib 127# 128.if !empty(CFLAGS:M*-DPCSC_FUNCS) 129SRCS+= pcsc_funcs.c 130DPADD+=${LIBPTHREAD} 131LDADD+=-lpcsclite -lpthread 132.endif 133 134.if !empty(CFLAGS:M*-DEAP_GPSK) 135CFLAGS+=-DEAP_GPSK_SHA256 136SRCS+= eap_gpsk.c \ 137 eap_gpsk_common.c 138NEED_AES_OMAC1=y 139.endif 140 141.if !empty(CFLAGS:M*-DEAP_PAX) 142SRCS+= eap_pax.c \ 143 eap_pax_common.c 144.endif 145 146.if !empty(CFLAGS:M*-DEAP_SAKE) 147SRCS+= eap_sake.c \ 148 eap_sake_common.c 149.endif 150 151.include "${.CURDIR}/../Makefile.crypto" 152 153.include <bsd.prog.mk> 154