1c1d255d3SCy SchubertALL=hostapd hostapd_cli 2c1d255d3SCy SchubertCONFIG_FILE = .config 3c1d255d3SCy Schubert 4c1d255d3SCy Schubertinclude ../src/build.rules 5c1d255d3SCy Schubert 6c1d255d3SCy Schubertifdef LIBS 7c1d255d3SCy Schubert# If LIBS is set with some global build system defaults, clone those for 8c1d255d3SCy Schubert# LIBS_c, LIBS_h, and LIBS_n to cover hostapd_cli, hlr_auc_gw, and 9c1d255d3SCy Schubert# nt_password_hash as well. 10c1d255d3SCy Schubertifndef LIBS_c 11c1d255d3SCy SchubertLIBS_c := $(LIBS) 12c1d255d3SCy Schubertendif 13c1d255d3SCy Schubertifndef LIBS_h 14c1d255d3SCy SchubertLIBS_h := $(LIBS) 15c1d255d3SCy Schubertendif 16c1d255d3SCy Schubertifndef LIBS_n 17c1d255d3SCy SchubertLIBS_n := $(LIBS) 18c1d255d3SCy Schubertendif 19c1d255d3SCy Schubertifndef LIBS_s 20c1d255d3SCy SchubertLIBS_s := $(LIBS) 21c1d255d3SCy Schubertendif 22c1d255d3SCy Schubertendif 23c1d255d3SCy Schubert 24c1d255d3SCy SchubertCFLAGS += $(EXTRA_CFLAGS) 25c1d255d3SCy SchubertCFLAGS += -I$(abspath ../src) 26c1d255d3SCy SchubertCFLAGS += -I$(abspath ../src/utils) 27c1d255d3SCy Schubert 28c1d255d3SCy Schubertexport BINDIR ?= /usr/local/bin/ 29c1d255d3SCy Schubert 30c1d255d3SCy Schubertifndef CONFIG_NO_GITVER 31c1d255d3SCy Schubert# Add VERSION_STR postfix for builds from a git repository 32c1d255d3SCy Schubertifeq ($(wildcard ../.git),../.git) 33c1d255d3SCy SchubertGITVER := $(shell git describe --dirty=+) 34c1d255d3SCy Schubertifneq ($(GITVER),) 35c1d255d3SCy SchubertCFLAGS += -DGIT_VERSION_STR_POSTFIX=\"-$(GITVER)\" 36c1d255d3SCy Schubertendif 37c1d255d3SCy Schubertendif 38c1d255d3SCy Schubertendif 39c1d255d3SCy Schubert 40c1d255d3SCy Schubertifdef CONFIG_TESTING_OPTIONS 41c1d255d3SCy SchubertCFLAGS += -DCONFIG_TESTING_OPTIONS 42c1d255d3SCy SchubertCONFIG_WPS_TESTING=y 43c1d255d3SCy Schubertendif 44c1d255d3SCy Schubert 45c1d255d3SCy Schubertifndef CONFIG_OS 46c1d255d3SCy Schubertifdef CONFIG_NATIVE_WINDOWS 47c1d255d3SCy SchubertCONFIG_OS=win32 48c1d255d3SCy Schubertelse 49c1d255d3SCy SchubertCONFIG_OS=unix 50c1d255d3SCy Schubertendif 51c1d255d3SCy Schubertendif 52c1d255d3SCy Schubert 53c1d255d3SCy Schubertifeq ($(CONFIG_OS), internal) 54c1d255d3SCy SchubertCFLAGS += -DOS_NO_C_LIB_DEFINES 55c1d255d3SCy Schubertendif 56c1d255d3SCy Schubert 57c1d255d3SCy Schubertifdef CONFIG_NATIVE_WINDOWS 58c1d255d3SCy SchubertCFLAGS += -DCONFIG_NATIVE_WINDOWS 59c1d255d3SCy SchubertLIBS += -lws2_32 60c1d255d3SCy Schubertendif 61c1d255d3SCy Schubert 62c1d255d3SCy SchubertOBJS += main.o 63c1d255d3SCy SchubertOBJS += config_file.o 64c1d255d3SCy Schubert 65c1d255d3SCy SchubertOBJS += ../src/ap/hostapd.o 66c1d255d3SCy SchubertOBJS += ../src/ap/wpa_auth_glue.o 67c1d255d3SCy SchubertOBJS += ../src/ap/drv_callbacks.o 68c1d255d3SCy SchubertOBJS += ../src/ap/ap_drv_ops.o 69c1d255d3SCy SchubertOBJS += ../src/ap/utils.o 70c1d255d3SCy SchubertOBJS += ../src/ap/authsrv.o 71c1d255d3SCy SchubertOBJS += ../src/ap/ieee802_1x.o 72c1d255d3SCy SchubertOBJS += ../src/ap/ap_config.o 73c1d255d3SCy SchubertOBJS += ../src/ap/eap_user_db.o 74c1d255d3SCy SchubertOBJS += ../src/ap/ieee802_11_auth.o 75c1d255d3SCy SchubertOBJS += ../src/ap/sta_info.o 76c1d255d3SCy SchubertOBJS += ../src/ap/wpa_auth.o 77c1d255d3SCy SchubertOBJS += ../src/ap/tkip_countermeasures.o 78c1d255d3SCy SchubertOBJS += ../src/ap/ap_mlme.o 79c1d255d3SCy SchubertOBJS += ../src/ap/wpa_auth_ie.o 80c1d255d3SCy SchubertOBJS += ../src/ap/preauth_auth.o 81c1d255d3SCy SchubertOBJS += ../src/ap/pmksa_cache_auth.o 82c1d255d3SCy SchubertOBJS += ../src/ap/ieee802_11_shared.o 83c1d255d3SCy SchubertOBJS += ../src/ap/beacon.o 84c1d255d3SCy SchubertOBJS += ../src/ap/bss_load.o 85c1d255d3SCy SchubertOBJS += ../src/ap/neighbor_db.o 86c1d255d3SCy SchubertOBJS += ../src/ap/rrm.o 87*a90b9d01SCy SchubertOBJS += ../src/common/ptksa_cache.o 88c1d255d3SCy Schubert 89c1d255d3SCy SchubertOBJS_c = hostapd_cli.o 90c1d255d3SCy SchubertOBJS_c += ../src/common/wpa_ctrl.o 91c1d255d3SCy SchubertOBJS_c += ../src/utils/os_$(CONFIG_OS).o 92c1d255d3SCy SchubertOBJS_c += ../src/common/cli.o 93c1d255d3SCy Schubert 94c1d255d3SCy SchubertNEED_RC4=y 95c1d255d3SCy SchubertNEED_AES=y 96c1d255d3SCy SchubertNEED_MD5=y 97c1d255d3SCy SchubertNEED_SHA1=y 98c1d255d3SCy Schubert 99c1d255d3SCy SchubertOBJS += ../src/drivers/drivers.o 100c1d255d3SCy SchubertCFLAGS += -DHOSTAPD 101c1d255d3SCy Schubert 102c1d255d3SCy Schubertifdef CONFIG_TAXONOMY 103c1d255d3SCy SchubertCFLAGS += -DCONFIG_TAXONOMY 104c1d255d3SCy SchubertOBJS += ../src/ap/taxonomy.o 105c1d255d3SCy Schubertendif 106c1d255d3SCy Schubert 107c1d255d3SCy Schubertifdef CONFIG_MODULE_TESTS 108c1d255d3SCy SchubertCFLAGS += -DCONFIG_MODULE_TESTS 109c1d255d3SCy SchubertOBJS += hapd_module_tests.o 110c1d255d3SCy Schubertendif 111c1d255d3SCy Schubert 112c1d255d3SCy Schubertifdef CONFIG_WPA_TRACE 113c1d255d3SCy SchubertCFLAGS += -DWPA_TRACE 114c1d255d3SCy SchubertOBJS += ../src/utils/trace.o 115c1d255d3SCy SchubertHOBJS += ../src/utils/trace.o 116c1d255d3SCy SchubertLDFLAGS += -rdynamic 117c1d255d3SCy SchubertCFLAGS += -funwind-tables 118c1d255d3SCy Schubertifdef CONFIG_WPA_TRACE_BFD 119c1d255d3SCy SchubertCFLAGS += -DPACKAGE="hostapd" -DWPA_TRACE_BFD 120c1d255d3SCy SchubertLIBS += -lbfd -ldl -liberty -lz 121c1d255d3SCy SchubertLIBS_c += -lbfd -ldl -liberty -lz 122c1d255d3SCy SchubertLIBS_h += -lbfd -ldl -liberty -lz 123c1d255d3SCy SchubertLIBS_n += -lbfd -ldl -liberty -lz 124c1d255d3SCy SchubertLIBS_s += -lbfd -ldl -liberty -lz 125c1d255d3SCy Schubertendif 126c1d255d3SCy Schubertendif 127c1d255d3SCy Schubert 128c1d255d3SCy Schubertifndef CONFIG_ELOOP 129c1d255d3SCy SchubertCONFIG_ELOOP=eloop 130c1d255d3SCy Schubertendif 131c1d255d3SCy SchubertOBJS += ../src/utils/$(CONFIG_ELOOP).o 132c1d255d3SCy SchubertOBJS_c += ../src/utils/$(CONFIG_ELOOP).o 133c1d255d3SCy Schubert 134c1d255d3SCy Schubertifeq ($(CONFIG_ELOOP), eloop) 135c1d255d3SCy Schubert# Using glibc < 2.17 requires -lrt for clock_gettime() 136c1d255d3SCy SchubertLIBS += -lrt 137c1d255d3SCy SchubertLIBS_c += -lrt 138c1d255d3SCy SchubertLIBS_h += -lrt 139c1d255d3SCy SchubertLIBS_n += -lrt 140c1d255d3SCy Schubertendif 141c1d255d3SCy Schubert 142c1d255d3SCy Schubertifdef CONFIG_ELOOP_POLL 143c1d255d3SCy SchubertCFLAGS += -DCONFIG_ELOOP_POLL 144c1d255d3SCy Schubertendif 145c1d255d3SCy Schubert 146c1d255d3SCy Schubertifdef CONFIG_ELOOP_EPOLL 147c1d255d3SCy SchubertCFLAGS += -DCONFIG_ELOOP_EPOLL 148c1d255d3SCy Schubertendif 149c1d255d3SCy Schubert 150c1d255d3SCy Schubertifdef CONFIG_ELOOP_KQUEUE 151c1d255d3SCy SchubertCFLAGS += -DCONFIG_ELOOP_KQUEUE 152c1d255d3SCy Schubertendif 153c1d255d3SCy Schubert 154c1d255d3SCy SchubertOBJS += ../src/utils/common.o 155c1d255d3SCy SchubertOBJS_c += ../src/utils/common.o 156c1d255d3SCy SchubertOBJS += ../src/utils/wpa_debug.o 157c1d255d3SCy SchubertOBJS_c += ../src/utils/wpa_debug.o 158c1d255d3SCy SchubertOBJS += ../src/utils/wpabuf.o 159c1d255d3SCy SchubertOBJS += ../src/utils/os_$(CONFIG_OS).o 160c1d255d3SCy SchubertOBJS += ../src/utils/ip_addr.o 161c1d255d3SCy SchubertOBJS += ../src/utils/crc32.o 162c1d255d3SCy Schubert 163c1d255d3SCy SchubertOBJS += ../src/common/ieee802_11_common.o 164c1d255d3SCy SchubertOBJS += ../src/common/wpa_common.o 165c1d255d3SCy SchubertOBJS += ../src/common/hw_features_common.o 166c1d255d3SCy Schubert 167c1d255d3SCy SchubertOBJS += ../src/eapol_auth/eapol_auth_sm.o 168c1d255d3SCy Schubert 169c1d255d3SCy Schubert 170c1d255d3SCy Schubertifdef CONFIG_CODE_COVERAGE 171*a90b9d01SCy SchubertCFLAGS += -O0 -fprofile-arcs -ftest-coverage -U_FORTIFY_SOURCE 172c1d255d3SCy SchubertLIBS += -lgcov 173c1d255d3SCy SchubertLIBS_c += -lgcov 174c1d255d3SCy SchubertLIBS_h += -lgcov 175c1d255d3SCy SchubertLIBS_n += -lgcov 176c1d255d3SCy Schubertendif 177c1d255d3SCy Schubert 178c1d255d3SCy Schubertifndef CONFIG_NO_DUMP_STATE 179c1d255d3SCy Schubert# define HOSTAPD_DUMP_STATE to include support for dumping internal state 180c1d255d3SCy Schubert# through control interface commands (undefine it, if you want to save in 181c1d255d3SCy Schubert# binary size) 182c1d255d3SCy SchubertCFLAGS += -DHOSTAPD_DUMP_STATE 183c1d255d3SCy SchubertOBJS += ../src/eapol_auth/eapol_auth_dump.o 184c1d255d3SCy Schubertendif 185c1d255d3SCy Schubert 186c1d255d3SCy Schubertifdef CONFIG_NO_RADIUS 187c1d255d3SCy SchubertCFLAGS += -DCONFIG_NO_RADIUS 188c1d255d3SCy SchubertCONFIG_NO_ACCOUNTING=y 189c1d255d3SCy Schubertelse 190c1d255d3SCy SchubertOBJS += ../src/radius/radius.o 191c1d255d3SCy SchubertOBJS += ../src/radius/radius_client.o 192c1d255d3SCy SchubertOBJS += ../src/radius/radius_das.o 193c1d255d3SCy Schubertendif 194c1d255d3SCy Schubert 195c1d255d3SCy Schubertifdef CONFIG_NO_ACCOUNTING 196c1d255d3SCy SchubertCFLAGS += -DCONFIG_NO_ACCOUNTING 197c1d255d3SCy Schubertelse 198c1d255d3SCy SchubertOBJS += ../src/ap/accounting.o 199c1d255d3SCy Schubertendif 200c1d255d3SCy Schubert 201c1d255d3SCy Schubertifdef CONFIG_NO_VLAN 202c1d255d3SCy SchubertCFLAGS += -DCONFIG_NO_VLAN 203c1d255d3SCy Schubertelse 204c1d255d3SCy SchubertOBJS += ../src/ap/vlan_init.o 205c1d255d3SCy SchubertOBJS += ../src/ap/vlan_ifconfig.o 206c1d255d3SCy SchubertOBJS += ../src/ap/vlan.o 207c1d255d3SCy Schubertifdef CONFIG_FULL_DYNAMIC_VLAN 208c1d255d3SCy Schubert# Define CONFIG_FULL_DYNAMIC_VLAN to have hostapd manipulate bridges 209c1d255d3SCy Schubert# and VLAN interfaces for the VLAN feature. 210c1d255d3SCy SchubertCFLAGS += -DCONFIG_FULL_DYNAMIC_VLAN 211c1d255d3SCy SchubertOBJS += ../src/ap/vlan_full.o 212c1d255d3SCy Schubertifdef CONFIG_VLAN_NETLINK 213c1d255d3SCy SchubertOBJS += ../src/ap/vlan_util.o 214c1d255d3SCy Schubertelse 215c1d255d3SCy SchubertOBJS += ../src/ap/vlan_ioctl.o 216c1d255d3SCy Schubertendif 217c1d255d3SCy Schubertendif 218c1d255d3SCy Schubertendif 219c1d255d3SCy Schubert 220c1d255d3SCy Schubertifdef CONFIG_NO_CTRL_IFACE 221c1d255d3SCy SchubertCFLAGS += -DCONFIG_NO_CTRL_IFACE 222c1d255d3SCy Schubertelse 223c1d255d3SCy Schubertifeq ($(CONFIG_CTRL_IFACE), udp) 224c1d255d3SCy SchubertCFLAGS += -DCONFIG_CTRL_IFACE_UDP 225c1d255d3SCy Schubertelse 226c1d255d3SCy Schubertifeq ($(CONFIG_CTRL_IFACE), udp6) 227c1d255d3SCy SchubertCFLAGS += -DCONFIG_CTRL_IFACE_UDP 228c1d255d3SCy SchubertCFLAGS += -DCONFIG_CTRL_IFACE_UDP_IPV6 229c1d255d3SCy Schubertelse 230c1d255d3SCy Schubertifeq ($(CONFIG_CTRL_IFACE), udp-remote) 231c1d255d3SCy SchubertCFLAGS += -DCONFIG_CTRL_IFACE_UDP 232c1d255d3SCy SchubertCFLAGS += -DCONFIG_CTRL_IFACE_UDP_REMOTE 233c1d255d3SCy Schubertelse 234c1d255d3SCy Schubertifeq ($(CONFIG_CTRL_IFACE), udp6-remote) 235c1d255d3SCy SchubertCFLAGS += -DCONFIG_CTRL_IFACE_UDP 236c1d255d3SCy SchubertCFLAGS += -DCONFIG_CTRL_IFACE_UDP_REMOTE 237c1d255d3SCy SchubertCFLAGS += -DCONFIG_CTRL_IFACE_UDP_IPV6 238c1d255d3SCy Schubertelse 239c1d255d3SCy SchubertCFLAGS += -DCONFIG_CTRL_IFACE_UNIX 240c1d255d3SCy Schubertendif 241c1d255d3SCy Schubertendif 242c1d255d3SCy Schubertendif 243c1d255d3SCy Schubertendif 244c1d255d3SCy SchubertOBJS += ../src/common/ctrl_iface_common.o 245c1d255d3SCy SchubertOBJS += ctrl_iface.o 246c1d255d3SCy SchubertOBJS += ../src/ap/ctrl_iface_ap.o 247c1d255d3SCy Schubertendif 248c1d255d3SCy Schubert 249c1d255d3SCy Schubertifndef CONFIG_NO_CTRL_IFACE 250c1d255d3SCy SchubertCFLAGS += -DCONFIG_CTRL_IFACE 251c1d255d3SCy Schubertendif 252c1d255d3SCy Schubert 253c1d255d3SCy Schubertifdef CONFIG_RSN_PREAUTH 254c1d255d3SCy SchubertCFLAGS += -DCONFIG_RSN_PREAUTH 255c1d255d3SCy SchubertCONFIG_L2_PACKET=y 256c1d255d3SCy Schubertendif 257c1d255d3SCy Schubert 258c1d255d3SCy Schubertifdef CONFIG_HS20 259c1d255d3SCy SchubertCONFIG_PROXYARP=y 260c1d255d3SCy Schubertendif 261c1d255d3SCy Schubert 262c1d255d3SCy Schubertifdef CONFIG_PROXYARP 263c1d255d3SCy SchubertCONFIG_L2_PACKET=y 264c1d255d3SCy Schubertendif 265c1d255d3SCy Schubert 266c1d255d3SCy Schubertifdef CONFIG_SUITEB 267c1d255d3SCy SchubertCFLAGS += -DCONFIG_SUITEB 268c1d255d3SCy Schubertendif 269c1d255d3SCy Schubert 270c1d255d3SCy Schubertifdef CONFIG_SUITEB192 271c1d255d3SCy SchubertCFLAGS += -DCONFIG_SUITEB192 272c1d255d3SCy SchubertNEED_SHA384=y 273c1d255d3SCy Schubertendif 274c1d255d3SCy Schubert 275c1d255d3SCy Schubertifdef CONFIG_OCV 276c1d255d3SCy SchubertCFLAGS += -DCONFIG_OCV 277c1d255d3SCy SchubertOBJS += ../src/common/ocv.o 278c1d255d3SCy Schubertendif 279c1d255d3SCy Schubert 280*a90b9d01SCy SchubertNEED_AES_UNWRAP=y 281*a90b9d01SCy Schubert 282c1d255d3SCy Schubertifdef CONFIG_IEEE80211R 283c1d255d3SCy SchubertCFLAGS += -DCONFIG_IEEE80211R -DCONFIG_IEEE80211R_AP 284c1d255d3SCy SchubertOBJS += ../src/ap/wpa_auth_ft.o 285c1d255d3SCy SchubertNEED_AES_UNWRAP=y 286c1d255d3SCy SchubertNEED_AES_SIV=y 287c1d255d3SCy SchubertNEED_ETH_P_OUI=y 288c1d255d3SCy SchubertNEED_HMAC_SHA256_KDF=y 289c1d255d3SCy Schubertendif 290c1d255d3SCy Schubert 291c1d255d3SCy Schubertifdef NEED_ETH_P_OUI 292c1d255d3SCy SchubertCFLAGS += -DCONFIG_ETH_P_OUI 293c1d255d3SCy SchubertOBJS += ../src/ap/eth_p_oui.o 294c1d255d3SCy Schubertendif 295c1d255d3SCy Schubert 296c1d255d3SCy Schubertifdef CONFIG_SAE 297c1d255d3SCy SchubertCFLAGS += -DCONFIG_SAE 298c1d255d3SCy SchubertOBJS += ../src/common/sae.o 299c1d255d3SCy Schubertifdef CONFIG_SAE_PK 300c1d255d3SCy SchubertCFLAGS += -DCONFIG_SAE_PK 301*a90b9d01SCy SchubertNEED_AES_SIV=y 302c1d255d3SCy SchubertOBJS += ../src/common/sae_pk.o 303c1d255d3SCy Schubertendif 304c1d255d3SCy SchubertNEED_ECC=y 305c1d255d3SCy SchubertNEED_DH_GROUPS=y 306c1d255d3SCy SchubertNEED_HMAC_SHA256_KDF=y 307c1d255d3SCy SchubertNEED_AP_MLME=y 308c1d255d3SCy SchubertNEED_DRAGONFLY=y 309c1d255d3SCy Schubertendif 310c1d255d3SCy Schubert 311c1d255d3SCy Schubertifdef CONFIG_OWE 312c1d255d3SCy SchubertCFLAGS += -DCONFIG_OWE 313c1d255d3SCy SchubertNEED_ECC=y 314c1d255d3SCy SchubertNEED_HMAC_SHA256_KDF=y 315c1d255d3SCy SchubertNEED_HMAC_SHA384_KDF=y 316c1d255d3SCy SchubertNEED_HMAC_SHA512_KDF=y 317c1d255d3SCy SchubertNEED_SHA384=y 318c1d255d3SCy SchubertNEED_SHA512=y 319c1d255d3SCy Schubertendif 320c1d255d3SCy Schubert 321c1d255d3SCy Schubertifdef CONFIG_AIRTIME_POLICY 322c1d255d3SCy SchubertCFLAGS += -DCONFIG_AIRTIME_POLICY 323c1d255d3SCy SchubertOBJS += ../src/ap/airtime_policy.o 324c1d255d3SCy Schubertendif 325c1d255d3SCy Schubert 326c1d255d3SCy Schubertifdef CONFIG_FILS 327c1d255d3SCy SchubertCFLAGS += -DCONFIG_FILS 328c1d255d3SCy SchubertOBJS += ../src/ap/fils_hlp.o 329c1d255d3SCy SchubertNEED_SHA384=y 330c1d255d3SCy SchubertNEED_AES_SIV=y 331c1d255d3SCy Schubertifdef CONFIG_FILS_SK_PFS 332c1d255d3SCy SchubertCFLAGS += -DCONFIG_FILS_SK_PFS 333c1d255d3SCy SchubertNEED_ECC=y 334c1d255d3SCy Schubertendif 335c1d255d3SCy Schubertendif 336c1d255d3SCy Schubert 337c1d255d3SCy Schubertifdef CONFIG_WNM 338c1d255d3SCy SchubertCFLAGS += -DCONFIG_WNM -DCONFIG_WNM_AP 339c1d255d3SCy SchubertOBJS += ../src/ap/wnm_ap.o 340c1d255d3SCy Schubertendif 341c1d255d3SCy Schubert 342c1d255d3SCy Schubertifdef CONFIG_IEEE80211AC 343c1d255d3SCy SchubertCFLAGS += -DCONFIG_IEEE80211AC 344c1d255d3SCy Schubertendif 345c1d255d3SCy Schubert 346*a90b9d01SCy Schubertifdef CONFIG_IEEE80211BE 347*a90b9d01SCy SchubertCONFIG_IEEE80211AX=y 348*a90b9d01SCy SchubertCFLAGS += -DCONFIG_IEEE80211BE 349*a90b9d01SCy SchubertOBJS += ../src/ap/ieee802_11_eht.o 350*a90b9d01SCy Schubertendif 351*a90b9d01SCy Schubert 352c1d255d3SCy Schubertifdef CONFIG_IEEE80211AX 353c1d255d3SCy SchubertCFLAGS += -DCONFIG_IEEE80211AX 354c1d255d3SCy SchubertOBJS += ../src/ap/ieee802_11_he.o 355c1d255d3SCy Schubertendif 356c1d255d3SCy Schubert 357c1d255d3SCy Schubertifdef CONFIG_MBO 358c1d255d3SCy SchubertCFLAGS += -DCONFIG_MBO 359c1d255d3SCy SchubertOBJS += ../src/ap/mbo_ap.o 360c1d255d3SCy Schubertendif 361c1d255d3SCy Schubert 362c1d255d3SCy Schubertinclude ../src/drivers/drivers.mak 363c1d255d3SCy SchubertOBJS += $(DRV_AP_OBJS) 364c1d255d3SCy SchubertCFLAGS += $(DRV_AP_CFLAGS) 365c1d255d3SCy SchubertLDFLAGS += $(DRV_AP_LDFLAGS) 366c1d255d3SCy SchubertLIBS += $(DRV_AP_LIBS) 367c1d255d3SCy Schubert 368c1d255d3SCy Schubertifdef CONFIG_L2_PACKET 369c1d255d3SCy Schubertifdef CONFIG_DNET_PCAP 370c1d255d3SCy Schubertifdef CONFIG_L2_FREEBSD 371c1d255d3SCy SchubertLIBS += -lpcap 372c1d255d3SCy SchubertOBJS += ../src/l2_packet/l2_packet_freebsd.o 373c1d255d3SCy Schubertelse 374c1d255d3SCy SchubertLIBS += -ldnet -lpcap 375c1d255d3SCy SchubertOBJS += ../src/l2_packet/l2_packet_pcap.o 376c1d255d3SCy Schubertendif 377c1d255d3SCy Schubertelse 378c1d255d3SCy SchubertOBJS += ../src/l2_packet/l2_packet_linux.o 379c1d255d3SCy Schubertendif 380c1d255d3SCy Schubertelse 381c1d255d3SCy SchubertOBJS += ../src/l2_packet/l2_packet_none.o 382c1d255d3SCy Schubertendif 383c1d255d3SCy Schubert 384c1d255d3SCy Schubert 385c1d255d3SCy Schubertifdef CONFIG_ERP 386c1d255d3SCy SchubertCFLAGS += -DCONFIG_ERP 387c1d255d3SCy SchubertNEED_HMAC_SHA256_KDF=y 388c1d255d3SCy Schubertendif 389c1d255d3SCy Schubert 390c1d255d3SCy Schubertifdef CONFIG_EAP_MD5 391c1d255d3SCy SchubertCFLAGS += -DEAP_SERVER_MD5 392c1d255d3SCy SchubertOBJS += ../src/eap_server/eap_server_md5.o 393c1d255d3SCy SchubertCHAP=y 394c1d255d3SCy Schubertendif 395c1d255d3SCy Schubert 396c1d255d3SCy Schubertifdef CONFIG_EAP_TLS 397c1d255d3SCy SchubertCFLAGS += -DEAP_SERVER_TLS 398c1d255d3SCy SchubertOBJS += ../src/eap_server/eap_server_tls.o 399c1d255d3SCy SchubertTLS_FUNCS=y 400c1d255d3SCy Schubertendif 401c1d255d3SCy Schubert 402c1d255d3SCy Schubertifdef CONFIG_EAP_UNAUTH_TLS 403c1d255d3SCy SchubertCFLAGS += -DEAP_SERVER_UNAUTH_TLS 404c1d255d3SCy Schubertifndef CONFIG_EAP_TLS 405c1d255d3SCy SchubertOBJS += ../src/eap_server/eap_server_tls.o 406c1d255d3SCy SchubertTLS_FUNCS=y 407c1d255d3SCy Schubertendif 408c1d255d3SCy Schubertendif 409c1d255d3SCy Schubert 410c1d255d3SCy Schubertifdef CONFIG_EAP_PEAP 411c1d255d3SCy SchubertCFLAGS += -DEAP_SERVER_PEAP 412c1d255d3SCy SchubertOBJS += ../src/eap_server/eap_server_peap.o 413c1d255d3SCy SchubertOBJS += ../src/eap_common/eap_peap_common.o 414c1d255d3SCy SchubertTLS_FUNCS=y 415c1d255d3SCy SchubertCONFIG_EAP_MSCHAPV2=y 416c1d255d3SCy Schubertendif 417c1d255d3SCy Schubert 418c1d255d3SCy Schubertifdef CONFIG_EAP_TTLS 419c1d255d3SCy SchubertCFLAGS += -DEAP_SERVER_TTLS 420c1d255d3SCy SchubertOBJS += ../src/eap_server/eap_server_ttls.o 421c1d255d3SCy SchubertTLS_FUNCS=y 422c1d255d3SCy SchubertCHAP=y 423c1d255d3SCy Schubertendif 424c1d255d3SCy Schubert 425c1d255d3SCy Schubertifdef CONFIG_EAP_MSCHAPV2 426c1d255d3SCy SchubertCFLAGS += -DEAP_SERVER_MSCHAPV2 427c1d255d3SCy SchubertOBJS += ../src/eap_server/eap_server_mschapv2.o 428c1d255d3SCy SchubertMS_FUNCS=y 429c1d255d3SCy Schubertendif 430c1d255d3SCy Schubert 431c1d255d3SCy Schubertifdef CONFIG_EAP_GTC 432c1d255d3SCy SchubertCFLAGS += -DEAP_SERVER_GTC 433c1d255d3SCy SchubertOBJS += ../src/eap_server/eap_server_gtc.o 434c1d255d3SCy Schubertendif 435c1d255d3SCy Schubert 436c1d255d3SCy Schubertifdef CONFIG_EAP_SIM 437c1d255d3SCy SchubertCFLAGS += -DEAP_SERVER_SIM 438c1d255d3SCy SchubertOBJS += ../src/eap_server/eap_server_sim.o 439c1d255d3SCy SchubertCONFIG_EAP_SIM_COMMON=y 440c1d255d3SCy SchubertNEED_AES_CBC=y 441c1d255d3SCy Schubertendif 442c1d255d3SCy Schubert 443c1d255d3SCy Schubertifdef CONFIG_EAP_AKA 444c1d255d3SCy SchubertCFLAGS += -DEAP_SERVER_AKA 445c1d255d3SCy SchubertOBJS += ../src/eap_server/eap_server_aka.o 446c1d255d3SCy SchubertCONFIG_EAP_SIM_COMMON=y 447c1d255d3SCy SchubertNEED_AES_CBC=y 448c1d255d3SCy Schubertendif 449c1d255d3SCy Schubert 450c1d255d3SCy Schubertifdef CONFIG_EAP_AKA_PRIME 451c1d255d3SCy SchubertCFLAGS += -DEAP_SERVER_AKA_PRIME 452c1d255d3SCy Schubertendif 453c1d255d3SCy Schubert 454c1d255d3SCy Schubertifdef CONFIG_EAP_SIM_COMMON 455c1d255d3SCy SchubertOBJS += ../src/eap_common/eap_sim_common.o 456c1d255d3SCy Schubert# Example EAP-SIM/AKA interface for GSM/UMTS authentication. This can be 457c1d255d3SCy Schubert# replaced with another file implementing the interface specified in 458c1d255d3SCy Schubert# eap_sim_db.h. 459c1d255d3SCy SchubertOBJS += ../src/eap_server/eap_sim_db.o 460c1d255d3SCy SchubertNEED_FIPS186_2_PRF=y 461c1d255d3SCy Schubertendif 462c1d255d3SCy Schubert 463c1d255d3SCy Schubertifdef CONFIG_EAP_PAX 464c1d255d3SCy SchubertCFLAGS += -DEAP_SERVER_PAX 465c1d255d3SCy SchubertOBJS += ../src/eap_server/eap_server_pax.o ../src/eap_common/eap_pax_common.o 466c1d255d3SCy Schubertendif 467c1d255d3SCy Schubert 468c1d255d3SCy Schubertifdef CONFIG_EAP_PSK 469c1d255d3SCy SchubertCFLAGS += -DEAP_SERVER_PSK 470c1d255d3SCy SchubertOBJS += ../src/eap_server/eap_server_psk.o ../src/eap_common/eap_psk_common.o 471c1d255d3SCy SchubertNEED_AES_ENCBLOCK=y 472c1d255d3SCy SchubertNEED_AES_EAX=y 473c1d255d3SCy Schubertendif 474c1d255d3SCy Schubert 475c1d255d3SCy Schubertifdef CONFIG_EAP_SAKE 476c1d255d3SCy SchubertCFLAGS += -DEAP_SERVER_SAKE 477c1d255d3SCy SchubertOBJS += ../src/eap_server/eap_server_sake.o ../src/eap_common/eap_sake_common.o 478c1d255d3SCy Schubertendif 479c1d255d3SCy Schubert 480c1d255d3SCy Schubertifdef CONFIG_EAP_GPSK 481c1d255d3SCy SchubertCFLAGS += -DEAP_SERVER_GPSK 482c1d255d3SCy SchubertOBJS += ../src/eap_server/eap_server_gpsk.o ../src/eap_common/eap_gpsk_common.o 483c1d255d3SCy Schubertifdef CONFIG_EAP_GPSK_SHA256 484c1d255d3SCy SchubertCFLAGS += -DEAP_GPSK_SHA256 485c1d255d3SCy Schubertendif 486c1d255d3SCy Schubertendif 487c1d255d3SCy Schubert 488c1d255d3SCy Schubertifdef CONFIG_EAP_PWD 489c1d255d3SCy SchubertCFLAGS += -DEAP_SERVER_PWD 490c1d255d3SCy SchubertOBJS += ../src/eap_server/eap_server_pwd.o ../src/eap_common/eap_pwd_common.o 491c1d255d3SCy SchubertNEED_ECC=y 492c1d255d3SCy SchubertNEED_DRAGONFLY=y 493c1d255d3SCy Schubertendif 494c1d255d3SCy Schubert 495c1d255d3SCy Schubertifdef CONFIG_EAP_EKE 496c1d255d3SCy SchubertCFLAGS += -DEAP_SERVER_EKE 497c1d255d3SCy SchubertOBJS += ../src/eap_server/eap_server_eke.o ../src/eap_common/eap_eke_common.o 498c1d255d3SCy SchubertNEED_DH_GROUPS=y 499c1d255d3SCy SchubertNEED_DH_GROUPS_ALL=y 500c1d255d3SCy Schubertendif 501c1d255d3SCy Schubert 502c1d255d3SCy Schubertifdef CONFIG_EAP_VENDOR_TEST 503c1d255d3SCy SchubertCFLAGS += -DEAP_SERVER_VENDOR_TEST 504c1d255d3SCy SchubertOBJS += ../src/eap_server/eap_server_vendor_test.o 505c1d255d3SCy Schubertendif 506c1d255d3SCy Schubert 507c1d255d3SCy Schubertifdef CONFIG_EAP_FAST 508c1d255d3SCy SchubertCFLAGS += -DEAP_SERVER_FAST 509c1d255d3SCy SchubertOBJS += ../src/eap_server/eap_server_fast.o 510c1d255d3SCy SchubertOBJS += ../src/eap_common/eap_fast_common.o 511c1d255d3SCy SchubertTLS_FUNCS=y 512c1d255d3SCy SchubertNEED_T_PRF=y 513c1d255d3SCy SchubertNEED_AES_UNWRAP=y 514c1d255d3SCy Schubertendif 515c1d255d3SCy Schubert 516c1d255d3SCy Schubertifdef CONFIG_EAP_TEAP 517c1d255d3SCy SchubertCFLAGS += -DEAP_SERVER_TEAP 518c1d255d3SCy SchubertOBJS += ../src/eap_server/eap_server_teap.o 519c1d255d3SCy SchubertOBJS += ../src/eap_common/eap_teap_common.o 520c1d255d3SCy SchubertTLS_FUNCS=y 521c1d255d3SCy SchubertNEED_T_PRF=y 522c1d255d3SCy SchubertNEED_SHA384=y 523c1d255d3SCy SchubertNEED_TLS_PRF_SHA256=y 524c1d255d3SCy SchubertNEED_TLS_PRF_SHA384=y 525c1d255d3SCy SchubertNEED_AES_UNWRAP=y 526c1d255d3SCy Schubertendif 527c1d255d3SCy Schubert 528c1d255d3SCy Schubertifdef CONFIG_WPS 529c1d255d3SCy SchubertCFLAGS += -DCONFIG_WPS -DEAP_SERVER_WSC 530c1d255d3SCy SchubertOBJS += ../src/utils/uuid.o 531c1d255d3SCy SchubertOBJS += ../src/ap/wps_hostapd.o 532c1d255d3SCy SchubertOBJS += ../src/eap_server/eap_server_wsc.o ../src/eap_common/eap_wsc_common.o 533c1d255d3SCy SchubertOBJS += ../src/wps/wps.o 534c1d255d3SCy SchubertOBJS += ../src/wps/wps_common.o 535c1d255d3SCy SchubertOBJS += ../src/wps/wps_attr_parse.o 536c1d255d3SCy SchubertOBJS += ../src/wps/wps_attr_build.o 537c1d255d3SCy SchubertOBJS += ../src/wps/wps_attr_process.o 538c1d255d3SCy SchubertOBJS += ../src/wps/wps_dev_attr.o 539c1d255d3SCy SchubertOBJS += ../src/wps/wps_enrollee.o 540c1d255d3SCy SchubertOBJS += ../src/wps/wps_registrar.o 541c1d255d3SCy SchubertNEED_DH_GROUPS=y 542c1d255d3SCy SchubertNEED_BASE64=y 543c1d255d3SCy SchubertNEED_AES_CBC=y 544c1d255d3SCy SchubertNEED_MODEXP=y 545c1d255d3SCy SchubertCONFIG_EAP=y 546c1d255d3SCy Schubert 547c1d255d3SCy Schubertifdef CONFIG_WPS_NFC 548c1d255d3SCy SchubertCFLAGS += -DCONFIG_WPS_NFC 549c1d255d3SCy SchubertOBJS += ../src/wps/ndef.o 550c1d255d3SCy SchubertNEED_WPS_OOB=y 551c1d255d3SCy Schubertendif 552c1d255d3SCy Schubert 553c1d255d3SCy Schubertifdef NEED_WPS_OOB 554c1d255d3SCy SchubertCFLAGS += -DCONFIG_WPS_OOB 555c1d255d3SCy Schubertendif 556c1d255d3SCy Schubert 557c1d255d3SCy Schubertifdef CONFIG_WPS_UPNP 558c1d255d3SCy SchubertCFLAGS += -DCONFIG_WPS_UPNP 559c1d255d3SCy SchubertOBJS += ../src/wps/wps_upnp.o 560c1d255d3SCy SchubertOBJS += ../src/wps/wps_upnp_ssdp.o 561c1d255d3SCy SchubertOBJS += ../src/wps/wps_upnp_web.o 562c1d255d3SCy SchubertOBJS += ../src/wps/wps_upnp_event.o 563c1d255d3SCy SchubertOBJS += ../src/wps/wps_upnp_ap.o 564c1d255d3SCy SchubertOBJS += ../src/wps/upnp_xml.o 565c1d255d3SCy SchubertOBJS += ../src/wps/httpread.o 566c1d255d3SCy SchubertOBJS += ../src/wps/http_client.o 567c1d255d3SCy SchubertOBJS += ../src/wps/http_server.o 568c1d255d3SCy Schubertendif 569c1d255d3SCy Schubert 570c1d255d3SCy Schubertifdef CONFIG_WPS_STRICT 571c1d255d3SCy SchubertCFLAGS += -DCONFIG_WPS_STRICT 572c1d255d3SCy SchubertOBJS += ../src/wps/wps_validate.o 573c1d255d3SCy Schubertendif 574c1d255d3SCy Schubert 575c1d255d3SCy Schubertifdef CONFIG_WPS_TESTING 576c1d255d3SCy SchubertCFLAGS += -DCONFIG_WPS_TESTING 577c1d255d3SCy Schubertendif 578c1d255d3SCy Schubert 579c1d255d3SCy Schubertendif 580c1d255d3SCy Schubert 581c1d255d3SCy Schubertifdef CONFIG_DPP 582c1d255d3SCy SchubertCFLAGS += -DCONFIG_DPP 583c1d255d3SCy SchubertOBJS += ../src/common/dpp.o 584c1d255d3SCy SchubertOBJS += ../src/common/dpp_auth.o 585c1d255d3SCy SchubertOBJS += ../src/common/dpp_backup.o 586c1d255d3SCy SchubertOBJS += ../src/common/dpp_crypto.o 587c1d255d3SCy SchubertOBJS += ../src/common/dpp_pkex.o 588c1d255d3SCy SchubertOBJS += ../src/common/dpp_reconfig.o 589c1d255d3SCy SchubertOBJS += ../src/common/dpp_tcp.o 590c1d255d3SCy SchubertOBJS += ../src/ap/dpp_hostapd.o 591c1d255d3SCy SchubertOBJS += ../src/ap/gas_query_ap.o 592c1d255d3SCy SchubertNEED_AES_SIV=y 593c1d255d3SCy SchubertNEED_HMAC_SHA256_KDF=y 594c1d255d3SCy SchubertNEED_HMAC_SHA384_KDF=y 595c1d255d3SCy SchubertNEED_HMAC_SHA512_KDF=y 596c1d255d3SCy SchubertNEED_SHA384=y 597c1d255d3SCy SchubertNEED_SHA512=y 598c1d255d3SCy SchubertNEED_ECC=y 599c1d255d3SCy SchubertNEED_JSON=y 600c1d255d3SCy SchubertNEED_GAS=y 601c1d255d3SCy SchubertNEED_BASE64=y 602c1d255d3SCy SchubertNEED_ASN1=y 603c1d255d3SCy Schubertifdef CONFIG_DPP2 604c1d255d3SCy SchubertCFLAGS += -DCONFIG_DPP2 605c1d255d3SCy Schubertendif 60632a95656SCy Schubertifdef CONFIG_DPP3 60732a95656SCy SchubertCFLAGS += -DCONFIG_DPP3 60832a95656SCy Schubertendif 609c1d255d3SCy Schubertendif 610c1d255d3SCy Schubert 611*a90b9d01SCy Schubertifdef CONFIG_NAN_USD 612*a90b9d01SCy SchubertOBJS += ../src/common/nan_de.o 613*a90b9d01SCy SchubertOBJS += ../src/ap/nan_usd_ap.o 614*a90b9d01SCy SchubertCFLAGS += -DCONFIG_NAN_USD 615*a90b9d01SCy Schubertendif 616*a90b9d01SCy Schubert 617c1d255d3SCy Schubertifdef CONFIG_PASN 618c1d255d3SCy SchubertCFLAGS += -DCONFIG_PASN 619c1d255d3SCy SchubertCFLAGS += -DCONFIG_PTKSA_CACHE 620c1d255d3SCy SchubertNEED_HMAC_SHA256_KDF=y 621c1d255d3SCy SchubertNEED_HMAC_SHA384_KDF=y 622c1d255d3SCy SchubertNEED_SHA256=y 623c1d255d3SCy SchubertNEED_SHA384=y 624c1d255d3SCy Schubertendif 625c1d255d3SCy Schubert 626c1d255d3SCy Schubertifdef CONFIG_EAP_IKEV2 627c1d255d3SCy SchubertCFLAGS += -DEAP_SERVER_IKEV2 628c1d255d3SCy SchubertOBJS += ../src/eap_server/eap_server_ikev2.o ../src/eap_server/ikev2.o 629c1d255d3SCy SchubertOBJS += ../src/eap_common/eap_ikev2_common.o ../src/eap_common/ikev2_common.o 630c1d255d3SCy SchubertNEED_DH_GROUPS=y 631c1d255d3SCy SchubertNEED_DH_GROUPS_ALL=y 632c1d255d3SCy SchubertNEED_MODEXP=y 633c1d255d3SCy SchubertNEED_CIPHER=y 634c1d255d3SCy Schubertendif 635c1d255d3SCy Schubert 636c1d255d3SCy Schubertifdef CONFIG_EAP_TNC 637c1d255d3SCy SchubertCFLAGS += -DEAP_SERVER_TNC 638c1d255d3SCy SchubertOBJS += ../src/eap_server/eap_server_tnc.o 639c1d255d3SCy SchubertOBJS += ../src/eap_server/tncs.o 640c1d255d3SCy SchubertNEED_BASE64=y 641c1d255d3SCy Schubertifndef CONFIG_DRIVER_BSD 642c1d255d3SCy SchubertLIBS += -ldl 643c1d255d3SCy Schubertendif 644c1d255d3SCy Schubertendif 645c1d255d3SCy Schubert 646c1d255d3SCy Schubertifdef CONFIG_MACSEC 647c1d255d3SCy SchubertCFLAGS += -DCONFIG_MACSEC 648c1d255d3SCy SchubertOBJS += ../src/ap/wpa_auth_kay.o 649c1d255d3SCy SchubertOBJS += ../src/pae/ieee802_1x_cp.o 650c1d255d3SCy SchubertOBJS += ../src/pae/ieee802_1x_kay.o 651c1d255d3SCy SchubertOBJS += ../src/pae/ieee802_1x_key.o 652c1d255d3SCy SchubertOBJS += ../src/pae/ieee802_1x_secy_ops.o 653c1d255d3SCy Schubertendif 654c1d255d3SCy Schubert 655c1d255d3SCy Schubert# Basic EAP functionality is needed for EAPOL 656c1d255d3SCy SchubertOBJS += eap_register.o 657c1d255d3SCy SchubertOBJS += ../src/eap_server/eap_server.o 658c1d255d3SCy SchubertOBJS += ../src/eap_common/eap_common.o 659c1d255d3SCy SchubertOBJS += ../src/eap_server/eap_server_methods.o 660c1d255d3SCy SchubertOBJS += ../src/eap_server/eap_server_identity.o 661c1d255d3SCy SchubertCFLAGS += -DEAP_SERVER_IDENTITY 662c1d255d3SCy Schubert 663c1d255d3SCy Schubertifdef CONFIG_EAP 664c1d255d3SCy SchubertCFLAGS += -DEAP_SERVER 665c1d255d3SCy Schubertendif 666c1d255d3SCy Schubert 667c1d255d3SCy Schubertifdef CONFIG_PKCS12 668c1d255d3SCy SchubertCFLAGS += -DPKCS12_FUNCS 669c1d255d3SCy Schubertendif 670c1d255d3SCy Schubert 671c1d255d3SCy Schubertifdef NEED_DRAGONFLY 672c1d255d3SCy SchubertOBJS += ../src/common/dragonfly.o 673c1d255d3SCy Schubertendif 674c1d255d3SCy Schubert 675c1d255d3SCy Schubertifdef MS_FUNCS 676c1d255d3SCy SchubertOBJS += ../src/crypto/ms_funcs.o 677c1d255d3SCy SchubertNEED_DES=y 678c1d255d3SCy SchubertNEED_MD4=y 679c1d255d3SCy Schubertendif 680c1d255d3SCy Schubert 681c1d255d3SCy Schubertifdef CHAP 682c1d255d3SCy SchubertOBJS += ../src/eap_common/chap.o 683c1d255d3SCy Schubertendif 684c1d255d3SCy Schubert 685*a90b9d01SCy Schubertifdef CONFIG_RADIUS_TLS 686*a90b9d01SCy SchubertTLS_FUNCS=y 687*a90b9d01SCy SchubertCFLAGS += -DCONFIG_RADIUS_TLS 688*a90b9d01SCy Schubertendif 689*a90b9d01SCy Schubert 690c1d255d3SCy Schubertifdef TLS_FUNCS 691c1d255d3SCy SchubertNEED_DES=y 692c1d255d3SCy Schubert# Shared TLS functions (needed for EAP_TLS, EAP_PEAP, and EAP_TTLS) 693c1d255d3SCy SchubertCFLAGS += -DEAP_TLS_FUNCS 694c1d255d3SCy SchubertOBJS += ../src/eap_server/eap_server_tls_common.o 695c1d255d3SCy SchubertNEED_TLS_PRF=y 696c1d255d3SCy Schubertendif 697c1d255d3SCy Schubert 698c1d255d3SCy Schubertifndef CONFIG_TLS 699c1d255d3SCy SchubertCONFIG_TLS=openssl 700c1d255d3SCy Schubertendif 701c1d255d3SCy Schubert 702c1d255d3SCy Schubertifdef CONFIG_TLSV11 703c1d255d3SCy SchubertCFLAGS += -DCONFIG_TLSV11 704c1d255d3SCy Schubertendif 705c1d255d3SCy Schubert 706c1d255d3SCy Schubertifdef CONFIG_TLSV12 707c1d255d3SCy SchubertCFLAGS += -DCONFIG_TLSV12 708c1d255d3SCy Schubertendif 709c1d255d3SCy Schubert 710c1d255d3SCy Schubertifeq ($(CONFIG_TLS), wolfssl) 711c1d255d3SCy SchubertCONFIG_CRYPTO=wolfssl 712c1d255d3SCy Schubertifdef TLS_FUNCS 713c1d255d3SCy SchubertOBJS += ../src/crypto/tls_wolfssl.o 714c1d255d3SCy SchubertLIBS += -lwolfssl -lm 715c1d255d3SCy Schubertendif 716c1d255d3SCy SchubertOBJS += ../src/crypto/crypto_wolfssl.o 717c1d255d3SCy SchubertHOBJS += ../src/crypto/crypto_wolfssl.o 718c1d255d3SCy Schubertifdef NEED_FIPS186_2_PRF 719c1d255d3SCy SchubertOBJS += ../src/crypto/fips_prf_wolfssl.o 720c1d255d3SCy Schubertendif 721c1d255d3SCy SchubertNEED_TLS_PRF_SHA256=y 722c1d255d3SCy SchubertLIBS += -lwolfssl -lm 723c1d255d3SCy SchubertLIBS_h += -lwolfssl -lm 724c1d255d3SCy Schubertifdef CONFIG_TLS_ADD_DL 725c1d255d3SCy SchubertLIBS += -ldl 726c1d255d3SCy SchubertLIBS_h += -ldl 727c1d255d3SCy Schubertendif 728c1d255d3SCy Schubertendif 729c1d255d3SCy Schubert 730c1d255d3SCy Schubertifeq ($(CONFIG_TLS), openssl) 731*a90b9d01SCy SchubertCFLAGS += -DCRYPTO_RSA_OAEP_SHA256 732c1d255d3SCy SchubertCONFIG_CRYPTO=openssl 733c1d255d3SCy Schubertifdef TLS_FUNCS 734c1d255d3SCy SchubertOBJS += ../src/crypto/tls_openssl.o 735c1d255d3SCy SchubertOBJS += ../src/crypto/tls_openssl_ocsp.o 736c1d255d3SCy SchubertLIBS += -lssl 737c1d255d3SCy Schubertendif 738c1d255d3SCy SchubertOBJS += ../src/crypto/crypto_openssl.o 739c1d255d3SCy SchubertHOBJS += ../src/crypto/crypto_openssl.o 740c1d255d3SCy SchubertSOBJS += ../src/crypto/crypto_openssl.o 741c1d255d3SCy Schubertifdef NEED_FIPS186_2_PRF 742c1d255d3SCy SchubertOBJS += ../src/crypto/fips_prf_openssl.o 743c1d255d3SCy Schubertendif 744c1d255d3SCy SchubertNEED_TLS_PRF_SHA256=y 745c1d255d3SCy SchubertLIBS += -lcrypto 746c1d255d3SCy SchubertLIBS_h += -lcrypto 747c1d255d3SCy SchubertLIBS_n += -lcrypto 748c1d255d3SCy SchubertLIBS_s += -lcrypto 749c1d255d3SCy Schubertifdef CONFIG_TLS_ADD_DL 750c1d255d3SCy SchubertLIBS += -ldl 751c1d255d3SCy SchubertLIBS_h += -ldl 752c1d255d3SCy SchubertLIBS_s += -ldl 753c1d255d3SCy Schubertendif 754c1d255d3SCy Schubertifndef CONFIG_TLS_DEFAULT_CIPHERS 755c1d255d3SCy SchubertCONFIG_TLS_DEFAULT_CIPHERS = "DEFAULT:!EXP:!LOW" 756c1d255d3SCy Schubertendif 757c1d255d3SCy SchubertCFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONFIG_TLS_DEFAULT_CIPHERS)\" 758c1d255d3SCy Schubertendif 759c1d255d3SCy Schubert 760c1d255d3SCy Schubertifeq ($(CONFIG_TLS), gnutls) 761c1d255d3SCy Schubertifndef CONFIG_CRYPTO 762c1d255d3SCy Schubert# default to libgcrypt 763c1d255d3SCy SchubertCONFIG_CRYPTO=gnutls 764c1d255d3SCy Schubertendif 765c1d255d3SCy Schubertifdef TLS_FUNCS 766c1d255d3SCy SchubertOBJS += ../src/crypto/tls_gnutls.o 767c1d255d3SCy SchubertLIBS += -lgnutls -lgpg-error 768c1d255d3SCy Schubertendif 769c1d255d3SCy SchubertOBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o 770c1d255d3SCy SchubertHOBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o 771c1d255d3SCy Schubertifdef NEED_FIPS186_2_PRF 772c1d255d3SCy SchubertOBJS += ../src/crypto/fips_prf_internal.o 773c1d255d3SCy SchubertSHA1OBJS += ../src/crypto/sha1-internal.o 774c1d255d3SCy Schubertendif 775c1d255d3SCy Schubertifeq ($(CONFIG_CRYPTO), gnutls) 776c1d255d3SCy SchubertLIBS += -lgcrypt 777c1d255d3SCy SchubertLIBS_h += -lgcrypt 778c1d255d3SCy SchubertLIBS_n += -lgcrypt 779c1d255d3SCy SchubertCONFIG_INTERNAL_RC4=y 780c1d255d3SCy SchubertCONFIG_INTERNAL_DH_GROUP5=y 781c1d255d3SCy Schubertendif 782c1d255d3SCy Schubertifeq ($(CONFIG_CRYPTO), nettle) 783c1d255d3SCy SchubertLIBS += -lnettle -lgmp 784c1d255d3SCy SchubertLIBS_p += -lnettle -lgmp 785c1d255d3SCy SchubertCONFIG_INTERNAL_RC4=y 786c1d255d3SCy SchubertCONFIG_INTERNAL_DH_GROUP5=y 787c1d255d3SCy Schubertendif 788c1d255d3SCy Schubertendif 789c1d255d3SCy Schubert 790c1d255d3SCy Schubertifeq ($(CONFIG_TLS), internal) 791c1d255d3SCy Schubertifndef CONFIG_CRYPTO 792c1d255d3SCy SchubertCONFIG_CRYPTO=internal 793c1d255d3SCy Schubertendif 794c1d255d3SCy Schubertifdef TLS_FUNCS 795c1d255d3SCy SchubertOBJS += ../src/crypto/crypto_internal-rsa.o 796c1d255d3SCy SchubertOBJS += ../src/crypto/tls_internal.o 797c1d255d3SCy SchubertOBJS += ../src/tls/tlsv1_common.o 798c1d255d3SCy SchubertOBJS += ../src/tls/tlsv1_record.o 799c1d255d3SCy SchubertOBJS += ../src/tls/tlsv1_cred.o 800c1d255d3SCy SchubertOBJS += ../src/tls/tlsv1_server.o 801c1d255d3SCy SchubertOBJS += ../src/tls/tlsv1_server_write.o 802c1d255d3SCy SchubertOBJS += ../src/tls/tlsv1_server_read.o 803c1d255d3SCy SchubertOBJS += ../src/tls/rsa.o 804c1d255d3SCy SchubertOBJS += ../src/tls/x509v3.o 805c1d255d3SCy SchubertOBJS += ../src/tls/pkcs1.o 806c1d255d3SCy SchubertOBJS += ../src/tls/pkcs5.o 807c1d255d3SCy SchubertOBJS += ../src/tls/pkcs8.o 808c1d255d3SCy SchubertNEED_ASN1=y 809c1d255d3SCy SchubertNEED_BASE64=y 810c1d255d3SCy SchubertNEED_TLS_PRF=y 811c1d255d3SCy Schubertifdef CONFIG_TLSV12 812c1d255d3SCy SchubertNEED_TLS_PRF_SHA256=y 813c1d255d3SCy Schubertendif 814c1d255d3SCy SchubertNEED_MODEXP=y 815c1d255d3SCy SchubertNEED_CIPHER=y 816c1d255d3SCy SchubertCFLAGS += -DCONFIG_TLS_INTERNAL 817c1d255d3SCy SchubertCFLAGS += -DCONFIG_TLS_INTERNAL_SERVER 818c1d255d3SCy Schubertendif 819c1d255d3SCy Schubertifdef NEED_CIPHER 820c1d255d3SCy SchubertNEED_DES=y 821c1d255d3SCy SchubertOBJS += ../src/crypto/crypto_internal-cipher.o 822c1d255d3SCy Schubertendif 823c1d255d3SCy Schubertifdef NEED_MODEXP 824c1d255d3SCy SchubertOBJS += ../src/crypto/crypto_internal-modexp.o 825c1d255d3SCy SchubertOBJS += ../src/tls/bignum.o 826c1d255d3SCy Schubertendif 827c1d255d3SCy Schubertifeq ($(CONFIG_CRYPTO), libtomcrypt) 828c1d255d3SCy SchubertOBJS += ../src/crypto/crypto_libtomcrypt.o 829c1d255d3SCy SchubertLIBS += -ltomcrypt -ltfm 830c1d255d3SCy SchubertLIBS_h += -ltomcrypt -ltfm 831c1d255d3SCy SchubertCONFIG_INTERNAL_SHA256=y 832c1d255d3SCy SchubertCONFIG_INTERNAL_RC4=y 833c1d255d3SCy SchubertCONFIG_INTERNAL_DH_GROUP5=y 834c1d255d3SCy Schubertendif 835c1d255d3SCy Schubertifeq ($(CONFIG_CRYPTO), internal) 836c1d255d3SCy SchubertOBJS += ../src/crypto/crypto_internal.o 837c1d255d3SCy SchubertNEED_AES_DEC=y 838c1d255d3SCy SchubertCFLAGS += -DCONFIG_CRYPTO_INTERNAL 839c1d255d3SCy Schubertifdef CONFIG_INTERNAL_LIBTOMMATH 840c1d255d3SCy SchubertCFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH 841c1d255d3SCy Schubertifdef CONFIG_INTERNAL_LIBTOMMATH_FAST 842c1d255d3SCy SchubertCFLAGS += -DLTM_FAST 843c1d255d3SCy Schubertendif 844c1d255d3SCy Schubertelse 845c1d255d3SCy SchubertLIBS += -ltommath 846c1d255d3SCy SchubertLIBS_h += -ltommath 847c1d255d3SCy Schubertendif 848c1d255d3SCy SchubertCONFIG_INTERNAL_AES=y 849c1d255d3SCy SchubertCONFIG_INTERNAL_DES=y 850c1d255d3SCy SchubertCONFIG_INTERNAL_SHA1=y 851c1d255d3SCy SchubertCONFIG_INTERNAL_MD4=y 852c1d255d3SCy SchubertCONFIG_INTERNAL_MD5=y 853c1d255d3SCy SchubertCONFIG_INTERNAL_SHA256=y 854c1d255d3SCy SchubertCONFIG_INTERNAL_SHA384=y 855c1d255d3SCy SchubertCONFIG_INTERNAL_SHA512=y 856c1d255d3SCy SchubertCONFIG_INTERNAL_RC4=y 857c1d255d3SCy SchubertCONFIG_INTERNAL_DH_GROUP5=y 858c1d255d3SCy Schubertendif 859c1d255d3SCy Schubertifeq ($(CONFIG_CRYPTO), cryptoapi) 860c1d255d3SCy SchubertOBJS += ../src/crypto/crypto_cryptoapi.o 861c1d255d3SCy SchubertOBJS_p += ../src/crypto/crypto_cryptoapi.o 862c1d255d3SCy SchubertCFLAGS += -DCONFIG_CRYPTO_CRYPTOAPI 863c1d255d3SCy SchubertCONFIG_INTERNAL_SHA256=y 864c1d255d3SCy SchubertCONFIG_INTERNAL_RC4=y 865c1d255d3SCy Schubertendif 866c1d255d3SCy Schubertendif 867c1d255d3SCy Schubert 868c1d255d3SCy Schubertifeq ($(CONFIG_TLS), linux) 869c1d255d3SCy SchubertOBJS += ../src/crypto/crypto_linux.o 870c1d255d3SCy Schubertifdef TLS_FUNCS 871c1d255d3SCy SchubertOBJS += ../src/crypto/crypto_internal-rsa.o 872c1d255d3SCy SchubertOBJS += ../src/crypto/tls_internal.o 873c1d255d3SCy SchubertOBJS += ../src/tls/tlsv1_common.o 874c1d255d3SCy SchubertOBJS += ../src/tls/tlsv1_record.o 875c1d255d3SCy SchubertOBJS += ../src/tls/tlsv1_cred.o 876c1d255d3SCy SchubertOBJS += ../src/tls/tlsv1_server.o 877c1d255d3SCy SchubertOBJS += ../src/tls/tlsv1_server_write.o 878c1d255d3SCy SchubertOBJS += ../src/tls/tlsv1_server_read.o 879c1d255d3SCy SchubertOBJS += ../src/tls/rsa.o 880c1d255d3SCy SchubertOBJS += ../src/tls/x509v3.o 881c1d255d3SCy SchubertOBJS += ../src/tls/pkcs1.o 882c1d255d3SCy SchubertOBJS += ../src/tls/pkcs5.o 883c1d255d3SCy SchubertOBJS += ../src/tls/pkcs8.o 884c1d255d3SCy SchubertNEED_ASN1=y 885c1d255d3SCy SchubertNEED_BASE64=y 886c1d255d3SCy SchubertNEED_TLS_PRF=y 887c1d255d3SCy Schubertifdef CONFIG_TLSV12 888c1d255d3SCy SchubertNEED_TLS_PRF_SHA256=y 889c1d255d3SCy Schubertendif 890c1d255d3SCy SchubertNEED_MODEXP=y 891c1d255d3SCy SchubertNEED_CIPHER=y 892c1d255d3SCy SchubertCFLAGS += -DCONFIG_TLS_INTERNAL 893c1d255d3SCy SchubertCFLAGS += -DCONFIG_TLS_INTERNAL_SERVER 894c1d255d3SCy Schubertendif 895c1d255d3SCy Schubertifdef NEED_MODEXP 896c1d255d3SCy SchubertOBJS += ../src/crypto/crypto_internal-modexp.o 897c1d255d3SCy SchubertOBJS += ../src/tls/bignum.o 898c1d255d3SCy SchubertCFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH 899c1d255d3SCy SchubertCFLAGS += -DLTM_FAST 900c1d255d3SCy Schubertendif 901c1d255d3SCy SchubertCONFIG_INTERNAL_DH_GROUP5=y 902c1d255d3SCy Schubertifdef NEED_FIPS186_2_PRF 903c1d255d3SCy SchubertOBJS += ../src/crypto/fips_prf_internal.o 904c1d255d3SCy SchubertOBJS += ../src/crypto/sha1-internal.o 905c1d255d3SCy Schubertendif 906c1d255d3SCy Schubertendif 907c1d255d3SCy Schubert 908c1d255d3SCy Schubertifeq ($(CONFIG_TLS), none) 909c1d255d3SCy Schubertifdef TLS_FUNCS 910c1d255d3SCy SchubertOBJS += ../src/crypto/tls_none.o 911c1d255d3SCy SchubertCFLAGS += -DEAP_TLS_NONE 912c1d255d3SCy SchubertCONFIG_INTERNAL_AES=y 913c1d255d3SCy SchubertCONFIG_INTERNAL_SHA1=y 914c1d255d3SCy SchubertCONFIG_INTERNAL_MD5=y 915c1d255d3SCy Schubertendif 916c1d255d3SCy SchubertOBJS += ../src/crypto/crypto_none.o 917c1d255d3SCy SchubertOBJS_p += ../src/crypto/crypto_none.o 918c1d255d3SCy SchubertCONFIG_INTERNAL_SHA256=y 919c1d255d3SCy SchubertCONFIG_INTERNAL_RC4=y 920c1d255d3SCy Schubertendif 921c1d255d3SCy Schubert 922c1d255d3SCy Schubertifndef TLS_FUNCS 923c1d255d3SCy SchubertOBJS += ../src/crypto/tls_none.o 924c1d255d3SCy Schubertifeq ($(CONFIG_TLS), internal) 925c1d255d3SCy SchubertCONFIG_INTERNAL_AES=y 926c1d255d3SCy SchubertCONFIG_INTERNAL_SHA1=y 927c1d255d3SCy SchubertCONFIG_INTERNAL_MD5=y 928c1d255d3SCy SchubertCONFIG_INTERNAL_RC4=y 929c1d255d3SCy Schubertendif 930c1d255d3SCy Schubertendif 931c1d255d3SCy Schubert 932c1d255d3SCy SchubertAESOBJS = # none so far 933c1d255d3SCy Schubertifdef CONFIG_INTERNAL_AES 934c1d255d3SCy SchubertAESOBJS += ../src/crypto/aes-internal.o ../src/crypto/aes-internal-enc.o 935c1d255d3SCy Schubertendif 936c1d255d3SCy Schubert 937c1d255d3SCy Schubertifneq ($(CONFIG_TLS), openssl) 938c1d255d3SCy Schubertifneq ($(CONFIG_TLS), wolfssl) 939c1d255d3SCy SchubertAESOBJS += ../src/crypto/aes-wrap.o 940c1d255d3SCy Schubertendif 941c1d255d3SCy Schubertendif 942c1d255d3SCy Schubertifdef NEED_AES_EAX 943c1d255d3SCy SchubertAESOBJS += ../src/crypto/aes-eax.o 944c1d255d3SCy SchubertNEED_AES_CTR=y 945c1d255d3SCy Schubertendif 946c1d255d3SCy Schubertifdef NEED_AES_SIV 947c1d255d3SCy SchubertAESOBJS += ../src/crypto/aes-siv.o 948c1d255d3SCy SchubertNEED_AES_CTR=y 949c1d255d3SCy Schubertendif 950c1d255d3SCy Schubertifdef NEED_AES_CTR 951c1d255d3SCy SchubertAESOBJS += ../src/crypto/aes-ctr.o 952c1d255d3SCy Schubertendif 953c1d255d3SCy Schubertifdef NEED_AES_ENCBLOCK 954c1d255d3SCy SchubertAESOBJS += ../src/crypto/aes-encblock.o 955c1d255d3SCy Schubertendif 956*a90b9d01SCy Schubertifneq ($(CONFIG_TLS), openssl) 957c1d255d3SCy Schubertifneq ($(CONFIG_TLS), linux) 958c1d255d3SCy Schubertifneq ($(CONFIG_TLS), wolfssl) 959c1d255d3SCy SchubertAESOBJS += ../src/crypto/aes-omac1.o 960c1d255d3SCy Schubertendif 961c1d255d3SCy Schubertendif 962*a90b9d01SCy Schubertendif 963c1d255d3SCy Schubertifdef NEED_AES_UNWRAP 964c1d255d3SCy Schubertifneq ($(CONFIG_TLS), openssl) 965c1d255d3SCy Schubertifneq ($(CONFIG_TLS), linux) 966c1d255d3SCy Schubertifneq ($(CONFIG_TLS), wolfssl) 967c1d255d3SCy SchubertNEED_AES_DEC=y 968c1d255d3SCy SchubertAESOBJS += ../src/crypto/aes-unwrap.o 969c1d255d3SCy Schubertendif 970c1d255d3SCy Schubertendif 971c1d255d3SCy Schubertendif 972c1d255d3SCy Schubertendif 973c1d255d3SCy Schubertifdef NEED_AES_CBC 974c1d255d3SCy SchubertNEED_AES_DEC=y 975c1d255d3SCy Schubertifneq ($(CONFIG_TLS), openssl) 976c1d255d3SCy Schubertifneq ($(CONFIG_TLS), linux) 977c1d255d3SCy Schubertifneq ($(CONFIG_TLS), wolfssl) 978c1d255d3SCy SchubertAESOBJS += ../src/crypto/aes-cbc.o 979c1d255d3SCy Schubertendif 980c1d255d3SCy Schubertendif 981c1d255d3SCy Schubertendif 982c1d255d3SCy Schubertendif 983c1d255d3SCy Schubertifdef NEED_AES_DEC 984c1d255d3SCy Schubertifdef CONFIG_INTERNAL_AES 985c1d255d3SCy SchubertAESOBJS += ../src/crypto/aes-internal-dec.o 986c1d255d3SCy Schubertendif 987c1d255d3SCy Schubertendif 988c1d255d3SCy Schubertifdef NEED_AES 989c1d255d3SCy SchubertOBJS += $(AESOBJS) 990c1d255d3SCy Schubertendif 991c1d255d3SCy Schubert 992c1d255d3SCy Schubertifdef NEED_SHA1 993c1d255d3SCy Schubertifneq ($(CONFIG_TLS), openssl) 994c1d255d3SCy Schubertifneq ($(CONFIG_TLS), linux) 995c1d255d3SCy Schubertifneq ($(CONFIG_TLS), gnutls) 996c1d255d3SCy Schubertifneq ($(CONFIG_TLS), wolfssl) 997c1d255d3SCy SchubertSHA1OBJS += ../src/crypto/sha1.o 998c1d255d3SCy Schubertendif 999c1d255d3SCy Schubertendif 1000c1d255d3SCy Schubertendif 1001c1d255d3SCy Schubertendif 1002c1d255d3SCy SchubertSHA1OBJS += ../src/crypto/sha1-prf.o 1003c1d255d3SCy Schubertifdef CONFIG_INTERNAL_SHA1 1004c1d255d3SCy SchubertSHA1OBJS += ../src/crypto/sha1-internal.o 1005c1d255d3SCy Schubertifdef NEED_FIPS186_2_PRF 1006c1d255d3SCy SchubertSHA1OBJS += ../src/crypto/fips_prf_internal.o 1007c1d255d3SCy Schubertendif 1008c1d255d3SCy Schubertendif 1009c1d255d3SCy Schubertifneq ($(CONFIG_TLS), openssl) 1010c1d255d3SCy Schubertifneq ($(CONFIG_TLS), wolfssl) 1011c1d255d3SCy SchubertSHA1OBJS += ../src/crypto/sha1-pbkdf2.o 1012c1d255d3SCy Schubertendif 1013c1d255d3SCy Schubertendif 1014c1d255d3SCy Schubertifdef NEED_T_PRF 1015c1d255d3SCy SchubertSHA1OBJS += ../src/crypto/sha1-tprf.o 1016c1d255d3SCy Schubertendif 1017c1d255d3SCy Schubertifdef NEED_TLS_PRF 1018c1d255d3SCy SchubertSHA1OBJS += ../src/crypto/sha1-tlsprf.o 1019c1d255d3SCy Schubertendif 1020c1d255d3SCy Schubertendif 1021c1d255d3SCy Schubert 1022c1d255d3SCy Schubertifdef NEED_SHA1 1023c1d255d3SCy SchubertOBJS += $(SHA1OBJS) 1024c1d255d3SCy Schubertendif 1025c1d255d3SCy Schubert 1026c1d255d3SCy Schubertifneq ($(CONFIG_TLS), openssl) 1027c1d255d3SCy Schubertifneq ($(CONFIG_TLS), linux) 1028c1d255d3SCy Schubertifneq ($(CONFIG_TLS), gnutls) 1029c1d255d3SCy Schubertifneq ($(CONFIG_TLS), wolfssl) 1030c1d255d3SCy SchubertOBJS += ../src/crypto/md5.o 1031c1d255d3SCy Schubertendif 1032c1d255d3SCy Schubertendif 1033c1d255d3SCy Schubertendif 1034c1d255d3SCy Schubertendif 1035c1d255d3SCy Schubert 1036c1d255d3SCy Schubertifdef NEED_MD5 1037c1d255d3SCy Schubertifdef CONFIG_INTERNAL_MD5 1038c1d255d3SCy SchubertOBJS += ../src/crypto/md5-internal.o 1039c1d255d3SCy SchubertHOBJS += ../src/crypto/md5-internal.o 1040c1d255d3SCy Schubertendif 1041c1d255d3SCy Schubertendif 1042c1d255d3SCy Schubert 1043c1d255d3SCy Schubertifdef NEED_MD4 1044c1d255d3SCy Schubertifdef CONFIG_INTERNAL_MD4 1045c1d255d3SCy SchubertOBJS += ../src/crypto/md4-internal.o 1046c1d255d3SCy Schubertendif 1047c1d255d3SCy Schubertendif 1048c1d255d3SCy Schubert 1049c1d255d3SCy Schubertifdef NEED_DES 1050c1d255d3SCy SchubertCFLAGS += -DCONFIG_DES 1051c1d255d3SCy Schubertifdef CONFIG_INTERNAL_DES 1052c1d255d3SCy SchubertOBJS += ../src/crypto/des-internal.o 1053c1d255d3SCy Schubertendif 1054c1d255d3SCy Schubertendif 1055c1d255d3SCy Schubert 1056c1d255d3SCy Schubertifdef CONFIG_NO_RC4 1057c1d255d3SCy SchubertCFLAGS += -DCONFIG_NO_RC4 1058c1d255d3SCy Schubertendif 1059c1d255d3SCy Schubert 1060c1d255d3SCy Schubertifdef NEED_RC4 1061c1d255d3SCy Schubertifdef CONFIG_INTERNAL_RC4 1062c1d255d3SCy Schubertifndef CONFIG_NO_RC4 1063c1d255d3SCy SchubertOBJS += ../src/crypto/rc4.o 1064c1d255d3SCy Schubertendif 1065c1d255d3SCy Schubertendif 1066c1d255d3SCy Schubertendif 1067c1d255d3SCy Schubert 1068c1d255d3SCy SchubertCFLAGS += -DCONFIG_SHA256 1069c1d255d3SCy Schubertifneq ($(CONFIG_TLS), openssl) 1070c1d255d3SCy Schubertifneq ($(CONFIG_TLS), linux) 1071c1d255d3SCy Schubertifneq ($(CONFIG_TLS), gnutls) 1072c1d255d3SCy Schubertifneq ($(CONFIG_TLS), wolfssl) 1073c1d255d3SCy SchubertOBJS += ../src/crypto/sha256.o 1074c1d255d3SCy Schubertendif 1075c1d255d3SCy Schubertendif 1076c1d255d3SCy Schubertendif 1077c1d255d3SCy Schubertendif 1078c1d255d3SCy SchubertOBJS += ../src/crypto/sha256-prf.o 1079c1d255d3SCy Schubertifdef CONFIG_INTERNAL_SHA256 1080c1d255d3SCy SchubertOBJS += ../src/crypto/sha256-internal.o 1081c1d255d3SCy Schubertendif 1082c1d255d3SCy Schubertifdef NEED_TLS_PRF_SHA256 1083c1d255d3SCy SchubertOBJS += ../src/crypto/sha256-tlsprf.o 1084c1d255d3SCy Schubertendif 1085c1d255d3SCy Schubertifdef NEED_TLS_PRF_SHA384 1086c1d255d3SCy SchubertOBJS += ../src/crypto/sha384-tlsprf.o 1087c1d255d3SCy Schubertendif 1088c1d255d3SCy Schubertifdef NEED_HMAC_SHA256_KDF 1089c1d255d3SCy SchubertOBJS += ../src/crypto/sha256-kdf.o 1090c1d255d3SCy Schubertendif 1091c1d255d3SCy Schubertifdef NEED_HMAC_SHA384_KDF 1092c1d255d3SCy SchubertOBJS += ../src/crypto/sha384-kdf.o 1093c1d255d3SCy Schubertendif 1094c1d255d3SCy Schubertifdef NEED_HMAC_SHA512_KDF 1095c1d255d3SCy SchubertOBJS += ../src/crypto/sha512-kdf.o 1096c1d255d3SCy Schubertendif 1097c1d255d3SCy Schubertifdef NEED_SHA384 1098c1d255d3SCy SchubertCFLAGS += -DCONFIG_SHA384 1099c1d255d3SCy Schubertifneq ($(CONFIG_TLS), openssl) 1100c1d255d3SCy Schubertifneq ($(CONFIG_TLS), linux) 1101c1d255d3SCy Schubertifneq ($(CONFIG_TLS), gnutls) 1102c1d255d3SCy Schubertifneq ($(CONFIG_TLS), wolfssl) 1103c1d255d3SCy SchubertOBJS += ../src/crypto/sha384.o 1104c1d255d3SCy Schubertendif 1105c1d255d3SCy Schubertendif 1106c1d255d3SCy Schubertendif 1107c1d255d3SCy Schubertendif 1108c1d255d3SCy SchubertOBJS += ../src/crypto/sha384-prf.o 1109c1d255d3SCy Schubertendif 1110c1d255d3SCy Schubertifdef NEED_SHA512 1111c1d255d3SCy SchubertCFLAGS += -DCONFIG_SHA512 1112c1d255d3SCy Schubertifneq ($(CONFIG_TLS), openssl) 1113c1d255d3SCy Schubertifneq ($(CONFIG_TLS), linux) 1114c1d255d3SCy Schubertifneq ($(CONFIG_TLS), gnutls) 1115c1d255d3SCy Schubertifneq ($(CONFIG_TLS), wolfssl) 1116c1d255d3SCy SchubertOBJS += ../src/crypto/sha512.o 1117c1d255d3SCy Schubertendif 1118c1d255d3SCy Schubertendif 1119c1d255d3SCy Schubertendif 1120c1d255d3SCy Schubertendif 1121c1d255d3SCy SchubertOBJS += ../src/crypto/sha512-prf.o 1122c1d255d3SCy Schubertendif 1123c1d255d3SCy Schubert 1124c1d255d3SCy Schubertifdef CONFIG_INTERNAL_SHA384 1125c1d255d3SCy SchubertCFLAGS += -DCONFIG_INTERNAL_SHA384 1126c1d255d3SCy SchubertOBJS += ../src/crypto/sha384-internal.o 1127c1d255d3SCy Schubertendif 1128c1d255d3SCy Schubert 1129c1d255d3SCy Schubertifdef CONFIG_INTERNAL_SHA512 1130c1d255d3SCy SchubertCFLAGS += -DCONFIG_INTERNAL_SHA512 1131c1d255d3SCy SchubertOBJS += ../src/crypto/sha512-internal.o 1132c1d255d3SCy Schubertendif 1133c1d255d3SCy Schubert 1134c1d255d3SCy Schubertifdef NEED_ASN1 1135c1d255d3SCy SchubertOBJS += ../src/tls/asn1.o 1136c1d255d3SCy Schubertendif 1137c1d255d3SCy Schubert 1138c1d255d3SCy Schubertifdef NEED_DH_GROUPS 1139c1d255d3SCy SchubertOBJS += ../src/crypto/dh_groups.o 1140c1d255d3SCy Schubertendif 1141c1d255d3SCy Schubertifdef NEED_DH_GROUPS_ALL 1142c1d255d3SCy SchubertCFLAGS += -DALL_DH_GROUPS 1143c1d255d3SCy Schubertendif 1144c1d255d3SCy Schubertifdef CONFIG_INTERNAL_DH_GROUP5 1145c1d255d3SCy Schubertifdef NEED_DH_GROUPS 1146c1d255d3SCy SchubertOBJS += ../src/crypto/dh_group5.o 1147c1d255d3SCy Schubertendif 1148c1d255d3SCy Schubertendif 1149c1d255d3SCy Schubert 1150c1d255d3SCy Schubertifdef NEED_ECC 1151c1d255d3SCy SchubertCFLAGS += -DCONFIG_ECC 1152c1d255d3SCy Schubertendif 1153c1d255d3SCy Schubert 1154c1d255d3SCy Schubertifdef CONFIG_NO_RANDOM_POOL 1155c1d255d3SCy SchubertCFLAGS += -DCONFIG_NO_RANDOM_POOL 1156c1d255d3SCy Schubertelse 1157c1d255d3SCy Schubertifdef CONFIG_GETRANDOM 1158c1d255d3SCy SchubertCFLAGS += -DCONFIG_GETRANDOM 1159c1d255d3SCy Schubertendif 1160c1d255d3SCy SchubertOBJS += ../src/crypto/random.o 1161c1d255d3SCy SchubertHOBJS += ../src/crypto/random.o 1162c1d255d3SCy SchubertHOBJS += ../src/utils/eloop.o 1163c1d255d3SCy SchubertHOBJS += $(SHA1OBJS) 1164c1d255d3SCy Schubertifneq ($(CONFIG_TLS), openssl) 1165c1d255d3SCy Schubertifneq ($(CONFIG_TLS), linux) 1166c1d255d3SCy Schubertifneq ($(CONFIG_TLS), wolfssl) 1167c1d255d3SCy SchubertHOBJS += ../src/crypto/md5.o 1168c1d255d3SCy Schubertendif 1169c1d255d3SCy Schubertendif 1170c1d255d3SCy Schubertendif 1171c1d255d3SCy Schubertendif 1172c1d255d3SCy Schubert 1173c1d255d3SCy Schubertifdef CONFIG_RADIUS_SERVER 1174c1d255d3SCy SchubertCFLAGS += -DRADIUS_SERVER 1175c1d255d3SCy SchubertOBJS += ../src/radius/radius_server.o 1176c1d255d3SCy Schubertendif 1177c1d255d3SCy Schubert 1178c1d255d3SCy Schubertifdef CONFIG_IPV6 1179c1d255d3SCy SchubertCFLAGS += -DCONFIG_IPV6 1180c1d255d3SCy Schubertendif 1181c1d255d3SCy Schubert 1182c1d255d3SCy Schubertifdef CONFIG_DRIVER_RADIUS_ACL 1183c1d255d3SCy SchubertCFLAGS += -DCONFIG_DRIVER_RADIUS_ACL 1184c1d255d3SCy Schubertendif 1185c1d255d3SCy Schubert 1186c1d255d3SCy Schubertifdef NEED_BASE64 1187c1d255d3SCy SchubertOBJS += ../src/utils/base64.o 1188c1d255d3SCy Schubertendif 1189c1d255d3SCy Schubert 1190c1d255d3SCy Schubertifdef NEED_JSON 1191c1d255d3SCy SchubertOBJS += ../src/utils/json.o 1192c1d255d3SCy SchubertCFLAGS += -DCONFIG_JSON 1193c1d255d3SCy Schubertendif 1194c1d255d3SCy Schubert 1195c1d255d3SCy Schubertifdef NEED_AP_MLME 1196c1d255d3SCy SchubertOBJS += ../src/ap/wmm.o 1197c1d255d3SCy SchubertOBJS += ../src/ap/ap_list.o 1198*a90b9d01SCy SchubertOBJS += ../src/ap/comeback_token.o 1199*a90b9d01SCy SchubertOBJS += ../src/pasn/pasn_responder.o 1200*a90b9d01SCy SchubertOBJS += ../src/pasn/pasn_common.o 1201c1d255d3SCy SchubertOBJS += ../src/ap/ieee802_11.o 1202c1d255d3SCy SchubertOBJS += ../src/ap/hw_features.o 1203c1d255d3SCy SchubertOBJS += ../src/ap/dfs.o 1204c1d255d3SCy SchubertCFLAGS += -DNEED_AP_MLME 1205c1d255d3SCy Schubertendif 1206c1d255d3SCy SchubertOBJS += ../src/ap/ieee802_11_ht.o 1207c1d255d3SCy Schubert 1208c1d255d3SCy Schubertifdef CONFIG_IEEE80211AC 1209c1d255d3SCy SchubertOBJS += ../src/ap/ieee802_11_vht.o 1210c1d255d3SCy Schubertendif 1211c1d255d3SCy Schubert 1212c1d255d3SCy Schubertifdef CONFIG_P2P_MANAGER 1213c1d255d3SCy SchubertCFLAGS += -DCONFIG_P2P_MANAGER 1214c1d255d3SCy SchubertOBJS += ../src/ap/p2p_hostapd.o 1215c1d255d3SCy Schubertendif 1216c1d255d3SCy Schubert 1217c1d255d3SCy Schubertifdef CONFIG_HS20 1218c1d255d3SCy SchubertCFLAGS += -DCONFIG_HS20 1219c1d255d3SCy SchubertOBJS += ../src/ap/hs20.o 1220c1d255d3SCy SchubertCONFIG_INTERWORKING=y 1221c1d255d3SCy Schubertendif 1222c1d255d3SCy Schubert 1223c1d255d3SCy Schubertifdef CONFIG_INTERWORKING 1224c1d255d3SCy SchubertCFLAGS += -DCONFIG_INTERWORKING 1225c1d255d3SCy SchubertNEED_GAS=y 1226c1d255d3SCy Schubertendif 1227c1d255d3SCy Schubert 1228c1d255d3SCy Schubertifdef NEED_GAS 1229c1d255d3SCy SchubertOBJS += ../src/common/gas.o 1230c1d255d3SCy SchubertOBJS += ../src/ap/gas_serv.o 1231c1d255d3SCy Schubertendif 1232c1d255d3SCy Schubert 1233c1d255d3SCy Schubertifdef CONFIG_PROXYARP 1234c1d255d3SCy SchubertCFLAGS += -DCONFIG_PROXYARP 1235c1d255d3SCy SchubertOBJS += ../src/ap/x_snoop.o 1236c1d255d3SCy SchubertOBJS += ../src/ap/dhcp_snoop.o 1237c1d255d3SCy Schubertifdef CONFIG_IPV6 1238c1d255d3SCy SchubertOBJS += ../src/ap/ndisc_snoop.o 1239c1d255d3SCy Schubertendif 1240c1d255d3SCy Schubertendif 1241c1d255d3SCy Schubert 1242c1d255d3SCy SchubertOBJS += ../src/drivers/driver_common.o 1243c1d255d3SCy Schubert 1244c1d255d3SCy Schubertifdef CONFIG_WPA_CLI_EDIT 1245c1d255d3SCy SchubertOBJS_c += ../src/utils/edit.o 1246c1d255d3SCy Schubertelse 1247c1d255d3SCy SchubertOBJS_c += ../src/utils/edit_simple.o 1248c1d255d3SCy Schubertendif 1249c1d255d3SCy Schubert 1250c1d255d3SCy Schubertifdef CONFIG_ACS 1251c1d255d3SCy SchubertCFLAGS += -DCONFIG_ACS 1252c1d255d3SCy SchubertOBJS += ../src/ap/acs.o 1253c1d255d3SCy SchubertLIBS += -lm 1254c1d255d3SCy Schubertendif 1255c1d255d3SCy Schubert 1256c1d255d3SCy Schubertifdef CONFIG_NO_STDOUT_DEBUG 1257c1d255d3SCy SchubertCFLAGS += -DCONFIG_NO_STDOUT_DEBUG 1258c1d255d3SCy Schubertendif 1259c1d255d3SCy Schubert 1260c1d255d3SCy Schubertifdef CONFIG_DEBUG_SYSLOG 1261c1d255d3SCy SchubertCFLAGS += -DCONFIG_DEBUG_SYSLOG 1262c1d255d3SCy Schubertendif 1263c1d255d3SCy Schubert 1264c1d255d3SCy Schubertifdef CONFIG_DEBUG_LINUX_TRACING 1265c1d255d3SCy SchubertCFLAGS += -DCONFIG_DEBUG_LINUX_TRACING 1266c1d255d3SCy Schubertendif 1267c1d255d3SCy Schubert 1268c1d255d3SCy Schubertifdef CONFIG_DEBUG_FILE 1269c1d255d3SCy SchubertCFLAGS += -DCONFIG_DEBUG_FILE 1270c1d255d3SCy Schubertendif 1271c1d255d3SCy Schubert 1272c1d255d3SCy Schubertifdef CONFIG_SQLITE 1273c1d255d3SCy SchubertCFLAGS += -DCONFIG_SQLITE 1274c1d255d3SCy SchubertLIBS += -lsqlite3 1275c1d255d3SCy SchubertLIBS_h += -lsqlite3 1276c1d255d3SCy Schubertendif 1277c1d255d3SCy Schubert 1278c1d255d3SCy Schubertifdef CONFIG_FST 1279c1d255d3SCy SchubertCFLAGS += -DCONFIG_FST 1280c1d255d3SCy SchubertOBJS += ../src/fst/fst.o 1281c1d255d3SCy SchubertOBJS += ../src/fst/fst_group.o 1282c1d255d3SCy SchubertOBJS += ../src/fst/fst_iface.o 1283c1d255d3SCy SchubertOBJS += ../src/fst/fst_session.o 1284c1d255d3SCy SchubertOBJS += ../src/fst/fst_ctrl_aux.o 1285c1d255d3SCy Schubertifdef CONFIG_FST_TEST 1286c1d255d3SCy SchubertCFLAGS += -DCONFIG_FST_TEST 1287c1d255d3SCy Schubertendif 1288c1d255d3SCy Schubertifndef CONFIG_NO_CTRL_IFACE 1289c1d255d3SCy SchubertOBJS += ../src/fst/fst_ctrl_iface.o 1290c1d255d3SCy Schubertendif 1291c1d255d3SCy Schubertendif 1292c1d255d3SCy Schubert 1293c1d255d3SCy Schubertifdef CONFIG_WEP 1294c1d255d3SCy SchubertCFLAGS += -DCONFIG_WEP 1295c1d255d3SCy Schubertendif 1296c1d255d3SCy Schubert 1297c1d255d3SCy Schubertifdef CONFIG_NO_TKIP 1298c1d255d3SCy SchubertCFLAGS += -DCONFIG_NO_TKIP 1299c1d255d3SCy Schubertendif 1300c1d255d3SCy Schubert 1301c1d255d3SCy Schubert$(DESTDIR)$(BINDIR)/%: % 1302c1d255d3SCy Schubert install -D $(<) $(@) 1303c1d255d3SCy Schubert 1304c1d255d3SCy Schubertinstall: $(addprefix $(DESTDIR)$(BINDIR)/,$(ALL)) 1305c1d255d3SCy Schubert 1306c1d255d3SCy Schubert_OBJS_VAR := OBJS 1307c1d255d3SCy Schubertinclude ../src/objs.mk 1308c1d255d3SCy Schubert 1309c1d255d3SCy Schuberthostapd: $(OBJS) 1310c1d255d3SCy Schubert $(Q)$(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS) 1311c1d255d3SCy Schubert @$(E) " LD " $@ 1312c1d255d3SCy Schubert 1313c1d255d3SCy Schubertifdef CONFIG_WPA_TRACE 1314c1d255d3SCy SchubertOBJS_c += ../src/utils/trace.o 1315c1d255d3SCy Schubertendif 1316c1d255d3SCy Schubert 1317c1d255d3SCy Schubert_OBJS_VAR := OBJS_c 1318c1d255d3SCy Schubertinclude ../src/objs.mk 1319c1d255d3SCy Schubert 1320c1d255d3SCy Schuberthostapd_cli: $(OBJS_c) 1321c1d255d3SCy Schubert $(Q)$(CC) $(LDFLAGS) -o hostapd_cli $(OBJS_c) $(LIBS_c) 1322c1d255d3SCy Schubert @$(E) " LD " $@ 1323c1d255d3SCy Schubert 1324c1d255d3SCy SchubertNOBJS = nt_password_hash.o ../src/crypto/ms_funcs.o $(SHA1OBJS) 1325c1d255d3SCy SchubertNOBJS += ../src/utils/common.o 1326c1d255d3SCy Schubertifdef NEED_RC4 1327c1d255d3SCy Schubertifdef CONFIG_INTERNAL_RC4 1328c1d255d3SCy Schubertifndef CONFIG_NO_RC4 1329c1d255d3SCy SchubertNOBJS += ../src/crypto/rc4.o 1330c1d255d3SCy Schubertendif 1331c1d255d3SCy Schubertendif 1332c1d255d3SCy Schubertendif 1333c1d255d3SCy Schubertifdef CONFIG_INTERNAL_MD5 1334c1d255d3SCy SchubertNOBJS += ../src/crypto/md5-internal.o 1335c1d255d3SCy Schubertendif 1336c1d255d3SCy SchubertNOBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o 1337c1d255d3SCy SchubertNOBJS += ../src/utils/os_$(CONFIG_OS).o 1338c1d255d3SCy SchubertNOBJS += ../src/utils/wpa_debug.o 1339c1d255d3SCy SchubertNOBJS += ../src/utils/wpabuf.o 1340c1d255d3SCy Schubertifdef CONFIG_WPA_TRACE 1341c1d255d3SCy SchubertNOBJS += ../src/utils/trace.o 1342c1d255d3SCy Schubertendif 1343c1d255d3SCy Schubert 1344c1d255d3SCy SchubertHOBJS += hlr_auc_gw.o ../src/utils/common.o ../src/utils/wpa_debug.o ../src/utils/os_$(CONFIG_OS).o ../src/utils/wpabuf.o ../src/crypto/milenage.o 1345c1d255d3SCy SchubertHOBJS += ../src/crypto/aes-encblock.o 1346c1d255d3SCy Schubertifdef CONFIG_INTERNAL_AES 1347c1d255d3SCy SchubertHOBJS += ../src/crypto/aes-internal.o 1348c1d255d3SCy SchubertHOBJS += ../src/crypto/aes-internal-enc.o 1349c1d255d3SCy Schubertendif 1350c1d255d3SCy Schubertifeq ($(CONFIG_TLS), linux) 1351c1d255d3SCy SchubertHOBJS += ../src/crypto/crypto_linux.o 1352c1d255d3SCy Schubertendif 1353c1d255d3SCy Schubert 1354c1d255d3SCy SchubertSOBJS += sae_pk_gen.o 1355c1d255d3SCy SchubertSOBJS += ../src/utils/common.o 1356c1d255d3SCy SchubertSOBJS += ../src/utils/os_$(CONFIG_OS).o 1357c1d255d3SCy SchubertSOBJS += ../src/utils/base64.o 1358c1d255d3SCy SchubertSOBJS += ../src/utils/wpa_debug.o 1359c1d255d3SCy SchubertSOBJS += ../src/utils/wpabuf.o 1360c1d255d3SCy Schubertifdef CONFIG_WPA_TRACE 1361c1d255d3SCy SchubertSOBJS += ../src/utils/trace.o 1362c1d255d3SCy Schubertendif 1363c1d255d3SCy SchubertSOBJS += ../src/common/ieee802_11_common.o 1364c1d255d3SCy SchubertSOBJS += ../src/common/sae.o 1365c1d255d3SCy SchubertSOBJS += ../src/common/sae_pk.o 1366c1d255d3SCy SchubertSOBJS += ../src/common/dragonfly.o 1367c1d255d3SCy SchubertSOBJS += $(AESOBJS) 1368c1d255d3SCy SchubertSOBJS += ../src/crypto/sha256-prf.o 1369c1d255d3SCy SchubertSOBJS += ../src/crypto/sha384-prf.o 1370c1d255d3SCy SchubertSOBJS += ../src/crypto/sha512-prf.o 1371c1d255d3SCy SchubertSOBJS += ../src/crypto/dh_groups.o 1372c1d255d3SCy SchubertSOBJS += ../src/crypto/sha256-kdf.o 1373c1d255d3SCy SchubertSOBJS += ../src/crypto/sha384-kdf.o 1374c1d255d3SCy SchubertSOBJS += ../src/crypto/sha512-kdf.o 1375c1d255d3SCy Schubert 1376c1d255d3SCy Schubert_OBJS_VAR := NOBJS 1377c1d255d3SCy Schubertinclude ../src/objs.mk 1378c1d255d3SCy Schubert_OBJS_VAR := HOBJS 1379c1d255d3SCy Schubertinclude ../src/objs.mk 1380c1d255d3SCy Schubert_OBJS_VAR := SOBJS 1381c1d255d3SCy Schubertinclude ../src/objs.mk 1382c1d255d3SCy Schubert 1383c1d255d3SCy Schubertnt_password_hash: $(NOBJS) 1384c1d255d3SCy Schubert $(Q)$(CC) $(LDFLAGS) -o nt_password_hash $(NOBJS) $(LIBS_n) 1385c1d255d3SCy Schubert @$(E) " LD " $@ 1386c1d255d3SCy Schubert 1387c1d255d3SCy Schuberthlr_auc_gw: $(HOBJS) 1388c1d255d3SCy Schubert $(Q)$(CC) $(LDFLAGS) -o hlr_auc_gw $(HOBJS) $(LIBS_h) 1389c1d255d3SCy Schubert @$(E) " LD " $@ 1390c1d255d3SCy Schubert 1391c1d255d3SCy Schubertsae_pk_gen: $(SOBJS) 1392c1d255d3SCy Schubert $(Q)$(CC) $(LDFLAGS) -o sae_pk_gen $(SOBJS) $(LIBS_s) 1393c1d255d3SCy Schubert @$(E) " LD " $@ 1394c1d255d3SCy Schubert 1395c1d255d3SCy Schubert.PHONY: lcov-html 1396c1d255d3SCy Schubertlcov-html: 1397c1d255d3SCy Schubert lcov -c -d $(BUILDDIR) > lcov.info 1398c1d255d3SCy Schubert genhtml lcov.info --output-directory lcov-html 1399c1d255d3SCy Schubert 1400c1d255d3SCy Schubertclean: common-clean 1401c1d255d3SCy Schubert rm -f core *~ nt_password_hash hlr_auc_gw 1402c1d255d3SCy Schubert rm -f sae_pk_gen 1403c1d255d3SCy Schubert rm -f lcov.info 1404c1d255d3SCy Schubert rm -rf lcov-html 1405