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 596ifdef CONFIG_DPP3 597CFLAGS += -DCONFIG_DPP3 598endif 599endif 600 601ifdef CONFIG_PASN 602CFLAGS += -DCONFIG_PASN 603CFLAGS += -DCONFIG_PTKSA_CACHE 604NEED_HMAC_SHA256_KDF=y 605NEED_HMAC_SHA384_KDF=y 606NEED_SHA256=y 607NEED_SHA384=y 608OBJS += ../src/common/ptksa_cache.o 609endif 610 611ifdef CONFIG_EAP_IKEV2 612CFLAGS += -DEAP_SERVER_IKEV2 613OBJS += ../src/eap_server/eap_server_ikev2.o ../src/eap_server/ikev2.o 614OBJS += ../src/eap_common/eap_ikev2_common.o ../src/eap_common/ikev2_common.o 615NEED_DH_GROUPS=y 616NEED_DH_GROUPS_ALL=y 617NEED_MODEXP=y 618NEED_CIPHER=y 619endif 620 621ifdef CONFIG_EAP_TNC 622CFLAGS += -DEAP_SERVER_TNC 623OBJS += ../src/eap_server/eap_server_tnc.o 624OBJS += ../src/eap_server/tncs.o 625NEED_BASE64=y 626ifndef CONFIG_DRIVER_BSD 627LIBS += -ldl 628endif 629endif 630 631ifdef CONFIG_MACSEC 632CFLAGS += -DCONFIG_MACSEC 633OBJS += ../src/ap/wpa_auth_kay.o 634OBJS += ../src/pae/ieee802_1x_cp.o 635OBJS += ../src/pae/ieee802_1x_kay.o 636OBJS += ../src/pae/ieee802_1x_key.o 637OBJS += ../src/pae/ieee802_1x_secy_ops.o 638endif 639 640# Basic EAP functionality is needed for EAPOL 641OBJS += eap_register.o 642OBJS += ../src/eap_server/eap_server.o 643OBJS += ../src/eap_common/eap_common.o 644OBJS += ../src/eap_server/eap_server_methods.o 645OBJS += ../src/eap_server/eap_server_identity.o 646CFLAGS += -DEAP_SERVER_IDENTITY 647 648ifdef CONFIG_EAP 649CFLAGS += -DEAP_SERVER 650endif 651 652ifdef CONFIG_PKCS12 653CFLAGS += -DPKCS12_FUNCS 654endif 655 656ifdef NEED_DRAGONFLY 657OBJS += ../src/common/dragonfly.o 658endif 659 660ifdef MS_FUNCS 661OBJS += ../src/crypto/ms_funcs.o 662NEED_DES=y 663NEED_MD4=y 664endif 665 666ifdef CHAP 667OBJS += ../src/eap_common/chap.o 668endif 669 670ifdef TLS_FUNCS 671NEED_DES=y 672# Shared TLS functions (needed for EAP_TLS, EAP_PEAP, and EAP_TTLS) 673CFLAGS += -DEAP_TLS_FUNCS 674OBJS += ../src/eap_server/eap_server_tls_common.o 675NEED_TLS_PRF=y 676endif 677 678ifndef CONFIG_TLS 679CONFIG_TLS=openssl 680endif 681 682ifdef CONFIG_TLSV11 683CFLAGS += -DCONFIG_TLSV11 684endif 685 686ifdef CONFIG_TLSV12 687CFLAGS += -DCONFIG_TLSV12 688endif 689 690ifeq ($(CONFIG_TLS), wolfssl) 691CONFIG_CRYPTO=wolfssl 692ifdef TLS_FUNCS 693OBJS += ../src/crypto/tls_wolfssl.o 694LIBS += -lwolfssl -lm 695endif 696OBJS += ../src/crypto/crypto_wolfssl.o 697HOBJS += ../src/crypto/crypto_wolfssl.o 698ifdef NEED_FIPS186_2_PRF 699OBJS += ../src/crypto/fips_prf_wolfssl.o 700endif 701NEED_TLS_PRF_SHA256=y 702LIBS += -lwolfssl -lm 703LIBS_h += -lwolfssl -lm 704ifdef CONFIG_TLS_ADD_DL 705LIBS += -ldl 706LIBS_h += -ldl 707endif 708endif 709 710ifeq ($(CONFIG_TLS), openssl) 711CONFIG_CRYPTO=openssl 712ifdef TLS_FUNCS 713OBJS += ../src/crypto/tls_openssl.o 714OBJS += ../src/crypto/tls_openssl_ocsp.o 715LIBS += -lssl 716endif 717OBJS += ../src/crypto/crypto_openssl.o 718HOBJS += ../src/crypto/crypto_openssl.o 719SOBJS += ../src/crypto/crypto_openssl.o 720ifdef NEED_FIPS186_2_PRF 721OBJS += ../src/crypto/fips_prf_openssl.o 722endif 723NEED_TLS_PRF_SHA256=y 724LIBS += -lcrypto 725LIBS_h += -lcrypto 726LIBS_n += -lcrypto 727LIBS_s += -lcrypto 728ifdef CONFIG_TLS_ADD_DL 729LIBS += -ldl 730LIBS_h += -ldl 731LIBS_s += -ldl 732endif 733ifndef CONFIG_TLS_DEFAULT_CIPHERS 734CONFIG_TLS_DEFAULT_CIPHERS = "DEFAULT:!EXP:!LOW" 735endif 736CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONFIG_TLS_DEFAULT_CIPHERS)\" 737endif 738 739ifeq ($(CONFIG_TLS), gnutls) 740ifndef CONFIG_CRYPTO 741# default to libgcrypt 742CONFIG_CRYPTO=gnutls 743endif 744ifdef TLS_FUNCS 745OBJS += ../src/crypto/tls_gnutls.o 746LIBS += -lgnutls -lgpg-error 747endif 748OBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o 749HOBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o 750ifdef NEED_FIPS186_2_PRF 751OBJS += ../src/crypto/fips_prf_internal.o 752SHA1OBJS += ../src/crypto/sha1-internal.o 753endif 754ifeq ($(CONFIG_CRYPTO), gnutls) 755LIBS += -lgcrypt 756LIBS_h += -lgcrypt 757LIBS_n += -lgcrypt 758CONFIG_INTERNAL_RC4=y 759CONFIG_INTERNAL_DH_GROUP5=y 760endif 761ifeq ($(CONFIG_CRYPTO), nettle) 762LIBS += -lnettle -lgmp 763LIBS_p += -lnettle -lgmp 764CONFIG_INTERNAL_RC4=y 765CONFIG_INTERNAL_DH_GROUP5=y 766endif 767endif 768 769ifeq ($(CONFIG_TLS), internal) 770ifndef CONFIG_CRYPTO 771CONFIG_CRYPTO=internal 772endif 773ifdef TLS_FUNCS 774OBJS += ../src/crypto/crypto_internal-rsa.o 775OBJS += ../src/crypto/tls_internal.o 776OBJS += ../src/tls/tlsv1_common.o 777OBJS += ../src/tls/tlsv1_record.o 778OBJS += ../src/tls/tlsv1_cred.o 779OBJS += ../src/tls/tlsv1_server.o 780OBJS += ../src/tls/tlsv1_server_write.o 781OBJS += ../src/tls/tlsv1_server_read.o 782OBJS += ../src/tls/rsa.o 783OBJS += ../src/tls/x509v3.o 784OBJS += ../src/tls/pkcs1.o 785OBJS += ../src/tls/pkcs5.o 786OBJS += ../src/tls/pkcs8.o 787NEED_ASN1=y 788NEED_BASE64=y 789NEED_TLS_PRF=y 790ifdef CONFIG_TLSV12 791NEED_TLS_PRF_SHA256=y 792endif 793NEED_MODEXP=y 794NEED_CIPHER=y 795CFLAGS += -DCONFIG_TLS_INTERNAL 796CFLAGS += -DCONFIG_TLS_INTERNAL_SERVER 797endif 798ifdef NEED_CIPHER 799NEED_DES=y 800OBJS += ../src/crypto/crypto_internal-cipher.o 801endif 802ifdef NEED_MODEXP 803OBJS += ../src/crypto/crypto_internal-modexp.o 804OBJS += ../src/tls/bignum.o 805endif 806ifeq ($(CONFIG_CRYPTO), libtomcrypt) 807OBJS += ../src/crypto/crypto_libtomcrypt.o 808LIBS += -ltomcrypt -ltfm 809LIBS_h += -ltomcrypt -ltfm 810CONFIG_INTERNAL_SHA256=y 811CONFIG_INTERNAL_RC4=y 812CONFIG_INTERNAL_DH_GROUP5=y 813endif 814ifeq ($(CONFIG_CRYPTO), internal) 815OBJS += ../src/crypto/crypto_internal.o 816NEED_AES_DEC=y 817CFLAGS += -DCONFIG_CRYPTO_INTERNAL 818ifdef CONFIG_INTERNAL_LIBTOMMATH 819CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH 820ifdef CONFIG_INTERNAL_LIBTOMMATH_FAST 821CFLAGS += -DLTM_FAST 822endif 823else 824LIBS += -ltommath 825LIBS_h += -ltommath 826endif 827CONFIG_INTERNAL_AES=y 828CONFIG_INTERNAL_DES=y 829CONFIG_INTERNAL_SHA1=y 830CONFIG_INTERNAL_MD4=y 831CONFIG_INTERNAL_MD5=y 832CONFIG_INTERNAL_SHA256=y 833CONFIG_INTERNAL_SHA384=y 834CONFIG_INTERNAL_SHA512=y 835CONFIG_INTERNAL_RC4=y 836CONFIG_INTERNAL_DH_GROUP5=y 837endif 838ifeq ($(CONFIG_CRYPTO), cryptoapi) 839OBJS += ../src/crypto/crypto_cryptoapi.o 840OBJS_p += ../src/crypto/crypto_cryptoapi.o 841CFLAGS += -DCONFIG_CRYPTO_CRYPTOAPI 842CONFIG_INTERNAL_SHA256=y 843CONFIG_INTERNAL_RC4=y 844endif 845endif 846 847ifeq ($(CONFIG_TLS), linux) 848OBJS += ../src/crypto/crypto_linux.o 849ifdef TLS_FUNCS 850OBJS += ../src/crypto/crypto_internal-rsa.o 851OBJS += ../src/crypto/tls_internal.o 852OBJS += ../src/tls/tlsv1_common.o 853OBJS += ../src/tls/tlsv1_record.o 854OBJS += ../src/tls/tlsv1_cred.o 855OBJS += ../src/tls/tlsv1_server.o 856OBJS += ../src/tls/tlsv1_server_write.o 857OBJS += ../src/tls/tlsv1_server_read.o 858OBJS += ../src/tls/rsa.o 859OBJS += ../src/tls/x509v3.o 860OBJS += ../src/tls/pkcs1.o 861OBJS += ../src/tls/pkcs5.o 862OBJS += ../src/tls/pkcs8.o 863NEED_ASN1=y 864NEED_BASE64=y 865NEED_TLS_PRF=y 866ifdef CONFIG_TLSV12 867NEED_TLS_PRF_SHA256=y 868endif 869NEED_MODEXP=y 870NEED_CIPHER=y 871CFLAGS += -DCONFIG_TLS_INTERNAL 872CFLAGS += -DCONFIG_TLS_INTERNAL_SERVER 873endif 874ifdef NEED_MODEXP 875OBJS += ../src/crypto/crypto_internal-modexp.o 876OBJS += ../src/tls/bignum.o 877CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH 878CFLAGS += -DLTM_FAST 879endif 880CONFIG_INTERNAL_DH_GROUP5=y 881ifdef NEED_FIPS186_2_PRF 882OBJS += ../src/crypto/fips_prf_internal.o 883OBJS += ../src/crypto/sha1-internal.o 884endif 885endif 886 887ifeq ($(CONFIG_TLS), none) 888ifdef TLS_FUNCS 889OBJS += ../src/crypto/tls_none.o 890CFLAGS += -DEAP_TLS_NONE 891CONFIG_INTERNAL_AES=y 892CONFIG_INTERNAL_SHA1=y 893CONFIG_INTERNAL_MD5=y 894endif 895OBJS += ../src/crypto/crypto_none.o 896OBJS_p += ../src/crypto/crypto_none.o 897CONFIG_INTERNAL_SHA256=y 898CONFIG_INTERNAL_RC4=y 899endif 900 901ifndef TLS_FUNCS 902OBJS += ../src/crypto/tls_none.o 903ifeq ($(CONFIG_TLS), internal) 904CONFIG_INTERNAL_AES=y 905CONFIG_INTERNAL_SHA1=y 906CONFIG_INTERNAL_MD5=y 907CONFIG_INTERNAL_RC4=y 908endif 909endif 910 911AESOBJS = # none so far 912ifdef CONFIG_INTERNAL_AES 913AESOBJS += ../src/crypto/aes-internal.o ../src/crypto/aes-internal-enc.o 914endif 915 916ifneq ($(CONFIG_TLS), openssl) 917ifneq ($(CONFIG_TLS), wolfssl) 918AESOBJS += ../src/crypto/aes-wrap.o 919endif 920endif 921ifdef NEED_AES_EAX 922AESOBJS += ../src/crypto/aes-eax.o 923NEED_AES_CTR=y 924endif 925ifdef NEED_AES_SIV 926AESOBJS += ../src/crypto/aes-siv.o 927NEED_AES_CTR=y 928endif 929ifdef NEED_AES_CTR 930AESOBJS += ../src/crypto/aes-ctr.o 931endif 932ifdef NEED_AES_ENCBLOCK 933AESOBJS += ../src/crypto/aes-encblock.o 934endif 935ifneq ($(CONFIG_TLS), linux) 936ifneq ($(CONFIG_TLS), wolfssl) 937AESOBJS += ../src/crypto/aes-omac1.o 938endif 939endif 940ifdef NEED_AES_UNWRAP 941ifneq ($(CONFIG_TLS), openssl) 942ifneq ($(CONFIG_TLS), linux) 943ifneq ($(CONFIG_TLS), wolfssl) 944NEED_AES_DEC=y 945AESOBJS += ../src/crypto/aes-unwrap.o 946endif 947endif 948endif 949endif 950ifdef NEED_AES_CBC 951NEED_AES_DEC=y 952ifneq ($(CONFIG_TLS), openssl) 953ifneq ($(CONFIG_TLS), linux) 954ifneq ($(CONFIG_TLS), wolfssl) 955AESOBJS += ../src/crypto/aes-cbc.o 956endif 957endif 958endif 959endif 960ifdef NEED_AES_DEC 961ifdef CONFIG_INTERNAL_AES 962AESOBJS += ../src/crypto/aes-internal-dec.o 963endif 964endif 965ifdef NEED_AES 966OBJS += $(AESOBJS) 967endif 968 969ifdef NEED_SHA1 970ifneq ($(CONFIG_TLS), openssl) 971ifneq ($(CONFIG_TLS), linux) 972ifneq ($(CONFIG_TLS), gnutls) 973ifneq ($(CONFIG_TLS), wolfssl) 974SHA1OBJS += ../src/crypto/sha1.o 975endif 976endif 977endif 978endif 979SHA1OBJS += ../src/crypto/sha1-prf.o 980ifdef CONFIG_INTERNAL_SHA1 981SHA1OBJS += ../src/crypto/sha1-internal.o 982ifdef NEED_FIPS186_2_PRF 983SHA1OBJS += ../src/crypto/fips_prf_internal.o 984endif 985endif 986ifneq ($(CONFIG_TLS), openssl) 987ifneq ($(CONFIG_TLS), wolfssl) 988SHA1OBJS += ../src/crypto/sha1-pbkdf2.o 989endif 990endif 991ifdef NEED_T_PRF 992SHA1OBJS += ../src/crypto/sha1-tprf.o 993endif 994ifdef NEED_TLS_PRF 995SHA1OBJS += ../src/crypto/sha1-tlsprf.o 996endif 997endif 998 999ifdef NEED_SHA1 1000OBJS += $(SHA1OBJS) 1001endif 1002 1003ifneq ($(CONFIG_TLS), openssl) 1004ifneq ($(CONFIG_TLS), linux) 1005ifneq ($(CONFIG_TLS), gnutls) 1006ifneq ($(CONFIG_TLS), wolfssl) 1007OBJS += ../src/crypto/md5.o 1008endif 1009endif 1010endif 1011endif 1012 1013ifdef NEED_MD5 1014ifdef CONFIG_INTERNAL_MD5 1015OBJS += ../src/crypto/md5-internal.o 1016HOBJS += ../src/crypto/md5-internal.o 1017endif 1018endif 1019 1020ifdef NEED_MD4 1021ifdef CONFIG_INTERNAL_MD4 1022OBJS += ../src/crypto/md4-internal.o 1023endif 1024endif 1025 1026ifdef NEED_DES 1027CFLAGS += -DCONFIG_DES 1028ifdef CONFIG_INTERNAL_DES 1029OBJS += ../src/crypto/des-internal.o 1030endif 1031endif 1032 1033ifdef CONFIG_NO_RC4 1034CFLAGS += -DCONFIG_NO_RC4 1035endif 1036 1037ifdef NEED_RC4 1038ifdef CONFIG_INTERNAL_RC4 1039ifndef CONFIG_NO_RC4 1040OBJS += ../src/crypto/rc4.o 1041endif 1042endif 1043endif 1044 1045CFLAGS += -DCONFIG_SHA256 1046ifneq ($(CONFIG_TLS), openssl) 1047ifneq ($(CONFIG_TLS), linux) 1048ifneq ($(CONFIG_TLS), gnutls) 1049ifneq ($(CONFIG_TLS), wolfssl) 1050OBJS += ../src/crypto/sha256.o 1051endif 1052endif 1053endif 1054endif 1055OBJS += ../src/crypto/sha256-prf.o 1056ifdef CONFIG_INTERNAL_SHA256 1057OBJS += ../src/crypto/sha256-internal.o 1058endif 1059ifdef NEED_TLS_PRF_SHA256 1060OBJS += ../src/crypto/sha256-tlsprf.o 1061endif 1062ifdef NEED_TLS_PRF_SHA384 1063OBJS += ../src/crypto/sha384-tlsprf.o 1064endif 1065ifdef NEED_HMAC_SHA256_KDF 1066OBJS += ../src/crypto/sha256-kdf.o 1067endif 1068ifdef NEED_HMAC_SHA384_KDF 1069OBJS += ../src/crypto/sha384-kdf.o 1070endif 1071ifdef NEED_HMAC_SHA512_KDF 1072OBJS += ../src/crypto/sha512-kdf.o 1073endif 1074ifdef NEED_SHA384 1075CFLAGS += -DCONFIG_SHA384 1076ifneq ($(CONFIG_TLS), openssl) 1077ifneq ($(CONFIG_TLS), linux) 1078ifneq ($(CONFIG_TLS), gnutls) 1079ifneq ($(CONFIG_TLS), wolfssl) 1080OBJS += ../src/crypto/sha384.o 1081endif 1082endif 1083endif 1084endif 1085OBJS += ../src/crypto/sha384-prf.o 1086endif 1087ifdef NEED_SHA512 1088CFLAGS += -DCONFIG_SHA512 1089ifneq ($(CONFIG_TLS), openssl) 1090ifneq ($(CONFIG_TLS), linux) 1091ifneq ($(CONFIG_TLS), gnutls) 1092ifneq ($(CONFIG_TLS), wolfssl) 1093OBJS += ../src/crypto/sha512.o 1094endif 1095endif 1096endif 1097endif 1098OBJS += ../src/crypto/sha512-prf.o 1099endif 1100 1101ifdef CONFIG_INTERNAL_SHA384 1102CFLAGS += -DCONFIG_INTERNAL_SHA384 1103OBJS += ../src/crypto/sha384-internal.o 1104endif 1105 1106ifdef CONFIG_INTERNAL_SHA512 1107CFLAGS += -DCONFIG_INTERNAL_SHA512 1108OBJS += ../src/crypto/sha512-internal.o 1109endif 1110 1111ifdef NEED_ASN1 1112OBJS += ../src/tls/asn1.o 1113endif 1114 1115ifdef NEED_DH_GROUPS 1116OBJS += ../src/crypto/dh_groups.o 1117endif 1118ifdef NEED_DH_GROUPS_ALL 1119CFLAGS += -DALL_DH_GROUPS 1120endif 1121ifdef CONFIG_INTERNAL_DH_GROUP5 1122ifdef NEED_DH_GROUPS 1123OBJS += ../src/crypto/dh_group5.o 1124endif 1125endif 1126 1127ifdef NEED_ECC 1128CFLAGS += -DCONFIG_ECC 1129endif 1130 1131ifdef CONFIG_NO_RANDOM_POOL 1132CFLAGS += -DCONFIG_NO_RANDOM_POOL 1133else 1134ifdef CONFIG_GETRANDOM 1135CFLAGS += -DCONFIG_GETRANDOM 1136endif 1137OBJS += ../src/crypto/random.o 1138HOBJS += ../src/crypto/random.o 1139HOBJS += ../src/utils/eloop.o 1140HOBJS += $(SHA1OBJS) 1141ifneq ($(CONFIG_TLS), openssl) 1142ifneq ($(CONFIG_TLS), linux) 1143ifneq ($(CONFIG_TLS), wolfssl) 1144HOBJS += ../src/crypto/md5.o 1145endif 1146endif 1147endif 1148endif 1149 1150ifdef CONFIG_RADIUS_SERVER 1151CFLAGS += -DRADIUS_SERVER 1152OBJS += ../src/radius/radius_server.o 1153endif 1154 1155ifdef CONFIG_IPV6 1156CFLAGS += -DCONFIG_IPV6 1157endif 1158 1159ifdef CONFIG_DRIVER_RADIUS_ACL 1160CFLAGS += -DCONFIG_DRIVER_RADIUS_ACL 1161endif 1162 1163ifdef NEED_BASE64 1164OBJS += ../src/utils/base64.o 1165endif 1166 1167ifdef NEED_JSON 1168OBJS += ../src/utils/json.o 1169CFLAGS += -DCONFIG_JSON 1170endif 1171 1172ifdef NEED_AP_MLME 1173OBJS += ../src/ap/wmm.o 1174OBJS += ../src/ap/ap_list.o 1175OBJS += ../src/ap/ieee802_11.o 1176OBJS += ../src/ap/hw_features.o 1177OBJS += ../src/ap/dfs.o 1178CFLAGS += -DNEED_AP_MLME 1179endif 1180OBJS += ../src/ap/ieee802_11_ht.o 1181 1182ifdef CONFIG_IEEE80211AC 1183OBJS += ../src/ap/ieee802_11_vht.o 1184endif 1185 1186ifdef CONFIG_P2P_MANAGER 1187CFLAGS += -DCONFIG_P2P_MANAGER 1188OBJS += ../src/ap/p2p_hostapd.o 1189endif 1190 1191ifdef CONFIG_HS20 1192CFLAGS += -DCONFIG_HS20 1193OBJS += ../src/ap/hs20.o 1194CONFIG_INTERWORKING=y 1195endif 1196 1197ifdef CONFIG_INTERWORKING 1198CFLAGS += -DCONFIG_INTERWORKING 1199NEED_GAS=y 1200endif 1201 1202ifdef NEED_GAS 1203OBJS += ../src/common/gas.o 1204OBJS += ../src/ap/gas_serv.o 1205endif 1206 1207ifdef CONFIG_PROXYARP 1208CFLAGS += -DCONFIG_PROXYARP 1209OBJS += ../src/ap/x_snoop.o 1210OBJS += ../src/ap/dhcp_snoop.o 1211ifdef CONFIG_IPV6 1212OBJS += ../src/ap/ndisc_snoop.o 1213endif 1214endif 1215 1216OBJS += ../src/drivers/driver_common.o 1217 1218ifdef CONFIG_WPA_CLI_EDIT 1219OBJS_c += ../src/utils/edit.o 1220else 1221OBJS_c += ../src/utils/edit_simple.o 1222endif 1223 1224ifdef CONFIG_ACS 1225CFLAGS += -DCONFIG_ACS 1226OBJS += ../src/ap/acs.o 1227LIBS += -lm 1228endif 1229 1230ifdef CONFIG_NO_STDOUT_DEBUG 1231CFLAGS += -DCONFIG_NO_STDOUT_DEBUG 1232endif 1233 1234ifdef CONFIG_DEBUG_SYSLOG 1235CFLAGS += -DCONFIG_DEBUG_SYSLOG 1236endif 1237 1238ifdef CONFIG_DEBUG_LINUX_TRACING 1239CFLAGS += -DCONFIG_DEBUG_LINUX_TRACING 1240endif 1241 1242ifdef CONFIG_DEBUG_FILE 1243CFLAGS += -DCONFIG_DEBUG_FILE 1244endif 1245 1246ifdef CONFIG_SQLITE 1247CFLAGS += -DCONFIG_SQLITE 1248LIBS += -lsqlite3 1249LIBS_h += -lsqlite3 1250endif 1251 1252ifdef CONFIG_FST 1253CFLAGS += -DCONFIG_FST 1254OBJS += ../src/fst/fst.o 1255OBJS += ../src/fst/fst_group.o 1256OBJS += ../src/fst/fst_iface.o 1257OBJS += ../src/fst/fst_session.o 1258OBJS += ../src/fst/fst_ctrl_aux.o 1259ifdef CONFIG_FST_TEST 1260CFLAGS += -DCONFIG_FST_TEST 1261endif 1262ifndef CONFIG_NO_CTRL_IFACE 1263OBJS += ../src/fst/fst_ctrl_iface.o 1264endif 1265endif 1266 1267ifdef CONFIG_WEP 1268CFLAGS += -DCONFIG_WEP 1269endif 1270 1271ifdef CONFIG_NO_TKIP 1272CFLAGS += -DCONFIG_NO_TKIP 1273endif 1274 1275$(DESTDIR)$(BINDIR)/%: % 1276 install -D $(<) $(@) 1277 1278install: $(addprefix $(DESTDIR)$(BINDIR)/,$(ALL)) 1279 1280_OBJS_VAR := OBJS 1281include ../src/objs.mk 1282 1283hostapd: $(OBJS) 1284 $(Q)$(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS) 1285 @$(E) " LD " $@ 1286 1287ifdef CONFIG_WPA_TRACE 1288OBJS_c += ../src/utils/trace.o 1289endif 1290 1291_OBJS_VAR := OBJS_c 1292include ../src/objs.mk 1293 1294hostapd_cli: $(OBJS_c) 1295 $(Q)$(CC) $(LDFLAGS) -o hostapd_cli $(OBJS_c) $(LIBS_c) 1296 @$(E) " LD " $@ 1297 1298NOBJS = nt_password_hash.o ../src/crypto/ms_funcs.o $(SHA1OBJS) 1299NOBJS += ../src/utils/common.o 1300ifdef NEED_RC4 1301ifdef CONFIG_INTERNAL_RC4 1302ifndef CONFIG_NO_RC4 1303NOBJS += ../src/crypto/rc4.o 1304endif 1305endif 1306endif 1307ifdef CONFIG_INTERNAL_MD5 1308NOBJS += ../src/crypto/md5-internal.o 1309endif 1310NOBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o 1311NOBJS += ../src/utils/os_$(CONFIG_OS).o 1312NOBJS += ../src/utils/wpa_debug.o 1313NOBJS += ../src/utils/wpabuf.o 1314ifdef CONFIG_WPA_TRACE 1315NOBJS += ../src/utils/trace.o 1316endif 1317 1318HOBJS += 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 1319HOBJS += ../src/crypto/aes-encblock.o 1320ifdef CONFIG_INTERNAL_AES 1321HOBJS += ../src/crypto/aes-internal.o 1322HOBJS += ../src/crypto/aes-internal-enc.o 1323endif 1324ifeq ($(CONFIG_TLS), linux) 1325HOBJS += ../src/crypto/crypto_linux.o 1326endif 1327 1328SOBJS += sae_pk_gen.o 1329SOBJS += ../src/utils/common.o 1330SOBJS += ../src/utils/os_$(CONFIG_OS).o 1331SOBJS += ../src/utils/base64.o 1332SOBJS += ../src/utils/wpa_debug.o 1333SOBJS += ../src/utils/wpabuf.o 1334ifdef CONFIG_WPA_TRACE 1335SOBJS += ../src/utils/trace.o 1336endif 1337SOBJS += ../src/common/ieee802_11_common.o 1338SOBJS += ../src/common/sae.o 1339SOBJS += ../src/common/sae_pk.o 1340SOBJS += ../src/common/dragonfly.o 1341SOBJS += $(AESOBJS) 1342SOBJS += ../src/crypto/sha256-prf.o 1343SOBJS += ../src/crypto/sha384-prf.o 1344SOBJS += ../src/crypto/sha512-prf.o 1345SOBJS += ../src/crypto/dh_groups.o 1346SOBJS += ../src/crypto/sha256-kdf.o 1347SOBJS += ../src/crypto/sha384-kdf.o 1348SOBJS += ../src/crypto/sha512-kdf.o 1349 1350_OBJS_VAR := NOBJS 1351include ../src/objs.mk 1352_OBJS_VAR := HOBJS 1353include ../src/objs.mk 1354_OBJS_VAR := SOBJS 1355include ../src/objs.mk 1356 1357nt_password_hash: $(NOBJS) 1358 $(Q)$(CC) $(LDFLAGS) -o nt_password_hash $(NOBJS) $(LIBS_n) 1359 @$(E) " LD " $@ 1360 1361hlr_auc_gw: $(HOBJS) 1362 $(Q)$(CC) $(LDFLAGS) -o hlr_auc_gw $(HOBJS) $(LIBS_h) 1363 @$(E) " LD " $@ 1364 1365sae_pk_gen: $(SOBJS) 1366 $(Q)$(CC) $(LDFLAGS) -o sae_pk_gen $(SOBJS) $(LIBS_s) 1367 @$(E) " LD " $@ 1368 1369.PHONY: lcov-html 1370lcov-html: 1371 lcov -c -d $(BUILDDIR) > lcov.info 1372 genhtml lcov.info --output-directory lcov-html 1373 1374clean: common-clean 1375 rm -f core *~ nt_password_hash hlr_auc_gw 1376 rm -f sae_pk_gen 1377 rm -f lcov.info 1378 rm -rf lcov-html 1379