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