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