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