Makefile revision 189263
1219019Sgabor# $FreeBSD: head/usr.sbin/wpa/wpa_supplicant/Makefile 189263 2009-03-02 02:28:22Z sam $ 2219019Sgabor 3219019Sgabor.include "${.CURDIR}/../Makefile.inc" 4219019Sgabor 5219019Sgabor.PATH.c:${WPA_SUPPLICANT_DISTDIR} \ 6219019Sgabor ${WPA_DISTDIR}/src/drivers \ 7219019Sgabor ${WPA_DISTDIR}/src/eap_peer \ 8219019Sgabor ${WPA_DISTDIR}/src/rsn_supp 9219019Sgabor 10219019SgaborPROG= wpa_supplicant 11219019SgaborSRCS= aes.c aes_wrap.c blacklist.c common.c config.c ctrl_iface.c \ 12219019Sgabor ctrl_iface_unix.c drivers.c eloop.c events.c l2_packet.c main.c \ 13219019Sgabor md5.c preauth.c pmksa_cache.c rc4.c scan.c scan_helpers.c sha1.c \ 14219019Sgabor wpa.c wpa_common.c wpa_debug.c wpa_ie.c wpa_supplicant.c \ 15219019Sgabor wpabuf.c wpas_glue.c \ 16219019Sgabor driver_ndis.c Packet32.c \ 17219019Sgabor driver_wired.c \ 18219019Sgabor driver_freebsd.c os_unix.c 19219019Sgabor 20219019SgaborMAN= wpa_supplicant.8 wpa_supplicant.conf.5 21219019Sgabor 22219019Sgabor.if ${MK_EXAMPLES} != "no" 23219019SgaborFILESDIR= ${SHAREDIR}/examples/etc 24219019Sgabor.PATH: ${WPA_SUPPLICANT_DISTDIR} 25219019SgaborFILES= wpa_supplicant.conf 26219019Sgabor.endif 27219019Sgabor 28219019SgaborCFLAGS+=-I${WPA_SUPPLICANT_DISTDIR} 29219019SgaborCFLAGS+=-I${WPA_DISTDIR}/src/drivers 30219019SgaborCFLAGS+=-I${WPA_DISTDIR}/src/rsn_supp 31219019Sgabor 32219019SgaborCFLAGS+= -DCONFIG_DRIVER_BSD 33219019SgaborCFLAGS+= -DCONFIG_DRIVER_NDIS 34219019SgaborCFLAGS+= -DCONFIG_DRIVER_WIRED 35219019SgaborCFLAGS+= -DCONFIG_TERMINATE_ONLASTIF 36219019SgaborCFLAGS+= -DCONFIG_DEBUG_SYSLOG 37219019SgaborCFLAGS+= -g 38219019SgaborDPADD+= ${LIBPCAP} 39219019SgaborLDADD+= -lpcap 40219019Sgabor 41219019Sgabor# NB: we only support wpa_supplicant.conf file 42219019SgaborSRCS+= config_file.c base64.c 43219019SgaborCFLAGS+=-DCONFIG_BACKEND_FILE 44219019Sgabor 45219019Sgabor# User customizations to the wpa_supplicant build environment 46219019SgaborCFLAGS+=${WPA_SUPPLICANT_CFLAGS} 47219019Sgabor#DPADD+=${WPA_SUPPLICANT_DPADD} 48219019SgaborLDADD+=${WPA_SUPPLICANT_LDADD} 49219019Sgabor#LDFLAGS+=${WPA_SUPPLICANT_LDFLAGS} 50219019Sgabor 51219019Sgabor.if ${MK_WPA_SUPPLICANT_EAPOL} != "no" 52219019SgaborSRCS+= eapol_supp_sm.c eap.c eap_common.c eap_methods.c 53219019SgaborCFLAGS+= -DIEEE8021X_EAPOL 54219019Sgabor 55219019Sgabor.if ${MK_OPENSSL} != "no" && !defined(RELEASE_CRUNCH) 56219019SgaborCFLAGS+=-DEAP_TLS -DEAP_PEAP -DEAP_MSCHAPv2 -DEAP_LEAP -DEAP_PSK \ 57219019Sgabor -DEAP_TLV -DEAP_TLS_FUNCS -DEAP_TLS_OPENSSL 58219019SgaborSRCS+= chap.c crypto_openssl.c \ 59219019Sgabor eap_leap.c \ 60219019Sgabor eap_mschapv2.c \ 61219019Sgabor eap_peap.c eap_peap_common.c \ 62219019Sgabor eap_psk.c eap_psk_common.c \ 63219019Sgabor eap_tls.c eap_tls_common.c \ 64219019Sgabor mschapv2.c ms_funcs.c tls_openssl.c 65219019Sgabor 66219019SgaborCFLAGS+=-DEAP_TTLS -DEAP_MD5 67219019SgaborSRCS+= eap_ttls.c eap_md5.c 68219019Sgabor 69219019Sgabor.if !empty(CFLAGS:M*-DEAP_GTC) 70219019SgaborSRCS+= eap_gtc.c 71219019Sgabor.endif 72219019Sgabor 73219019Sgabor.if !empty(CFLAGS:M*-DEAP_OTP) 74219019SgaborSRCS+= eap_otp.c 75219019Sgabor.endif 76219019Sgabor 77219019Sgabor.if !empty(CFLAGS:M*-DEAP_AKA) 78219019SgaborNEED_SIM_COMMON= true 79219019SgaborSRCS+= eap_aka.c 80219019Sgabor.endif 81219019Sgabor 82219019Sgabor.if !empty(CFLAGS:M*-DEAP_SIM) 83219019SgaborNEED_SIM_COMMON= true 84219019SgaborSRCS+= eap_sim.c 85219019Sgabor.endif 86219019Sgabor 87219019Sgabor.if defined(NEED_SIM_COMMON) 88219019SgaborSRCS+= eap_sim_common.c 89219019Sgabor 90219019Sgabor# PC/SC interface for smartcards (USIM, GSM SIM) 91219019Sgabor# GSM/UMTS authentication algorithm (for EAP-SIM/EAP-AKA) 92219019Sgabor# NB: requires devel/pcsc-lite 93219019Sgabor# 94219019Sgabor# WPA_SUPPLICANT_CFLAGS=-DEAP_AKA -DPCSC_FUNCS -I/usr/local/include/PCSC 95219019Sgabor# WPA_SUPPLICANT_LDADD=-L/usr/local/lib 96219019Sgabor# 97219019Sgabor.if !empty(CFLAGS:M*-DPCSC_FUNCS) 98219019SgaborSRCS+= pcsc_funcs.c 99219019SgaborDPADD+=${LIBPTHREAD} 100219019SgaborLDADD+=-lpcsclite -lpthread 101219019Sgabor.endif 102219019Sgabor.endif 103219019Sgabor 104219019Sgabor.if !empty(CFLAGS:M*-DEAP_GPSK) 105219019SgaborCFLAGS+=-DEAP_GPSK_SHA256 106219019SgaborSRCS+= eap_gpsk.c eap_gpsk_common.c 107219019SgaborNEED_SHA256= true 108219019Sgabor.endif 109219019Sgabor 110219019Sgabor.if !empty(CFLAGS:M*-DEAP_PAX) 111219019SgaborSRCS+= eap_pax.c eap_pax_common.c 112219019Sgabor.endif 113219019Sgabor 114219019Sgabor.if !empty(CFLAGS:M*-DEAP_SAKE) 115219019SgaborSRCS+= eap_sake.c eap_sake_common.c 116219019Sgabor.endif 117219019Sgabor 118219019Sgabor# NB: requires patch to openssl 119219019Sgabor#CFLAGS+= -DEAP_FAST 120219019Sgabor#SRCS+= eap_fast.c 121219019Sgabor 122219019SgaborNEED_LIBSSL= true 123219019Sgabor.else 124219019SgaborCFLAGS+= -DEAP_TLS_NONE 125219019SgaborSRCS+= tls_none.c 126219019Sgabor.endif 127219019Sgabor 128219019Sgabor.endif 129219019Sgabor 130219019Sgabor# 131219019Sgabor# Configure crypto/cipher support. 132219019Sgabor# 133219019Sgabor# EAPOL support requires openssl in which case we use their 134219019Sgabor# cipher code. Otherwise we use our internal versions. 135219019Sgabor# 136219019Sgabor.if !defined(NEED_LIBSSL) 137219019SgaborCFLAGS+= -DINTERNAL_AES 138219019SgaborCFLAGS+= -DINTERNAL_SHA1 139219019SgaborCFLAGS+= -DINTERNAL_MD5 140219019Sgabor.else 141219019SgaborDPADD+= ${LIBSSL} ${LIBCRYPTO} 142219019SgaborLDADD+= -lssl -lcrypto 143219019Sgabor.endif 144219019Sgabor 145219019Sgabor.if defined(NEED_SHA256) 146219019SgaborCFLAGS+=-DINTERNAL_SHA256 147219019SgaborSRCS+= sha256.c 148219019Sgabor.endif 149219019Sgabor 150219019Sgabor.include <bsd.prog.mk> 151219019Sgabor