1# $FreeBSD$ 2 3.include <src.opts.mk> 4 5.include "../Makefile.inc" 6 7.PATH.c:${WPA_SUPPLICANT_DISTDIR} \ 8 ${WPA_DISTDIR}/src/eap_peer \ 9 ${WPA_DISTDIR}/src/drivers 10 11PROG= wpa_supplicant 12 13SRCS= base64.c bitfield.c blacklist.c bss.c cli.c common.c \ 14 config.c config_file.c \ 15 ctrl_iface.c ctrl_iface_common.c ctrl_iface_unix.c \ 16 dh_groups.c driver_bsd.c driver_common.c \ 17 driver_ndis.c driver_wired.c driver_wired_common.c drivers.c \ 18 eap_register.c eap_wsc.c eap_wsc_common.c eloop.c \ 19 events.c gas.c gas_query.c hs20_supplicant.c \ 20 http_client.c http_server.c \ 21 httpread.c hw_features_common.c \ 22 ieee802_11_common.c interworking.c l2_packet_freebsd.c main.c \ 23 notify.c offchannel.c op_classes.c os_unix.c pmksa_cache.c preauth.c \ 24 rrm.c scan.c upnp_xml.c uuid.c \ 25 wmm_ac.c wpa.c wpa_common.c wpa_ctrl.c \ 26 wpa_debug.c wpa_ft.c wpa_ie.c wpa_supplicant.c wpabuf.c wpas_glue.c \ 27 wps.c wps_attr_build.c wps_attr_parse.c wps_attr_process.c \ 28 wps_common.c wps_dev_attr.c wps_enrollee.c wps_registrar.c \ 29 wps_supplicant.c wps_upnp.c wps_upnp_ap.c wps_upnp_event.c \ 30 wps_upnp_ssdp.c wps_upnp_web.c \ 31 Packet32.c 32 33MAN= wpa_supplicant.8 wpa_supplicant.conf.5 34 35.if ${MK_EXAMPLES} != "no" 36FILESDIR= ${SHAREDIR}/examples/etc 37.PATH: ${WPA_SUPPLICANT_DISTDIR} 38FILES= wpa_supplicant.conf 39.endif 40 41CFLAGS+=-DCONFIG_BACKEND_FILE \ 42 -DCONFIG_DEBUG_SYSLOG \ 43 -DCONFIG_DRIVER_BSD \ 44 -DCONFIG_DRIVER_NDIS \ 45 -DCONFIG_DRIVER_WIRED \ 46 -DCONFIG_GAS \ 47 -DCONFIG_HS20 \ 48 -DCONFIG_IEEE80211R \ 49 -DCONFIG_INTERWORKING \ 50 -DCONFIG_PEERKEY \ 51 -DCONFIG_PRIVSEP \ 52 -DCONFIG_SMARTCARD \ 53 -DCONFIG_TERMINATE_ONLASTIF \ 54 -DCONFIG_TLS=openssl \ 55 -DCONFIG_WPS \ 56 -DCONFIG_WPS2 \ 57 -DCONFIG_WPS_UPNP \ 58 -DPKCS12_FUNCS 59#CFLAGS+= -g 60LIBADD= pcap util 61 62# User customizations to the wpa_supplicant build environment 63CFLAGS+=${WPA_SUPPLICANT_CFLAGS} 64#DPADD+=${WPA_SUPPLICANT_DPADD} 65LDADD+=${WPA_SUPPLICANT_LDADD} 66#LDFLAGS+=${WPA_SUPPLICANT_LDFLAGS} 67 68.if ${MK_WPA_SUPPLICANT_EAPOL} != "no" 69CFLAGS+=-DEAP_GTC \ 70 -DEAP_LEAP \ 71 -DEAP_MD5 \ 72 -DEAP_MSCHAPv2 \ 73 -DEAP_OTP \ 74 -DEAP_PEAP \ 75 -DEAP_PSK \ 76 -DEAP_TLS \ 77 -DEAP_TTLS \ 78 -DIEEE8021X_EAPOL 79SRCS+= chap.c \ 80 eap.c \ 81 eap_common.c \ 82 eap_gtc.c \ 83 eap_leap.c \ 84 eap_md5.c \ 85 eap_methods.c \ 86 eap_mschapv2.c \ 87 eap_otp.c \ 88 eap_peap.c \ 89 eap_peap_common.c \ 90 eap_psk.c \ 91 eap_psk_common.c \ 92 eap_tls.c \ 93 eap_tls_common.c \ 94 eap_ttls.c \ 95 eapol_supp_sm.c \ 96 ms_funcs.c \ 97 mschapv2.c 98TLS_FUNCS=y 99NEED_AES_EAX=y 100NEED_AES_ENCBLOCK=y 101NEED_AES_OMAC1=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 130LIBADD+= pcslite pthread 131.endif 132 133.if !empty(CFLAGS:M*-DEAP_GPSK) 134CFLAGS+=-DEAP_GPSK_SHA256 135SRCS+= eap_gpsk.c \ 136 eap_gpsk_common.c 137NEED_AES_OMAC1=y 138.endif 139 140.if !empty(CFLAGS:M*-DEAP_PAX) 141SRCS+= eap_pax.c \ 142 eap_pax_common.c 143.endif 144 145.if !empty(CFLAGS:M*-DEAP_SAKE) 146SRCS+= eap_sake.c \ 147 eap_sake_common.c 148.endif 149 150.include "../Makefile.crypto" 151 152.include <bsd.prog.mk> 153