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