1BINALL=wpa_supplicant wpa_cli 2 3ifndef CONFIG_NO_WPA_PASSPHRASE 4BINALL += wpa_passphrase 5endif 6 7ALL = $(BINALL) 8ALL += systemd/wpa_supplicant.service 9ALL += systemd/wpa_supplicant@.service 10ALL += systemd/wpa_supplicant-nl80211@.service 11ALL += systemd/wpa_supplicant-wired@.service 12ALL += dbus/fi.w1.wpa_supplicant1.service 13ifdef CONFIG_BUILD_WPA_CLIENT_SO 14ALL += libwpa_client.so 15endif 16 17EXTRA_TARGETS=dynamic_eap_methods 18 19CONFIG_FILE=.config 20include ../src/build.rules 21 22ifdef LIBS 23# If LIBS is set with some global build system defaults, clone those for 24# LIBS_c and LIBS_p to cover wpa_passphrase and wpa_cli as well. 25ifndef LIBS_c 26LIBS_c := $(LIBS) 27endif 28ifndef LIBS_p 29LIBS_p := $(LIBS) 30endif 31endif 32 33export LIBDIR ?= /usr/local/lib 34export INCDIR ?= /usr/local/include 35export BINDIR ?= /usr/local/sbin 36PKG_CONFIG ?= pkg-config 37 38CFLAGS += $(EXTRA_CFLAGS) 39CFLAGS += -I$(abspath ../src) 40CFLAGS += -I$(abspath ../src/utils) 41 42ifndef CONFIG_NO_GITVER 43# Add VERSION_STR postfix for builds from a git repository 44ifeq ($(wildcard ../.git),../.git) 45GITVER := $(shell git describe --dirty=+) 46ifneq ($(GITVER),) 47CFLAGS += -DGIT_VERSION_STR_POSTFIX=\"-$(GITVER)\" 48endif 49endif 50endif 51 52ifdef CONFIG_TESTING_OPTIONS 53CFLAGS += -DCONFIG_TESTING_OPTIONS 54CONFIG_WPS_TESTING=y 55CONFIG_TDLS_TESTING=y 56endif 57 58mkconfig: 59 @if [ -f .config ]; then \ 60 echo '.config exists - did not replace it'; \ 61 exit 1; \ 62 fi 63 echo CONFIG_DRIVER_HOSTAP=y >> .config 64 echo CONFIG_DRIVER_WEXT=y >> .config 65 66$(DESTDIR)$(BINDIR)/%: % 67 install -D $(<) $(@) 68 69install: $(addprefix $(DESTDIR)$(BINDIR)/,$(BINALL)) 70 $(MAKE) -C ../src install 71ifdef CONFIG_BUILD_WPA_CLIENT_SO 72 install -m 0644 -D libwpa_client.so $(DESTDIR)/$(LIBDIR)/libwpa_client.so 73 install -m 0644 -D ../src/common/wpa_ctrl.h $(DESTDIR)/$(INCDIR)/wpa_ctrl.h 74endif 75 if ls eap_*.so >/dev/null 2>&1; then \ 76 install -d $(DESTDIR)$(LIBDIR)/wpa_supplicant && \ 77 cp *.so $(DESTDIR)$(LIBDIR)/wpa_supplicant \ 78 ; fi 79 80ifdef CONFIG_FIPS 81CONFIG_NO_RANDOM_POOL= 82CONFIG_OPENSSL_CMAC=y 83endif 84 85OBJS = config.o 86OBJS += notify.o 87OBJS += bss.o 88OBJS += eap_register.o 89OBJS += ../src/utils/common.o 90OBJS += ../src/utils/config.o 91OBJS += ../src/utils/wpa_debug.o 92OBJS += ../src/utils/wpabuf.o 93OBJS += ../src/utils/bitfield.o 94OBJS += ../src/utils/ip_addr.o 95OBJS += ../src/utils/crc32.o 96OBJS += op_classes.o 97OBJS += rrm.o 98OBJS += twt.o 99OBJS += robust_av.o 100OBJS_p = wpa_passphrase.o 101OBJS_p += ../src/utils/common.o 102OBJS_p += ../src/utils/wpa_debug.o 103OBJS_p += ../src/utils/wpabuf.o 104OBJS_c = wpa_cli.o ../src/common/wpa_ctrl.o 105OBJS_c += ../src/utils/wpa_debug.o 106OBJS_c += ../src/utils/common.o 107OBJS_c += ../src/common/cli.o 108OBJS += wmm_ac.o 109 110ifndef CONFIG_OS 111ifdef CONFIG_NATIVE_WINDOWS 112CONFIG_OS=win32 113else 114CONFIG_OS=unix 115endif 116endif 117 118ifeq ($(CONFIG_OS), internal) 119CFLAGS += -DOS_NO_C_LIB_DEFINES 120endif 121 122OBJS += ../src/utils/os_$(CONFIG_OS).o 123OBJS_p += ../src/utils/os_$(CONFIG_OS).o 124OBJS_c += ../src/utils/os_$(CONFIG_OS).o 125 126ifdef CONFIG_WPA_TRACE 127CFLAGS += -DWPA_TRACE 128OBJS += ../src/utils/trace.o 129OBJS_p += ../src/utils/trace.o 130OBJS_c += ../src/utils/trace.o 131OBJS_priv += ../src/utils/trace.o 132LIBCTRL += ../src/utils/trace.o 133LIBCTRLSO += ../src/utils/trace.c 134LDFLAGS += -rdynamic 135CFLAGS += -funwind-tables 136ifdef CONFIG_WPA_TRACE_BFD 137CFLAGS += -DPACKAGE="wpa_supplicant" -DWPA_TRACE_BFD 138LIBS += -lbfd -ldl -liberty -lz 139LIBS_p += -lbfd -ldl -liberty -lz 140LIBS_c += -lbfd -ldl -liberty -lz 141endif 142endif 143 144ifndef CONFIG_ELOOP 145CONFIG_ELOOP=eloop 146endif 147OBJS += ../src/utils/$(CONFIG_ELOOP).o 148OBJS_c += ../src/utils/$(CONFIG_ELOOP).o 149 150ifndef CONFIG_OSX 151ifeq ($(CONFIG_ELOOP), eloop) 152# Using glibc < 2.17 requires -lrt for clock_gettime() 153# OS X has an alternate implementation 154LIBS += -lrt 155LIBS_c += -lrt 156LIBS_p += -lrt 157endif 158endif 159 160ifdef CONFIG_ELOOP_POLL 161CFLAGS += -DCONFIG_ELOOP_POLL 162endif 163 164ifdef CONFIG_ELOOP_EPOLL 165CFLAGS += -DCONFIG_ELOOP_EPOLL 166endif 167 168ifdef CONFIG_ELOOP_KQUEUE 169CFLAGS += -DCONFIG_ELOOP_KQUEUE 170endif 171 172ifdef CONFIG_EAPOL_TEST 173CFLAGS += -Werror -DEAPOL_TEST 174endif 175 176ifdef CONFIG_CODE_COVERAGE 177CFLAGS += -O0 -fprofile-arcs -ftest-coverage 178LIBS += -lgcov 179LIBS_c += -lgcov 180LIBS_p += -lgcov 181endif 182 183ifdef CONFIG_HT_OVERRIDES 184CFLAGS += -DCONFIG_HT_OVERRIDES 185endif 186 187ifdef CONFIG_VHT_OVERRIDES 188CFLAGS += -DCONFIG_VHT_OVERRIDES 189endif 190 191ifdef CONFIG_HE_OVERRIDES 192CFLAGS += -DCONFIG_HE_OVERRIDES 193endif 194 195ifndef CONFIG_BACKEND 196CONFIG_BACKEND=file 197endif 198 199ifeq ($(CONFIG_BACKEND), file) 200OBJS += config_file.o 201ifndef CONFIG_NO_CONFIG_BLOBS 202NEED_BASE64=y 203endif 204CFLAGS += -DCONFIG_BACKEND_FILE 205endif 206 207ifeq ($(CONFIG_BACKEND), winreg) 208OBJS += config_winreg.o 209endif 210 211ifeq ($(CONFIG_BACKEND), none) 212OBJS += config_none.o 213endif 214 215ifdef CONFIG_NO_CONFIG_WRITE 216CFLAGS += -DCONFIG_NO_CONFIG_WRITE 217endif 218 219ifdef CONFIG_NO_CONFIG_BLOBS 220CFLAGS += -DCONFIG_NO_CONFIG_BLOBS 221endif 222 223ifdef CONFIG_NO_SCAN_PROCESSING 224CFLAGS += -DCONFIG_NO_SCAN_PROCESSING 225endif 226 227ifdef CONFIG_SUITEB 228CFLAGS += -DCONFIG_SUITEB 229endif 230 231ifdef CONFIG_SUITEB192 232CFLAGS += -DCONFIG_SUITEB192 233NEED_SHA384=y 234endif 235 236ifdef CONFIG_OCV 237CFLAGS += -DCONFIG_OCV 238OBJS += ../src/common/ocv.o 239endif 240 241ifdef CONFIG_IEEE80211R 242CFLAGS += -DCONFIG_IEEE80211R 243OBJS += ../src/rsn_supp/wpa_ft.o 244endif 245 246ifdef CONFIG_MESH 247NEED_80211_COMMON=y 248NEED_AES_SIV=y 249CONFIG_SAE=y 250CONFIG_AP=y 251CFLAGS += -DCONFIG_MESH 252OBJS += mesh.o 253OBJS += mesh_mpm.o 254OBJS += mesh_rsn.o 255endif 256 257ifdef CONFIG_SAE 258CFLAGS += -DCONFIG_SAE 259OBJS += ../src/common/sae.o 260ifdef CONFIG_SAE_PK 261CFLAGS += -DCONFIG_SAE_PK 262OBJS += ../src/common/sae_pk.o 263endif 264NEED_ECC=y 265NEED_DH_GROUPS=y 266NEED_HMAC_SHA256_KDF=y 267NEED_DRAGONFLY=y 268ifdef CONFIG_TESTING_OPTIONS 269NEED_DH_GROUPS_ALL=y 270endif 271endif 272 273ifdef CONFIG_DPP 274CFLAGS += -DCONFIG_DPP 275OBJS += ../src/common/dpp.o 276OBJS += ../src/common/dpp_auth.o 277OBJS += ../src/common/dpp_backup.o 278OBJS += ../src/common/dpp_crypto.o 279OBJS += ../src/common/dpp_pkex.o 280OBJS += ../src/common/dpp_reconfig.o 281OBJS += ../src/common/dpp_tcp.o 282OBJS += dpp_supplicant.o 283NEED_AES_SIV=y 284NEED_HMAC_SHA256_KDF=y 285NEED_HMAC_SHA384_KDF=y 286NEED_HMAC_SHA512_KDF=y 287NEED_SHA384=y 288NEED_SHA512=y 289NEED_ECC=y 290NEED_JSON=y 291NEED_GAS_SERVER=y 292NEED_BASE64=y 293NEED_ASN1=y 294ifdef CONFIG_DPP2 295CFLAGS += -DCONFIG_DPP2 296endif 297ifdef CONFIG_DPP3 298CFLAGS += -DCONFIG_DPP3 299endif 300endif 301 302ifdef CONFIG_OWE 303CFLAGS += -DCONFIG_OWE 304NEED_ECC=y 305NEED_HMAC_SHA256_KDF=y 306NEED_HMAC_SHA384_KDF=y 307NEED_HMAC_SHA512_KDF=y 308NEED_SHA384=y 309NEED_SHA512=y 310endif 311 312ifdef CONFIG_FILS 313CFLAGS += -DCONFIG_FILS 314NEED_SHA384=y 315NEED_AES_SIV=y 316ifdef CONFIG_FILS_SK_PFS 317CFLAGS += -DCONFIG_FILS_SK_PFS 318NEED_ECC=y 319endif 320endif 321 322ifdef CONFIG_MBO 323CONFIG_WNM=y 324endif 325 326ifdef CONFIG_WNM 327CFLAGS += -DCONFIG_WNM 328OBJS += wnm_sta.o 329endif 330 331ifdef CONFIG_TDLS 332CFLAGS += -DCONFIG_TDLS 333OBJS += ../src/rsn_supp/tdls.o 334endif 335 336ifdef CONFIG_TDLS_TESTING 337CFLAGS += -DCONFIG_TDLS_TESTING 338endif 339 340ifdef CONFIG_PMKSA_CACHE_EXTERNAL 341CFLAGS += -DCONFIG_PMKSA_CACHE_EXTERNAL 342endif 343 344ifndef CONFIG_NO_WPA 345OBJS += ../src/rsn_supp/wpa.o 346OBJS += ../src/rsn_supp/preauth.o 347OBJS += ../src/rsn_supp/pmksa_cache.o 348OBJS += ../src/rsn_supp/wpa_ie.o 349OBJS += ../src/common/wpa_common.o 350NEED_AES=y 351NEED_SHA1=y 352NEED_MD5=y 353NEED_RC4=y 354else 355CFLAGS += -DCONFIG_NO_WPA 356ifeq ($(CONFIG_TLS), internal) 357NEED_SHA1=y 358NEED_MD5=y 359endif 360endif 361 362ifdef CONFIG_IBSS_RSN 363NEED_RSN_AUTHENTICATOR=y 364CFLAGS += -DCONFIG_IBSS_RSN 365CFLAGS += -DCONFIG_NO_VLAN 366OBJS += ibss_rsn.o 367endif 368 369ifdef CONFIG_MATCH_IFACE 370CFLAGS += -DCONFIG_MATCH_IFACE 371endif 372 373ifdef CONFIG_P2P 374OBJS += p2p_supplicant.o 375OBJS += p2p_supplicant_sd.o 376OBJS += ../src/p2p/p2p.o 377OBJS += ../src/p2p/p2p_utils.o 378OBJS += ../src/p2p/p2p_parse.o 379OBJS += ../src/p2p/p2p_build.o 380OBJS += ../src/p2p/p2p_go_neg.o 381OBJS += ../src/p2p/p2p_sd.o 382OBJS += ../src/p2p/p2p_pd.o 383OBJS += ../src/p2p/p2p_invitation.o 384OBJS += ../src/p2p/p2p_dev_disc.o 385OBJS += ../src/p2p/p2p_group.o 386OBJS += ../src/ap/p2p_hostapd.o 387CFLAGS += -DCONFIG_P2P 388NEED_GAS=y 389NEED_OFFCHANNEL=y 390CONFIG_WPS=y 391CONFIG_AP=y 392ifdef CONFIG_P2P_STRICT 393CFLAGS += -DCONFIG_P2P_STRICT 394endif 395ifdef CONFIG_WIFI_DISPLAY 396CFLAGS += -DCONFIG_WIFI_DISPLAY 397OBJS += wifi_display.o 398endif 399endif 400 401ifdef CONFIG_PASN 402CFLAGS += -DCONFIG_PASN 403CFLAGS += -DCONFIG_PTKSA_CACHE 404NEED_HMAC_SHA256_KDF=y 405NEED_HMAC_SHA384_KDF=y 406NEED_SHA256=y 407NEED_SHA384=y 408OBJS += ../src/common/ptksa_cache.o 409OBJS += pasn_supplicant.o 410endif 411 412ifdef CONFIG_HS20 413OBJS += hs20_supplicant.o 414CFLAGS += -DCONFIG_HS20 415CONFIG_INTERWORKING=y 416endif 417 418ifdef CONFIG_INTERWORKING 419OBJS += interworking.o 420CFLAGS += -DCONFIG_INTERWORKING 421NEED_GAS=y 422endif 423 424ifdef CONFIG_NO_ROAMING 425CFLAGS += -DCONFIG_NO_ROAMING 426endif 427 428include ../src/drivers/drivers.mak 429ifdef CONFIG_AP 430OBJS_d += $(DRV_BOTH_OBJS) 431CFLAGS += $(DRV_BOTH_CFLAGS) 432LDFLAGS += $(DRV_BOTH_LDFLAGS) 433LIBS += $(DRV_BOTH_LIBS) 434else 435NEED_AP_MLME= 436OBJS_d += $(DRV_WPA_OBJS) 437CFLAGS += $(DRV_WPA_CFLAGS) 438LDFLAGS += $(DRV_WPA_LDFLAGS) 439LIBS += $(DRV_WPA_LIBS) 440endif 441 442ifndef CONFIG_L2_PACKET 443CONFIG_L2_PACKET=linux 444endif 445 446OBJS_l2 += ../src/l2_packet/l2_packet_$(CONFIG_L2_PACKET).o 447 448ifeq ($(CONFIG_L2_PACKET), pcap) 449ifdef CONFIG_WINPCAP 450CFLAGS += -DCONFIG_WINPCAP 451LIBS += -lwpcap -lpacket 452LIBS_w += -lwpcap 453else 454LIBS += -ldnet -lpcap 455endif 456endif 457 458ifeq ($(CONFIG_L2_PACKET), winpcap) 459LIBS += -lwpcap -lpacket 460LIBS_w += -lwpcap 461endif 462 463ifeq ($(CONFIG_L2_PACKET), freebsd) 464LIBS += -lpcap 465endif 466 467ifdef CONFIG_ERP 468CFLAGS += -DCONFIG_ERP 469NEED_HMAC_SHA256_KDF=y 470endif 471 472ifdef CONFIG_EAP_TLS 473# EAP-TLS 474ifeq ($(CONFIG_EAP_TLS), dyn) 475CFLAGS += -DEAP_TLS_DYNAMIC 476EAPDYN += eap_tls.so 477else 478CFLAGS += -DEAP_TLS 479OBJS += ../src/eap_peer/eap_tls.o 480endif 481TLS_FUNCS=y 482CONFIG_IEEE8021X_EAPOL=y 483endif 484 485ifdef CONFIG_EAP_UNAUTH_TLS 486# EAP-UNAUTH-TLS 487CFLAGS += -DEAP_UNAUTH_TLS 488ifndef CONFIG_EAP_TLS 489OBJS += ../src/eap_peer/eap_tls.o 490TLS_FUNCS=y 491endif 492CONFIG_IEEE8021X_EAPOL=y 493endif 494 495ifdef CONFIG_EAP_PEAP 496# EAP-PEAP 497SRC_EAP_PEAP = ../src/eap_peer/eap_peap.c ../src/eap_common/eap_peap_common.c 498ifeq ($(CONFIG_EAP_PEAP), dyn) 499CFLAGS += -DEAP_PEAP_DYNAMIC 500EAPDYN += eap_peap.so 501else 502CFLAGS += -DEAP_PEAP 503OBJS += $(patsubst %.c, %.o, $(SRC_EAP_PEAP)) 504endif 505TLS_FUNCS=y 506CONFIG_IEEE8021X_EAPOL=y 507endif 508 509ifdef CONFIG_EAP_TTLS 510# EAP-TTLS 511ifeq ($(CONFIG_EAP_TTLS), dyn) 512CFLAGS += -DEAP_TTLS_DYNAMIC 513EAPDYN += eap_ttls.so 514else 515CFLAGS += -DEAP_TTLS 516OBJS += ../src/eap_peer/eap_ttls.o 517endif 518TLS_FUNCS=y 519ifndef CONFIG_FIPS 520MS_FUNCS=y 521CHAP=y 522endif 523CONFIG_IEEE8021X_EAPOL=y 524endif 525 526ifdef CONFIG_EAP_MD5 527# EAP-MD5 528ifeq ($(CONFIG_EAP_MD5), dyn) 529CFLAGS += -DEAP_MD5_DYNAMIC 530EAPDYN += eap_md5.so 531else 532CFLAGS += -DEAP_MD5 533OBJS += ../src/eap_peer/eap_md5.o 534endif 535CHAP=y 536CONFIG_IEEE8021X_EAPOL=y 537endif 538 539# backwards compatibility for old spelling 540ifdef CONFIG_MSCHAPV2 541ifndef CONFIG_EAP_MSCHAPV2 542CONFIG_EAP_MSCHAPV2=y 543endif 544endif 545 546ifdef CONFIG_EAP_MSCHAPV2 547# EAP-MSCHAPv2 548SRC_EAP_MSCHAPV2 = ../src/eap_peer/eap_mschapv2.c ../src/eap_peer/mschapv2.c 549ifeq ($(CONFIG_EAP_MSCHAPV2), dyn) 550CFLAGS += -DEAP_MSCHAPv2_DYNAMIC 551EAPDYN += eap_mschapv2.so 552else 553CFLAGS += -DEAP_MSCHAPv2 554OBJS += $(patsubst %.c, %.o, $(SRC_EAP_MSCHAPV2)) 555endif 556MS_FUNCS=y 557CONFIG_IEEE8021X_EAPOL=y 558endif 559 560ifdef CONFIG_EAP_GTC 561# EAP-GTC 562ifeq ($(CONFIG_EAP_GTC), dyn) 563CFLAGS += -DEAP_GTC_DYNAMIC 564EAPDYN += eap_gtc.so 565else 566CFLAGS += -DEAP_GTC 567OBJS += ../src/eap_peer/eap_gtc.o 568endif 569CONFIG_IEEE8021X_EAPOL=y 570endif 571 572ifdef CONFIG_EAP_OTP 573# EAP-OTP 574ifeq ($(CONFIG_EAP_OTP), dyn) 575CFLAGS += -DEAP_OTP_DYNAMIC 576EAPDYN += eap_otp.so 577else 578CFLAGS += -DEAP_OTP 579OBJS += ../src/eap_peer/eap_otp.o 580endif 581CONFIG_IEEE8021X_EAPOL=y 582endif 583 584ifdef CONFIG_EAP_SIM 585# EAP-SIM 586ifeq ($(CONFIG_EAP_SIM), dyn) 587CFLAGS += -DEAP_SIM_DYNAMIC 588EAPDYN += eap_sim.so 589else 590CFLAGS += -DEAP_SIM 591OBJS += ../src/eap_peer/eap_sim.o 592endif 593CONFIG_IEEE8021X_EAPOL=y 594CONFIG_EAP_SIM_COMMON=y 595NEED_AES_CBC=y 596endif 597 598ifdef CONFIG_EAP_LEAP 599# EAP-LEAP 600ifeq ($(CONFIG_EAP_LEAP), dyn) 601CFLAGS += -DEAP_LEAP_DYNAMIC 602EAPDYN += eap_leap.so 603else 604CFLAGS += -DEAP_LEAP 605OBJS += ../src/eap_peer/eap_leap.o 606endif 607MS_FUNCS=y 608CONFIG_IEEE8021X_EAPOL=y 609endif 610 611ifdef CONFIG_EAP_PSK 612# EAP-PSK 613SRC_EAP_PSK = ../src/eap_peer/eap_psk.c ../src/eap_common/eap_psk_common.c 614ifeq ($(CONFIG_EAP_PSK), dyn) 615CFLAGS += -DEAP_PSK_DYNAMIC 616EAPDYN += eap_psk.so 617else 618CFLAGS += -DEAP_PSK 619OBJS += $(patsubst %.c, %.o, $(SRC_EAP_PSK)) 620endif 621CONFIG_IEEE8021X_EAPOL=y 622NEED_AES=y 623NEED_AES_ENCBLOCK=y 624NEED_AES_EAX=y 625endif 626 627ifdef CONFIG_EAP_AKA 628# EAP-AKA 629ifeq ($(CONFIG_EAP_AKA), dyn) 630CFLAGS += -DEAP_AKA_DYNAMIC 631EAPDYN += eap_aka.so 632else 633CFLAGS += -DEAP_AKA 634OBJS += ../src/eap_peer/eap_aka.o 635endif 636CONFIG_IEEE8021X_EAPOL=y 637CONFIG_EAP_SIM_COMMON=y 638NEED_AES_CBC=y 639endif 640 641ifdef CONFIG_EAP_PROXY 642CFLAGS += -DCONFIG_EAP_PROXY 643OBJS += ../src/eap_peer/eap_proxy_$(CONFIG_EAP_PROXY).o 644include eap_proxy_$(CONFIG_EAP_PROXY).mak 645CONFIG_IEEE8021X_EAPOL=y 646endif 647 648ifdef CONFIG_EAP_AKA_PRIME 649# EAP-AKA' 650ifeq ($(CONFIG_EAP_AKA_PRIME), dyn) 651CFLAGS += -DEAP_AKA_PRIME_DYNAMIC 652else 653CFLAGS += -DEAP_AKA_PRIME 654endif 655endif 656 657ifdef CONFIG_EAP_SIM_COMMON 658OBJS += ../src/eap_common/eap_sim_common.o 659NEED_AES=y 660NEED_FIPS186_2_PRF=y 661endif 662 663ifdef CONFIG_EAP_FAST 664# EAP-FAST 665SRC_EAP_FAST = ../src/eap_peer/eap_fast.c ../src/eap_peer/eap_fast_pac.c 666SRC_EAP_FAST += ../src/eap_common/eap_fast_common.c 667ifeq ($(CONFIG_EAP_FAST), dyn) 668CFLAGS += -DEAP_FAST_DYNAMIC 669EAPDYN += eap_fast.so 670else 671CFLAGS += -DEAP_FAST 672OBJS += $(patsubst %.c, %.o, $(SRC_EAP_FAST)) 673endif 674TLS_FUNCS=y 675CONFIG_IEEE8021X_EAPOL=y 676NEED_T_PRF=y 677endif 678 679ifdef CONFIG_EAP_TEAP 680# EAP-TEAP 681SRC_EAP_TEAP = ../src/eap_peer/eap_teap.c ../src/eap_peer/eap_teap_pac.c 682SRC_EAP_TEAP += ../src/eap_common/eap_teap_common.c 683ifeq ($(CONFIG_EAP_TEAP), dyn) 684CFLAGS += -DEAP_TEAP_DYNAMIC 685EAPDYN += eap_teap.so 686else 687CFLAGS += -DEAP_TEAP 688OBJS += $(patsubst %.c, %.o, $(SRC_EAP_TEAP)) 689endif 690TLS_FUNCS=y 691CONFIG_IEEE8021X_EAPOL=y 692NEED_T_PRF=y 693NEED_SHA384=y 694NEED_TLS_PRF_SHA256=y 695NEED_TLS_PRF_SHA384=y 696endif 697 698ifdef CONFIG_EAP_PAX 699# EAP-PAX 700SRC_EAP_PAX = ../src/eap_peer/eap_pax.c ../src/eap_common/eap_pax_common.c 701ifeq ($(CONFIG_EAP_PAX), dyn) 702CFLAGS += -DEAP_PAX_DYNAMIC 703EAPDYN += eap_pax.so 704else 705CFLAGS += -DEAP_PAX 706OBJS += $(patsubst %.c, %.o, $(SRC_EAP_PAX)) 707endif 708CONFIG_IEEE8021X_EAPOL=y 709endif 710 711ifdef CONFIG_EAP_SAKE 712# EAP-SAKE 713SRC_EAP_SAKE = ../src/eap_peer/eap_sake.c ../src/eap_common/eap_sake_common.c 714ifeq ($(CONFIG_EAP_SAKE), dyn) 715CFLAGS += -DEAP_SAKE_DYNAMIC 716EAPDYN += eap_sake.so 717else 718CFLAGS += -DEAP_SAKE 719OBJS += $(patsubst %.c, %.o, $(SRC_EAP_SAKE)) 720endif 721CONFIG_IEEE8021X_EAPOL=y 722endif 723 724ifdef CONFIG_EAP_GPSK 725# EAP-GPSK 726SRC_EAP_GPSK = ../src/eap_peer/eap_gpsk.c ../src/eap_common/eap_gpsk_common.c 727ifeq ($(CONFIG_EAP_GPSK), dyn) 728CFLAGS += -DEAP_GPSK_DYNAMIC 729EAPDYN += eap_gpsk.so 730else 731CFLAGS += -DEAP_GPSK 732OBJS += $(patsubst %.c, %.o, $(SRC_EAP_GPSK)) 733endif 734CONFIG_IEEE8021X_EAPOL=y 735ifdef CONFIG_EAP_GPSK_SHA256 736CFLAGS += -DEAP_GPSK_SHA256 737endif 738endif 739 740ifdef CONFIG_EAP_PWD 741CFLAGS += -DEAP_PWD 742ifeq ($(CONFIG_TLS), wolfssl) 743CFLAGS += -DCONFIG_ECC 744endif 745OBJS += ../src/eap_peer/eap_pwd.o ../src/eap_common/eap_pwd_common.o 746CONFIG_IEEE8021X_EAPOL=y 747NEED_ECC=y 748NEED_DRAGONFLY=y 749endif 750 751ifdef CONFIG_EAP_EKE 752# EAP-EKE 753SRC_EAP_EKE = ../src/eap_peer/eap_eke.c ../src/eap_common/eap_eke_common.c 754ifeq ($(CONFIG_EAP_EKE), dyn) 755CFLAGS += -DEAP_EKE_DYNAMIC 756EAPDYN += eap_eke.so 757else 758CFLAGS += -DEAP_EKE 759OBJS += $(patsubst %.c, %.o, $(SRC_EAP_EKE)) 760endif 761CONFIG_IEEE8021X_EAPOL=y 762NEED_DH_GROUPS=y 763NEED_DH_GROUPS_ALL=y 764NEED_AES_CBC=y 765endif 766 767ifdef CONFIG_WPS 768# EAP-WSC 769CFLAGS += -DCONFIG_WPS -DEAP_WSC 770OBJS += wps_supplicant.o 771OBJS += ../src/utils/uuid.o 772OBJS += ../src/eap_peer/eap_wsc.o ../src/eap_common/eap_wsc_common.o 773OBJS += ../src/wps/wps.o 774OBJS += ../src/wps/wps_common.o 775OBJS += ../src/wps/wps_attr_parse.o 776OBJS += ../src/wps/wps_attr_build.o 777OBJS += ../src/wps/wps_attr_process.o 778OBJS += ../src/wps/wps_dev_attr.o 779OBJS += ../src/wps/wps_enrollee.o 780OBJS += ../src/wps/wps_registrar.o 781CONFIG_IEEE8021X_EAPOL=y 782NEED_DH_GROUPS=y 783NEED_BASE64=y 784NEED_AES_CBC=y 785NEED_MODEXP=y 786 787ifdef CONFIG_WPS_NFC 788CFLAGS += -DCONFIG_WPS_NFC 789OBJS += ../src/wps/ndef.o 790NEED_WPS_OOB=y 791endif 792 793ifdef NEED_WPS_OOB 794CFLAGS += -DCONFIG_WPS_OOB 795endif 796 797ifdef CONFIG_WPS_ER 798CONFIG_WPS_UPNP=y 799CFLAGS += -DCONFIG_WPS_ER 800OBJS += ../src/wps/wps_er.o 801OBJS += ../src/wps/wps_er_ssdp.o 802endif 803 804ifdef CONFIG_WPS_UPNP 805CFLAGS += -DCONFIG_WPS_UPNP 806OBJS += ../src/wps/wps_upnp.o 807OBJS += ../src/wps/wps_upnp_ssdp.o 808OBJS += ../src/wps/wps_upnp_web.o 809OBJS += ../src/wps/wps_upnp_event.o 810OBJS += ../src/wps/wps_upnp_ap.o 811OBJS += ../src/wps/upnp_xml.o 812OBJS += ../src/wps/httpread.o 813OBJS += ../src/wps/http_client.o 814OBJS += ../src/wps/http_server.o 815endif 816 817ifdef CONFIG_WPS_STRICT 818CFLAGS += -DCONFIG_WPS_STRICT 819OBJS += ../src/wps/wps_validate.o 820endif 821 822ifdef CONFIG_WPS_TESTING 823CFLAGS += -DCONFIG_WPS_TESTING 824endif 825 826ifdef CONFIG_WPS_REG_DISABLE_OPEN 827CFLAGS += -DCONFIG_WPS_REG_DISABLE_OPEN 828endif 829 830endif 831 832ifdef CONFIG_EAP_IKEV2 833# EAP-IKEv2 834SRC_EAP_IKEV2 = ../src/eap_peer/eap_ikev2.c 835SRC_EAP_IKEV2 += ../src/eap_peer/ikev2.c 836SRC_EAP_IKEV2 += ../src/eap_common/eap_ikev2_common.c 837SRC_EAP_IKEV2 += ../src/eap_common/ikev2_common.c 838ifeq ($(CONFIG_EAP_IKEV2), dyn) 839CFLAGS += -DEAP_IKEV2_DYNAMIC 840EAPDYN += eap_ikev2.so 841else 842CFLAGS += -DEAP_IKEV2 843OBJS += $(patsubst %.c, %.o, $(SRC_EAP_IKEV2)) 844endif 845CONFIG_IEEE8021X_EAPOL=y 846NEED_DH_GROUPS=y 847NEED_DH_GROUPS_ALL=y 848NEED_MODEXP=y 849NEED_CIPHER=y 850endif 851 852ifdef CONFIG_EAP_VENDOR_TEST 853ifeq ($(CONFIG_EAP_VENDOR_TEST), dyn) 854CFLAGS += -DEAP_VENDOR_TEST_DYNAMIC 855EAPDYN += eap_vendor_test.so 856else 857CFLAGS += -DEAP_VENDOR_TEST 858OBJS += ../src/eap_peer/eap_vendor_test.o 859endif 860CONFIG_IEEE8021X_EAPOL=y 861endif 862 863ifdef CONFIG_EAP_TNC 864# EAP-TNC 865CFLAGS += -DEAP_TNC 866OBJS += ../src/eap_peer/eap_tnc.o 867OBJS += ../src/eap_peer/tncc.o 868NEED_BASE64=y 869ifndef CONFIG_NATIVE_WINDOWS 870ifndef CONFIG_DRIVER_BSD 871LIBS += -ldl 872endif 873endif 874endif 875 876ifdef CONFIG_MACSEC 877CFLAGS += -DCONFIG_MACSEC 878CONFIG_IEEE8021X_EAPOL=y 879NEED_AES_ENCBLOCK=y 880NEED_AES_UNWRAP=y 881NEED_AES_WRAP=y 882OBJS += wpas_kay.o 883OBJS += ../src/pae/ieee802_1x_cp.o 884OBJS += ../src/pae/ieee802_1x_kay.o 885OBJS += ../src/pae/ieee802_1x_key.o 886OBJS += ../src/pae/ieee802_1x_secy_ops.o 887ifdef CONFIG_AP 888OBJS += ../src/ap/wpa_auth_kay.o 889endif 890endif 891 892ifdef CONFIG_IEEE8021X_EAPOL 893# IEEE 802.1X/EAPOL state machines (e.g., for RADIUS authentication) 894CFLAGS += -DIEEE8021X_EAPOL 895OBJS += ../src/eapol_supp/eapol_supp_sm.o 896OBJS += ../src/eap_peer/eap.o ../src/eap_peer/eap_methods.o 897NEED_EAP_COMMON=y 898ifdef CONFIG_DYNAMIC_EAP_METHODS 899CFLAGS += -DCONFIG_DYNAMIC_EAP_METHODS 900LIBS += -ldl -rdynamic 901endif 902endif 903 904ifdef CONFIG_AP 905NEED_EAP_COMMON=y 906NEED_RSN_AUTHENTICATOR=y 907CFLAGS += -DCONFIG_AP 908OBJS += ap.o 909CFLAGS += -DCONFIG_NO_RADIUS 910CFLAGS += -DCONFIG_NO_ACCOUNTING 911CFLAGS += -DCONFIG_NO_VLAN 912OBJS += ../src/ap/hostapd.o 913OBJS += ../src/ap/wpa_auth_glue.o 914OBJS += ../src/ap/utils.o 915OBJS += ../src/ap/authsrv.o 916OBJS += ../src/ap/ap_config.o 917OBJS += ../src/ap/sta_info.o 918OBJS += ../src/ap/tkip_countermeasures.o 919OBJS += ../src/ap/ap_mlme.o 920OBJS += ../src/ap/ieee802_1x.o 921OBJS += ../src/eapol_auth/eapol_auth_sm.o 922OBJS += ../src/ap/ieee802_11_auth.o 923OBJS += ../src/ap/ieee802_11_shared.o 924OBJS += ../src/ap/drv_callbacks.o 925OBJS += ../src/ap/ap_drv_ops.o 926OBJS += ../src/ap/beacon.o 927OBJS += ../src/ap/bss_load.o 928OBJS += ../src/ap/eap_user_db.o 929OBJS += ../src/ap/neighbor_db.o 930OBJS += ../src/ap/rrm.o 931OBJS += ../src/ap/ieee802_11_ht.o 932ifdef CONFIG_IEEE80211AC 933OBJS += ../src/ap/ieee802_11_vht.o 934endif 935ifdef CONFIG_IEEE80211AX 936OBJS += ../src/ap/ieee802_11_he.o 937endif 938ifdef CONFIG_WNM_AP 939CFLAGS += -DCONFIG_WNM_AP 940OBJS += ../src/ap/wnm_ap.o 941endif 942ifdef CONFIG_MBO 943OBJS += ../src/ap/mbo_ap.o 944endif 945ifdef CONFIG_FILS 946OBJS += ../src/ap/fils_hlp.o 947endif 948ifdef CONFIG_CTRL_IFACE 949OBJS += ../src/ap/ctrl_iface_ap.o 950endif 951 952CFLAGS += -DEAP_SERVER -DEAP_SERVER_IDENTITY 953OBJS += ../src/eap_server/eap_server.o 954OBJS += ../src/eap_server/eap_server_identity.o 955OBJS += ../src/eap_server/eap_server_methods.o 956 957ifdef CONFIG_IEEE80211AC 958CFLAGS += -DCONFIG_IEEE80211AC 959endif 960ifdef CONFIG_IEEE80211AX 961CFLAGS += -DCONFIG_IEEE80211AX 962endif 963 964ifdef NEED_AP_MLME 965OBJS += ../src/ap/wmm.o 966OBJS += ../src/ap/ap_list.o 967OBJS += ../src/ap/ieee802_11.o 968OBJS += ../src/ap/hw_features.o 969OBJS += ../src/ap/dfs.o 970CFLAGS += -DNEED_AP_MLME 971endif 972ifdef CONFIG_WPS 973CFLAGS += -DEAP_SERVER_WSC 974OBJS += ../src/ap/wps_hostapd.o 975OBJS += ../src/eap_server/eap_server_wsc.o 976endif 977ifdef CONFIG_DPP 978OBJS += ../src/ap/dpp_hostapd.o 979OBJS += ../src/ap/gas_query_ap.o 980NEED_AP_GAS_SERV=y 981endif 982ifdef CONFIG_INTERWORKING 983NEED_AP_GAS_SERV=y 984endif 985ifdef NEED_AP_GAS_SERV 986OBJS += ../src/ap/gas_serv.o 987endif 988ifdef CONFIG_HS20 989OBJS += ../src/ap/hs20.o 990endif 991endif 992 993ifdef CONFIG_MBO 994OBJS += mbo.o 995CFLAGS += -DCONFIG_MBO 996endif 997 998ifdef NEED_RSN_AUTHENTICATOR 999CFLAGS += -DCONFIG_NO_RADIUS 1000NEED_AES_WRAP=y 1001OBJS += ../src/ap/wpa_auth.o 1002OBJS += ../src/ap/wpa_auth_ie.o 1003OBJS += ../src/ap/pmksa_cache_auth.o 1004endif 1005 1006ifdef CONFIG_ACS 1007CFLAGS += -DCONFIG_ACS 1008OBJS += ../src/ap/acs.o 1009LIBS += -lm 1010endif 1011 1012ifdef CONFIG_PCSC 1013# PC/SC interface for smartcards (USIM, GSM SIM) 1014CFLAGS += -DPCSC_FUNCS -I/usr/include/PCSC 1015OBJS += ../src/utils/pcsc_funcs.o 1016ifdef CONFIG_NATIVE_WINDOWS 1017#Once MinGW gets support for WinScard, -lwinscard could be used instead of the 1018#dynamic symbol loading that is now used in pcsc_funcs.c 1019#LIBS += -lwinscard 1020else 1021ifdef CONFIG_OSX 1022LIBS += -framework PCSC 1023else 1024LIBS += $(shell $(PKG_CONFIG) --libs libpcsclite) 1025endif 1026endif 1027endif 1028 1029ifdef CONFIG_SIM_SIMULATOR 1030CFLAGS += -DCONFIG_SIM_SIMULATOR 1031NEED_MILENAGE=y 1032endif 1033 1034ifdef CONFIG_USIM_SIMULATOR 1035CFLAGS += -DCONFIG_USIM_SIMULATOR 1036NEED_MILENAGE=y 1037endif 1038 1039ifdef NEED_MILENAGE 1040OBJS += ../src/crypto/milenage.o 1041NEED_AES_ENCBLOCK=y 1042endif 1043 1044ifdef CONFIG_PKCS12 1045CFLAGS += -DPKCS12_FUNCS 1046endif 1047 1048ifdef CONFIG_SMARTCARD 1049CFLAGS += -DCONFIG_SMARTCARD 1050endif 1051 1052ifdef NEED_DRAGONFLY 1053OBJS += ../src/common/dragonfly.o 1054endif 1055 1056ifdef MS_FUNCS 1057OBJS += ../src/crypto/ms_funcs.o 1058NEED_DES=y 1059NEED_MD4=y 1060endif 1061 1062ifdef CHAP 1063OBJS += ../src/eap_common/chap.o 1064endif 1065 1066ifdef TLS_FUNCS 1067NEED_DES=y 1068# Shared TLS functions (needed for EAP_TLS, EAP_PEAP, EAP_TTLS, EAP_FAST, and 1069# EAP_TEAP) 1070OBJS += ../src/eap_peer/eap_tls_common.o 1071ifndef CONFIG_FIPS 1072NEED_TLS_PRF=y 1073NEED_SHA1=y 1074NEED_MD5=y 1075endif 1076endif 1077 1078ifndef CONFIG_TLS 1079CONFIG_TLS=openssl 1080endif 1081 1082ifdef CONFIG_TLSV11 1083CFLAGS += -DCONFIG_TLSV11 1084endif 1085 1086ifdef CONFIG_TLSV12 1087CFLAGS += -DCONFIG_TLSV12 1088endif 1089 1090ifeq ($(CONFIG_TLS), wolfssl) 1091ifdef TLS_FUNCS 1092CFLAGS += -DWOLFSSL_DER_LOAD 1093OBJS += ../src/crypto/tls_wolfssl.o 1094endif 1095OBJS += ../src/crypto/crypto_wolfssl.o 1096OBJS_p += ../src/crypto/crypto_wolfssl.o 1097ifdef NEED_FIPS186_2_PRF 1098OBJS += ../src/crypto/fips_prf_wolfssl.o 1099endif 1100NEED_TLS_PRF_SHA256=y 1101LIBS += -lwolfssl -lm 1102LIBS_p += -lwolfssl -lm 1103endif 1104 1105ifeq ($(CONFIG_TLS), openssl) 1106ifdef TLS_FUNCS 1107CFLAGS += -DEAP_TLS_OPENSSL 1108OBJS += ../src/crypto/tls_openssl.o 1109OBJS += ../src/crypto/tls_openssl_ocsp.o 1110LIBS += -lssl 1111endif 1112OBJS += ../src/crypto/crypto_openssl.o 1113OBJS_p += ../src/crypto/crypto_openssl.o 1114OBJS_priv += ../src/crypto/crypto_openssl.o 1115ifdef NEED_FIPS186_2_PRF 1116OBJS += ../src/crypto/fips_prf_openssl.o 1117endif 1118NEED_TLS_PRF_SHA256=y 1119LIBS += -lcrypto 1120LIBS_p += -lcrypto 1121ifdef CONFIG_TLS_ADD_DL 1122LIBS += -ldl 1123LIBS_p += -ldl 1124endif 1125ifndef CONFIG_TLS_DEFAULT_CIPHERS 1126CONFIG_TLS_DEFAULT_CIPHERS = "DEFAULT:!EXP:!LOW" 1127endif 1128CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONFIG_TLS_DEFAULT_CIPHERS)\" 1129endif 1130 1131ifeq ($(CONFIG_TLS), gnutls) 1132ifndef CONFIG_CRYPTO 1133# default to libgcrypt 1134CONFIG_CRYPTO=gnutls 1135endif 1136ifdef TLS_FUNCS 1137OBJS += ../src/crypto/tls_gnutls.o 1138LIBS += -lgnutls -lgpg-error 1139endif 1140OBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o 1141OBJS_p += ../src/crypto/crypto_$(CONFIG_CRYPTO).o 1142OBJS_priv += ../src/crypto/crypto_$(CONFIG_CRYPTO).o 1143ifdef NEED_FIPS186_2_PRF 1144OBJS += ../src/crypto/fips_prf_internal.o 1145SHA1OBJS += ../src/crypto/sha1-internal.o 1146endif 1147ifeq ($(CONFIG_CRYPTO), gnutls) 1148LIBS += -lgcrypt 1149LIBS_p += -lgcrypt 1150CONFIG_INTERNAL_RC4=y 1151CONFIG_INTERNAL_DH_GROUP5=y 1152endif 1153ifeq ($(CONFIG_CRYPTO), nettle) 1154LIBS += -lnettle -lgmp 1155LIBS_p += -lnettle -lgmp 1156CONFIG_INTERNAL_RC4=y 1157CONFIG_INTERNAL_DH_GROUP5=y 1158endif 1159endif 1160 1161ifeq ($(CONFIG_TLS), internal) 1162ifndef CONFIG_CRYPTO 1163CONFIG_CRYPTO=internal 1164endif 1165ifdef TLS_FUNCS 1166OBJS += ../src/crypto/crypto_internal-rsa.o 1167OBJS += ../src/crypto/tls_internal.o 1168OBJS += ../src/tls/tlsv1_common.o 1169OBJS += ../src/tls/tlsv1_record.o 1170OBJS += ../src/tls/tlsv1_cred.o 1171OBJS += ../src/tls/tlsv1_client.o 1172OBJS += ../src/tls/tlsv1_client_write.o 1173OBJS += ../src/tls/tlsv1_client_read.o 1174OBJS += ../src/tls/tlsv1_client_ocsp.o 1175OBJS += ../src/tls/rsa.o 1176OBJS += ../src/tls/x509v3.o 1177OBJS += ../src/tls/pkcs1.o 1178OBJS += ../src/tls/pkcs5.o 1179OBJS += ../src/tls/pkcs8.o 1180NEED_ASN1=y 1181NEED_BASE64=y 1182NEED_TLS_PRF=y 1183ifdef CONFIG_TLSV12 1184NEED_TLS_PRF_SHA256=y 1185endif 1186NEED_MODEXP=y 1187NEED_CIPHER=y 1188CFLAGS += -DCONFIG_TLS_INTERNAL_CLIENT 1189endif 1190ifdef NEED_CIPHER 1191NEED_DES=y 1192OBJS += ../src/crypto/crypto_internal-cipher.o 1193endif 1194ifdef NEED_MODEXP 1195OBJS += ../src/crypto/crypto_internal-modexp.o 1196OBJS += ../src/tls/bignum.o 1197endif 1198ifeq ($(CONFIG_CRYPTO), libtomcrypt) 1199OBJS += ../src/crypto/crypto_libtomcrypt.o 1200OBJS_p += ../src/crypto/crypto_libtomcrypt.o 1201LIBS += -ltomcrypt -ltfm 1202LIBS_p += -ltomcrypt -ltfm 1203CONFIG_INTERNAL_SHA256=y 1204CONFIG_INTERNAL_RC4=y 1205CONFIG_INTERNAL_DH_GROUP5=y 1206endif 1207ifeq ($(CONFIG_CRYPTO), internal) 1208OBJS += ../src/crypto/crypto_internal.o 1209OBJS_p += ../src/crypto/crypto_internal.o 1210NEED_AES_ENC=y 1211CFLAGS += -DCONFIG_CRYPTO_INTERNAL 1212ifdef CONFIG_INTERNAL_LIBTOMMATH 1213CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH 1214ifdef CONFIG_INTERNAL_LIBTOMMATH_FAST 1215CFLAGS += -DLTM_FAST 1216endif 1217else 1218LIBS += -ltommath 1219LIBS_p += -ltommath 1220endif 1221CONFIG_INTERNAL_AES=y 1222CONFIG_INTERNAL_DES=y 1223CONFIG_INTERNAL_SHA1=y 1224CONFIG_INTERNAL_MD4=y 1225CONFIG_INTERNAL_MD5=y 1226CONFIG_INTERNAL_SHA256=y 1227CONFIG_INTERNAL_SHA384=y 1228CONFIG_INTERNAL_SHA512=y 1229CONFIG_INTERNAL_RC4=y 1230CONFIG_INTERNAL_DH_GROUP5=y 1231endif 1232ifeq ($(CONFIG_CRYPTO), cryptoapi) 1233OBJS += ../src/crypto/crypto_cryptoapi.o 1234OBJS_p += ../src/crypto/crypto_cryptoapi.o 1235CFLAGS += -DCONFIG_CRYPTO_CRYPTOAPI 1236CONFIG_INTERNAL_SHA256=y 1237CONFIG_INTERNAL_RC4=y 1238endif 1239endif 1240 1241ifeq ($(CONFIG_TLS), linux) 1242OBJS += ../src/crypto/crypto_linux.o 1243OBJS_p += ../src/crypto/crypto_linux.o 1244ifdef TLS_FUNCS 1245OBJS += ../src/crypto/crypto_internal-rsa.o 1246OBJS += ../src/crypto/tls_internal.o 1247OBJS += ../src/tls/tlsv1_common.o 1248OBJS += ../src/tls/tlsv1_record.o 1249OBJS += ../src/tls/tlsv1_cred.o 1250OBJS += ../src/tls/tlsv1_client.o 1251OBJS += ../src/tls/tlsv1_client_write.o 1252OBJS += ../src/tls/tlsv1_client_read.o 1253OBJS += ../src/tls/tlsv1_client_ocsp.o 1254OBJS += ../src/tls/rsa.o 1255OBJS += ../src/tls/x509v3.o 1256OBJS += ../src/tls/pkcs1.o 1257OBJS += ../src/tls/pkcs5.o 1258OBJS += ../src/tls/pkcs8.o 1259NEED_ASN1=y 1260NEED_BASE64=y 1261NEED_TLS_PRF=y 1262ifdef CONFIG_TLSV12 1263NEED_TLS_PRF_SHA256=y 1264endif 1265NEED_MODEXP=y 1266NEED_CIPHER=y 1267CFLAGS += -DCONFIG_TLS_INTERNAL_CLIENT 1268endif 1269ifdef NEED_MODEXP 1270OBJS += ../src/crypto/crypto_internal-modexp.o 1271OBJS += ../src/tls/bignum.o 1272CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH 1273CFLAGS += -DLTM_FAST 1274endif 1275CONFIG_INTERNAL_DH_GROUP5=y 1276ifdef NEED_FIPS186_2_PRF 1277OBJS += ../src/crypto/fips_prf_internal.o 1278OBJS += ../src/crypto/sha1-internal.o 1279endif 1280endif 1281 1282ifeq ($(CONFIG_TLS), none) 1283ifdef TLS_FUNCS 1284OBJS += ../src/crypto/tls_none.o 1285CFLAGS += -DEAP_TLS_NONE 1286CONFIG_INTERNAL_AES=y 1287CONFIG_INTERNAL_SHA1=y 1288CONFIG_INTERNAL_MD5=y 1289endif 1290OBJS += ../src/crypto/crypto_none.o 1291OBJS_p += ../src/crypto/crypto_none.o 1292CONFIG_INTERNAL_SHA256=y 1293CONFIG_INTERNAL_RC4=y 1294endif 1295 1296ifdef TLS_FUNCS 1297ifdef CONFIG_SMARTCARD 1298ifndef CONFIG_NATIVE_WINDOWS 1299ifneq ($(CONFIG_L2_PACKET), freebsd) 1300LIBS += -ldl 1301endif 1302endif 1303endif 1304endif 1305 1306ifndef TLS_FUNCS 1307OBJS += ../src/crypto/tls_none.o 1308ifeq ($(CONFIG_TLS), internal) 1309CONFIG_INTERNAL_AES=y 1310CONFIG_INTERNAL_SHA1=y 1311CONFIG_INTERNAL_MD5=y 1312CONFIG_INTERNAL_RC4=y 1313endif 1314endif 1315 1316AESOBJS = # none so far (see below) 1317ifdef CONFIG_INTERNAL_AES 1318AESOBJS += ../src/crypto/aes-internal.o ../src/crypto/aes-internal-dec.o 1319endif 1320 1321ifneq ($(CONFIG_TLS), openssl) 1322ifneq ($(CONFIG_TLS), wolfssl) 1323NEED_INTERNAL_AES_WRAP=y 1324endif 1325endif 1326ifdef CONFIG_OPENSSL_INTERNAL_AES_WRAP 1327# Seems to be needed at least with BoringSSL 1328NEED_INTERNAL_AES_WRAP=y 1329CFLAGS += -DCONFIG_OPENSSL_INTERNAL_AES_WRAP 1330endif 1331ifdef CONFIG_FIPS 1332# Have to use internal AES key wrap routines to use OpenSSL EVP since the 1333# OpenSSL AES_wrap_key()/AES_unwrap_key() API is not available in FIPS mode. 1334NEED_INTERNAL_AES_WRAP=y 1335endif 1336 1337ifdef NEED_INTERNAL_AES_WRAP 1338ifneq ($(CONFIG_TLS), linux) 1339AESOBJS += ../src/crypto/aes-unwrap.o 1340endif 1341endif 1342ifdef NEED_AES_EAX 1343AESOBJS += ../src/crypto/aes-eax.o 1344NEED_AES_CTR=y 1345endif 1346ifdef NEED_AES_SIV 1347AESOBJS += ../src/crypto/aes-siv.o 1348NEED_AES_CTR=y 1349endif 1350ifdef NEED_AES_CTR 1351AESOBJS += ../src/crypto/aes-ctr.o 1352endif 1353ifdef NEED_AES_ENCBLOCK 1354AESOBJS += ../src/crypto/aes-encblock.o 1355endif 1356NEED_AES_ENC=y 1357ifdef CONFIG_OPENSSL_CMAC 1358CFLAGS += -DCONFIG_OPENSSL_CMAC 1359else 1360ifneq ($(CONFIG_TLS), linux) 1361ifneq ($(CONFIG_TLS), wolfssl) 1362AESOBJS += ../src/crypto/aes-omac1.o 1363endif 1364endif 1365endif 1366ifdef NEED_AES_WRAP 1367NEED_AES_ENC=y 1368ifdef NEED_INTERNAL_AES_WRAP 1369AESOBJS += ../src/crypto/aes-wrap.o 1370endif 1371endif 1372ifdef NEED_AES_CBC 1373NEED_AES_ENC=y 1374ifneq ($(CONFIG_TLS), openssl) 1375ifneq ($(CONFIG_TLS), linux) 1376ifneq ($(CONFIG_TLS), wolfssl) 1377AESOBJS += ../src/crypto/aes-cbc.o 1378endif 1379endif 1380endif 1381endif 1382ifdef NEED_AES_ENC 1383ifdef CONFIG_INTERNAL_AES 1384AESOBJS += ../src/crypto/aes-internal-enc.o 1385endif 1386endif 1387ifdef NEED_AES 1388OBJS += $(AESOBJS) 1389endif 1390 1391ifdef NEED_SHA1 1392ifneq ($(CONFIG_TLS), openssl) 1393ifneq ($(CONFIG_TLS), linux) 1394ifneq ($(CONFIG_TLS), gnutls) 1395ifneq ($(CONFIG_TLS), wolfssl) 1396SHA1OBJS += ../src/crypto/sha1.o 1397endif 1398endif 1399endif 1400endif 1401SHA1OBJS += ../src/crypto/sha1-prf.o 1402ifdef CONFIG_INTERNAL_SHA1 1403SHA1OBJS += ../src/crypto/sha1-internal.o 1404ifdef NEED_FIPS186_2_PRF 1405SHA1OBJS += ../src/crypto/fips_prf_internal.o 1406endif 1407endif 1408ifdef CONFIG_NO_WPA_PASSPHRASE 1409CFLAGS += -DCONFIG_NO_PBKDF2 1410else 1411ifneq ($(CONFIG_TLS), openssl) 1412ifneq ($(CONFIG_TLS), wolfssl) 1413SHA1OBJS += ../src/crypto/sha1-pbkdf2.o 1414endif 1415endif 1416endif 1417ifdef NEED_T_PRF 1418SHA1OBJS += ../src/crypto/sha1-tprf.o 1419endif 1420ifdef NEED_TLS_PRF 1421SHA1OBJS += ../src/crypto/sha1-tlsprf.o 1422endif 1423endif 1424 1425ifndef CONFIG_FIPS 1426ifneq ($(CONFIG_TLS), openssl) 1427ifneq ($(CONFIG_TLS), linux) 1428ifneq ($(CONFIG_TLS), gnutls) 1429ifneq ($(CONFIG_TLS), wolfssl) 1430MD5OBJS += ../src/crypto/md5.o 1431endif 1432endif 1433endif 1434endif 1435endif 1436ifdef NEED_MD5 1437ifdef CONFIG_INTERNAL_MD5 1438MD5OBJS += ../src/crypto/md5-internal.o 1439endif 1440OBJS += $(MD5OBJS) 1441OBJS_p += $(MD5OBJS) 1442OBJS_priv += $(MD5OBJS) 1443endif 1444 1445ifdef NEED_MD4 1446ifdef CONFIG_INTERNAL_MD4 1447OBJS += ../src/crypto/md4-internal.o 1448endif 1449endif 1450 1451DESOBJS = # none needed when not internal 1452ifdef NEED_DES 1453ifndef CONFIG_FIPS 1454CFLAGS += -DCONFIG_DES 1455endif 1456ifdef CONFIG_INTERNAL_DES 1457DESOBJS += ../src/crypto/des-internal.o 1458endif 1459endif 1460 1461ifdef CONFIG_NO_RC4 1462CFLAGS += -DCONFIG_NO_RC4 1463endif 1464 1465ifdef NEED_RC4 1466ifdef CONFIG_INTERNAL_RC4 1467ifndef CONFIG_NO_RC4 1468OBJS += ../src/crypto/rc4.o 1469endif 1470endif 1471endif 1472 1473SHA256OBJS = # none by default 1474CFLAGS += -DCONFIG_SHA256 1475ifneq ($(CONFIG_TLS), openssl) 1476ifneq ($(CONFIG_TLS), linux) 1477ifneq ($(CONFIG_TLS), gnutls) 1478ifneq ($(CONFIG_TLS), wolfssl) 1479SHA256OBJS += ../src/crypto/sha256.o 1480endif 1481endif 1482endif 1483endif 1484SHA256OBJS += ../src/crypto/sha256-prf.o 1485ifdef CONFIG_INTERNAL_SHA256 1486SHA256OBJS += ../src/crypto/sha256-internal.o 1487endif 1488ifdef CONFIG_INTERNAL_SHA384 1489CFLAGS += -DCONFIG_INTERNAL_SHA384 1490SHA256OBJS += ../src/crypto/sha384-internal.o 1491endif 1492ifdef CONFIG_INTERNAL_SHA512 1493CFLAGS += -DCONFIG_INTERNAL_SHA512 1494SHA256OBJS += ../src/crypto/sha512-internal.o 1495endif 1496ifdef NEED_TLS_PRF_SHA256 1497SHA256OBJS += ../src/crypto/sha256-tlsprf.o 1498endif 1499ifdef NEED_TLS_PRF_SHA384 1500SHA256OBJS += ../src/crypto/sha384-tlsprf.o 1501endif 1502ifdef NEED_HMAC_SHA256_KDF 1503CFLAGS += -DCONFIG_HMAC_SHA256_KDF 1504OBJS += ../src/crypto/sha256-kdf.o 1505endif 1506ifdef NEED_HMAC_SHA384_KDF 1507CFLAGS += -DCONFIG_HMAC_SHA384_KDF 1508OBJS += ../src/crypto/sha384-kdf.o 1509endif 1510ifdef NEED_HMAC_SHA512_KDF 1511CFLAGS += -DCONFIG_HMAC_SHA512_KDF 1512OBJS += ../src/crypto/sha512-kdf.o 1513endif 1514OBJS += $(SHA256OBJS) 1515ifdef NEED_SHA384 1516ifneq ($(CONFIG_TLS), openssl) 1517ifneq ($(CONFIG_TLS), linux) 1518ifneq ($(CONFIG_TLS), gnutls) 1519ifneq ($(CONFIG_TLS), wolfssl) 1520OBJS += ../src/crypto/sha384.o 1521endif 1522endif 1523endif 1524endif 1525CFLAGS += -DCONFIG_SHA384 1526OBJS += ../src/crypto/sha384-prf.o 1527endif 1528ifdef NEED_SHA512 1529ifneq ($(CONFIG_TLS), openssl) 1530ifneq ($(CONFIG_TLS), linux) 1531ifneq ($(CONFIG_TLS), gnutls) 1532ifneq ($(CONFIG_TLS), wolfssl) 1533OBJS += ../src/crypto/sha512.o 1534endif 1535endif 1536endif 1537endif 1538CFLAGS += -DCONFIG_SHA512 1539OBJS += ../src/crypto/sha512-prf.o 1540endif 1541 1542ifdef NEED_ASN1 1543OBJS += ../src/tls/asn1.o 1544endif 1545 1546ifdef NEED_DH_GROUPS 1547OBJS += ../src/crypto/dh_groups.o 1548endif 1549ifdef NEED_DH_GROUPS_ALL 1550CFLAGS += -DALL_DH_GROUPS 1551endif 1552ifdef CONFIG_INTERNAL_DH_GROUP5 1553ifdef NEED_DH_GROUPS 1554OBJS += ../src/crypto/dh_group5.o 1555endif 1556endif 1557 1558ifdef NEED_ECC 1559CFLAGS += -DCONFIG_ECC 1560endif 1561 1562ifdef CONFIG_NO_RANDOM_POOL 1563CFLAGS += -DCONFIG_NO_RANDOM_POOL 1564else 1565ifdef CONFIG_GETRANDOM 1566CFLAGS += -DCONFIG_GETRANDOM 1567endif 1568OBJS += ../src/crypto/random.o 1569endif 1570 1571ifdef CONFIG_CTRL_IFACE 1572ifeq ($(CONFIG_CTRL_IFACE), y) 1573ifdef CONFIG_NATIVE_WINDOWS 1574CONFIG_CTRL_IFACE=named_pipe 1575else 1576CONFIG_CTRL_IFACE=unix 1577endif 1578endif 1579CFLAGS += -DCONFIG_CTRL_IFACE 1580ifeq ($(CONFIG_CTRL_IFACE), unix) 1581CFLAGS += -DCONFIG_CTRL_IFACE_UNIX 1582OBJS += ../src/common/ctrl_iface_common.o 1583endif 1584ifeq ($(CONFIG_CTRL_IFACE), udp) 1585CFLAGS += -DCONFIG_CTRL_IFACE_UDP 1586endif 1587ifeq ($(CONFIG_CTRL_IFACE), udp6) 1588CONFIG_CTRL_IFACE=udp 1589CFLAGS += -DCONFIG_CTRL_IFACE_UDP 1590CFLAGS += -DCONFIG_CTRL_IFACE_UDP_IPV6 1591endif 1592ifeq ($(CONFIG_CTRL_IFACE), named_pipe) 1593CFLAGS += -DCONFIG_CTRL_IFACE_NAMED_PIPE 1594endif 1595ifeq ($(CONFIG_CTRL_IFACE), udp-remote) 1596CONFIG_CTRL_IFACE=udp 1597CFLAGS += -DCONFIG_CTRL_IFACE_UDP 1598CFLAGS += -DCONFIG_CTRL_IFACE_UDP_REMOTE 1599endif 1600ifeq ($(CONFIG_CTRL_IFACE), udp6-remote) 1601CONFIG_CTRL_IFACE=udp 1602CFLAGS += -DCONFIG_CTRL_IFACE_UDP 1603CFLAGS += -DCONFIG_CTRL_IFACE_UDP_REMOTE 1604CFLAGS += -DCONFIG_CTRL_IFACE_UDP_IPV6 1605endif 1606OBJS += ctrl_iface.o ctrl_iface_$(CONFIG_CTRL_IFACE).o 1607endif 1608 1609ifdef CONFIG_CTRL_IFACE_DBUS_NEW 1610CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_NEW 1611OBJS += dbus/dbus_dict_helpers.o 1612OBJS += dbus/dbus_new_helpers.o 1613OBJS += dbus/dbus_new.o dbus/dbus_new_handlers.o 1614OBJS += dbus/dbus_common.o 1615ifdef CONFIG_WPS 1616OBJS += dbus/dbus_new_handlers_wps.o 1617endif 1618ifdef CONFIG_P2P 1619OBJS += dbus/dbus_new_handlers_p2p.o 1620endif 1621ifndef DBUS_LIBS 1622DBUS_LIBS := $(shell $(PKG_CONFIG) --libs dbus-1) 1623endif 1624ifndef DBUS_INCLUDE 1625DBUS_INCLUDE := $(shell $(PKG_CONFIG) --cflags dbus-1) 1626endif 1627ifdef CONFIG_CTRL_IFACE_DBUS_INTRO 1628OBJS += dbus/dbus_new_introspect.o 1629CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_INTRO 1630endif 1631CFLAGS += $(DBUS_INCLUDE) 1632LIBS += $(DBUS_LIBS) 1633endif 1634 1635ifdef CONFIG_READLINE 1636OBJS_c += ../src/utils/edit_readline.o 1637LIBS_c += -lreadline -lncurses 1638else 1639ifdef CONFIG_WPA_CLI_EDIT 1640OBJS_c += ../src/utils/edit.o 1641else 1642OBJS_c += ../src/utils/edit_simple.o 1643endif 1644endif 1645 1646ifdef CONFIG_NATIVE_WINDOWS 1647CFLAGS += -DCONFIG_NATIVE_WINDOWS 1648LIBS += -lws2_32 -lgdi32 -lcrypt32 1649LIBS_c += -lws2_32 1650LIBS_p += -lws2_32 -lgdi32 1651ifeq ($(CONFIG_CRYPTO), cryptoapi) 1652LIBS_p += -lcrypt32 1653endif 1654endif 1655 1656ifdef CONFIG_NO_STDOUT_DEBUG 1657CFLAGS += -DCONFIG_NO_STDOUT_DEBUG 1658ifndef CONFIG_CTRL_IFACE 1659CFLAGS += -DCONFIG_NO_WPA_MSG 1660endif 1661endif 1662 1663ifdef CONFIG_IPV6 1664# for eapol_test only 1665CFLAGS += -DCONFIG_IPV6 1666endif 1667 1668ifdef CONFIG_NO_LINUX_PACKET_SOCKET_WAR 1669CFLAGS += -DCONFIG_NO_LINUX_PACKET_SOCKET_WAR 1670endif 1671 1672ifdef NEED_BASE64 1673OBJS += ../src/utils/base64.o 1674endif 1675 1676ifdef NEED_SME 1677OBJS += sme.o 1678CFLAGS += -DCONFIG_SME 1679endif 1680 1681OBJS += ../src/common/ieee802_11_common.o 1682OBJS += ../src/common/hw_features_common.o 1683 1684ifdef NEED_EAP_COMMON 1685OBJS += ../src/eap_common/eap_common.o 1686endif 1687 1688ifndef CONFIG_MAIN 1689CONFIG_MAIN=main 1690endif 1691 1692ifdef CONFIG_DEBUG_SYSLOG 1693CFLAGS += -DCONFIG_DEBUG_SYSLOG 1694ifdef CONFIG_DEBUG_SYSLOG_FACILITY 1695CFLAGS += -DLOG_HOSTAPD="$(CONFIG_DEBUG_SYSLOG_FACILITY)" 1696endif 1697endif 1698 1699ifdef CONFIG_DEBUG_LINUX_TRACING 1700CFLAGS += -DCONFIG_DEBUG_LINUX_TRACING 1701endif 1702 1703ifdef CONFIG_DEBUG_FILE 1704CFLAGS += -DCONFIG_DEBUG_FILE 1705endif 1706 1707ifdef CONFIG_DELAYED_MIC_ERROR_REPORT 1708CFLAGS += -DCONFIG_DELAYED_MIC_ERROR_REPORT 1709endif 1710 1711ifdef CONFIG_FIPS 1712CFLAGS += -DCONFIG_FIPS 1713ifneq ($(CONFIG_TLS), openssl) 1714ifneq ($(CONFIG_TLS), wolfssl) 1715$(error CONFIG_FIPS=y requires CONFIG_TLS=openssl) 1716endif 1717endif 1718endif 1719 1720OBJS += $(SHA1OBJS) $(DESOBJS) 1721 1722OBJS_p += $(SHA1OBJS) 1723OBJS_p += $(SHA256OBJS) 1724OBJS_priv += $(SHA1OBJS) 1725 1726ifdef CONFIG_BGSCAN_SIMPLE 1727CFLAGS += -DCONFIG_BGSCAN_SIMPLE 1728OBJS += bgscan_simple.o 1729NEED_BGSCAN=y 1730endif 1731 1732ifdef CONFIG_BGSCAN_LEARN 1733CFLAGS += -DCONFIG_BGSCAN_LEARN 1734OBJS += bgscan_learn.o 1735NEED_BGSCAN=y 1736endif 1737 1738ifdef NEED_BGSCAN 1739CFLAGS += -DCONFIG_BGSCAN 1740OBJS += bgscan.o 1741endif 1742 1743ifdef CONFIG_AUTOSCAN_EXPONENTIAL 1744CFLAGS += -DCONFIG_AUTOSCAN_EXPONENTIAL 1745OBJS += autoscan_exponential.o 1746NEED_AUTOSCAN=y 1747endif 1748 1749ifdef CONFIG_AUTOSCAN_PERIODIC 1750CFLAGS += -DCONFIG_AUTOSCAN_PERIODIC 1751OBJS += autoscan_periodic.o 1752NEED_AUTOSCAN=y 1753endif 1754 1755ifdef NEED_AUTOSCAN 1756CFLAGS += -DCONFIG_AUTOSCAN 1757OBJS += autoscan.o 1758endif 1759 1760ifdef CONFIG_EXT_PASSWORD_TEST 1761OBJS += ../src/utils/ext_password_test.o 1762CFLAGS += -DCONFIG_EXT_PASSWORD_TEST 1763NEED_EXT_PASSWORD=y 1764endif 1765 1766ifdef CONFIG_EXT_PASSWORD_FILE 1767OBJS += ../src/utils/ext_password_file.o 1768CFLAGS += -DCONFIG_EXT_PASSWORD_FILE 1769NEED_EXT_PASSWORD=y 1770endif 1771 1772ifdef NEED_EXT_PASSWORD 1773OBJS += ../src/utils/ext_password.o 1774CFLAGS += -DCONFIG_EXT_PASSWORD 1775endif 1776 1777ifdef NEED_GAS_SERVER 1778OBJS += ../src/common/gas_server.o 1779CFLAGS += -DCONFIG_GAS_SERVER 1780NEED_GAS=y 1781endif 1782 1783ifdef NEED_GAS 1784OBJS += ../src/common/gas.o 1785OBJS += gas_query.o 1786CFLAGS += -DCONFIG_GAS 1787NEED_OFFCHANNEL=y 1788endif 1789 1790ifdef NEED_OFFCHANNEL 1791OBJS += offchannel.o 1792CFLAGS += -DCONFIG_OFFCHANNEL 1793endif 1794 1795ifdef NEED_JSON 1796OBJS += ../src/utils/json.o 1797CFLAGS += -DCONFIG_JSON 1798endif 1799 1800ifdef CONFIG_MODULE_TESTS 1801CFLAGS += -DCONFIG_MODULE_TESTS 1802OBJS += wpas_module_tests.o 1803OBJS += ../src/utils/utils_module_tests.o 1804OBJS += ../src/common/common_module_tests.o 1805OBJS += ../src/crypto/crypto_module_tests.o 1806ifdef CONFIG_WPS 1807OBJS += ../src/wps/wps_module_tests.o 1808endif 1809endif 1810 1811OBJS += ../src/drivers/driver_common.o 1812OBJS_priv += ../src/drivers/driver_common.o 1813 1814OBJS += wpa_supplicant.o events.o bssid_ignore.o wpas_glue.o scan.o 1815OBJS_t := $(OBJS) $(OBJS_l2) eapol_test.o 1816OBJS_t += ../src/radius/radius_client.o 1817OBJS_t += ../src/radius/radius.o 1818OBJS_t2 := $(OBJS) $(OBJS_l2) preauth_test.o 1819 1820OBJS_nfc := $(OBJS) $(OBJS_l2) nfc_pw_token.o 1821OBJS_nfc += $(OBJS_d) ../src/drivers/drivers.o 1822 1823OBJS += $(CONFIG_MAIN).o 1824 1825ifdef CONFIG_PRIVSEP 1826OBJS_priv += $(OBJS_d) ../src/drivers/drivers.o 1827OBJS_priv += $(OBJS_l2) 1828OBJS_priv += ../src/utils/os_$(CONFIG_OS).o 1829OBJS_priv += ../src/utils/$(CONFIG_ELOOP).o 1830OBJS_priv += ../src/utils/common.o 1831OBJS_priv += ../src/utils/wpa_debug.o 1832OBJS_priv += ../src/utils/wpabuf.o 1833OBJS_priv += wpa_priv.o 1834ifdef CONFIG_DRIVER_NL80211 1835OBJS_priv += ../src/common/ieee802_11_common.o 1836endif 1837OBJS += ../src/l2_packet/l2_packet_privsep.o 1838OBJS += ../src/drivers/driver_privsep.o 1839EXTRA_progs += wpa_priv 1840else 1841OBJS += $(OBJS_d) ../src/drivers/drivers.o 1842OBJS += $(OBJS_l2) 1843endif 1844 1845ifdef CONFIG_NDIS_EVENTS_INTEGRATED 1846CFLAGS += -DCONFIG_NDIS_EVENTS_INTEGRATED 1847OBJS += ../src/drivers/ndis_events.o 1848EXTRALIBS += -loleaut32 -lole32 -luuid 1849ifdef PLATFORMSDKLIB 1850EXTRALIBS += $(PLATFORMSDKLIB)/WbemUuid.Lib 1851else 1852EXTRALIBS += WbemUuid.Lib 1853endif 1854endif 1855 1856ifdef CONFIG_FST 1857CFLAGS += -DCONFIG_FST 1858ifdef CONFIG_FST_TEST 1859CFLAGS += -DCONFIG_FST_TEST 1860endif 1861FST_OBJS += ../src/fst/fst.o 1862FST_OBJS += ../src/fst/fst_session.o 1863FST_OBJS += ../src/fst/fst_iface.o 1864FST_OBJS += ../src/fst/fst_group.o 1865FST_OBJS += ../src/fst/fst_ctrl_aux.o 1866ifdef CONFIG_CTRL_IFACE 1867FST_OBJS += ../src/fst/fst_ctrl_iface.o 1868endif 1869OBJS += $(FST_OBJS) 1870OBJS_t += $(FST_OBJS) 1871OBJS_t2 += $(FST_OBJS) 1872OBJS_nfc += $(FST_OBJS) 1873endif 1874 1875ifdef CONFIG_WEP 1876CFLAGS += -DCONFIG_WEP 1877endif 1878 1879ifdef CONFIG_NO_TKIP 1880CFLAGS += -DCONFIG_NO_TKIP 1881endif 1882 1883dynamic_eap_methods: $(EAPDYN) 1884 1885_OBJS_VAR := OBJS_priv 1886include ../src/objs.mk 1887wpa_priv: $(BCHECK) $(OBJS_priv) 1888 $(Q)$(LDO) $(LDFLAGS) -o wpa_priv $(OBJS_priv) $(LIBS) 1889 @$(E) " LD " $@ 1890 1891_OBJS_VAR := OBJS 1892include ../src/objs.mk 1893wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs) 1894 $(Q)$(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS) 1895 @$(E) " LD " $@ 1896 1897_OBJS_VAR := OBJS_t 1898include ../src/objs.mk 1899eapol_test: $(OBJS_t) 1900 $(Q)$(LDO) $(LDFLAGS) -o eapol_test $(OBJS_t) $(LIBS) 1901 @$(E) " LD " $@ 1902 1903_OBJS_VAR := OBJS_t2 1904include ../src/objs.mk 1905preauth_test: $(OBJS_t2) 1906 $(Q)$(LDO) $(LDFLAGS) -o preauth_test $(OBJS_t2) $(LIBS) 1907 @$(E) " LD " $@ 1908 1909_OBJS_VAR := OBJS_p 1910include ../src/objs.mk 1911wpa_passphrase: $(OBJS_p) 1912 $(Q)$(LDO) $(LDFLAGS) -o wpa_passphrase $(OBJS_p) $(LIBS_p) $(LIBS) 1913 @$(E) " LD " $@ 1914 1915_OBJS_VAR := OBJS_c 1916include ../src/objs.mk 1917wpa_cli: $(OBJS_c) 1918 $(Q)$(LDO) $(LDFLAGS) -o wpa_cli $(OBJS_c) $(LIBS_c) 1919 @$(E) " LD " $@ 1920 1921LIBCTRL += ../src/common/wpa_ctrl.o 1922LIBCTRL += ../src/utils/os_$(CONFIG_OS).o 1923LIBCTRL += ../src/utils/common.o 1924LIBCTRL += ../src/utils/wpa_debug.o 1925LIBCTRLSO += ../src/common/wpa_ctrl.c 1926LIBCTRLSO += ../src/utils/os_$(CONFIG_OS).c 1927LIBCTRLSO += ../src/utils/common.c 1928LIBCTRLSO += ../src/utils/wpa_debug.c 1929 1930_OBJS_VAR := LIBCTRL 1931include ../src/objs.mk 1932libwpa_client.a: $(LIBCTRL) 1933 $(Q)rm -f $@ 1934 $(Q)$(AR) crs $@ $? 1935 @$(E) " AR " $@ 1936 1937libwpa_client.so: $(LIBCTRLSO) 1938 @$(E) " CC $@ ($^)" 1939 $(Q)$(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -fPIC $^ 1940 1941OBJS_wpatest := libwpa_test.o 1942_OBJS_VAR := OBJS_wpatest 1943include ../src/objs.mk 1944libwpa_test1: $(OBJS_wpatest) libwpa_client.a 1945 $(Q)$(LDO) $(LDFLAGS) -o libwpa_test1 $(OBJS_wpatest) libwpa_client.a $(LIBS_c) 1946 @$(E) " LD " $@ 1947 1948libwpa_test2: $(OBJS_wpatest) libwpa_client.so 1949 $(Q)$(LDO) $(LDFLAGS) -o libwpa_test2 $(OBJS_wpatest) -L. -lwpa_client $(LIBS_c) 1950 @$(E) " LD " $@ 1951 1952_OBJS_VAR := OBJS_nfc 1953include ../src/objs.mk 1954nfc_pw_token: $(OBJS_nfc) 1955 $(Q)$(LDO) $(LDFLAGS) -o nfc_pw_token $(OBJS_nfc) $(LIBS) 1956 @$(E) " LD " $@ 1957 1958win_if_list: win_if_list.c 1959 $(Q)$(LDO) $(LDFLAGS) -o $@ win_if_list.c $(CFLAGS) $(LIBS_w) 1960 @$(E) " LD " $@ 1961 1962eap_psk.so: $(SRC_EAP_PSK) 1963 $(Q)$(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \ 1964 -Deap_peer_psk_register=eap_peer_method_dynamic_init 1965 @$(E) " CC/LD " $@ 1966 1967eap_pax.so: $(SRC_EAP_PAX) 1968 $(Q)$(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \ 1969 -D$(@F:eap_%.so=eap_peer_%)_register=eap_peer_method_dynamic_init 1970 @$(E) " CC/LD " $@ 1971 1972eap_peap.so: $(SRC_EAP_PEAP) 1973 $(Q)$(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \ 1974 -D$(@F:eap_%.so=eap_peer_%)_register=eap_peer_method_dynamic_init 1975 @$(E) " CC/LD " $@ 1976 1977eap_sake.so: $(SRC_EAP_SAKE) 1978 $(Q)$(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \ 1979 -D$(@F:eap_%.so=eap_peer_%)_register=eap_peer_method_dynamic_init 1980 @$(E) " CC/LD " $@ 1981 1982eap_ikev2.so: $(SRC_EAP_IKEV2) 1983 $(Q)$(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \ 1984 -D$(@F:eap_%.so=eap_peer_%)_register=eap_peer_method_dynamic_init 1985 @$(E) " CC/LD " $@ 1986 1987eap_eke.so: $(SRC_EAP_EKE) 1988 $(Q)$(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \ 1989 -D$(@F:eap_%.so=eap_peer_%)_register=eap_peer_method_dynamic_init 1990 @$(E) " CC/LD " $@ 1991 1992eap_mschapv2.so: $(SRC_EAP_MSCHAPV2) 1993 $(Q)$(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \ 1994 -D$(@F:eap_%.so=eap_peer_%)_register=eap_peer_method_dynamic_init 1995 @$(E) " CC/LD " $@ 1996 1997eap_fast.so: $(SRC_EAP_FAST) 1998 $(Q)$(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \ 1999 -D$(@F:eap_%.so=eap_peer_%)_register=eap_peer_method_dynamic_init 2000 @$(E) " CC/LD " $@ 2001 2002eap_teap.so: $(SRC_EAP_TEAP) 2003 $(Q)$(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \ 2004 -D$(@F:eap_%.so=eap_peer_%)_register=eap_peer_method_dynamic_init 2005 @$(E) " CC/LD " $@ 2006 2007eap_gpsk.so: $(SRC_EAP_GPSK) 2008 $(Q)$(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \ 2009 -D$(@F:eap_%.so=eap_peer_%)_register=eap_peer_method_dynamic_init 2010 @$(E) " CC/LD " $@ 2011 2012%.so: ../src/eap_peer/%.c 2013 $(Q)$(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $< \ 2014 -D$(*F:eap_%=eap_peer_%)_register=eap_peer_method_dynamic_init 2015 @$(E) " CC/LD " $@ 2016 2017%.service: %.service.in 2018 $(Q)sed -e 's|\@BINDIR\@|$(BINDIR)|g' $< >$@ 2019 @$(E) " sed" $< 2020 2021%@.service: %.service.arg.in 2022 $(Q)sed -e 's|\@BINDIR\@|$(BINDIR)|g' $< >$@ 2023 @$(E) " sed" $< 2024 2025wpa_supplicant.exe: wpa_supplicant 2026 mv -f $< $@ 2027wpa_cli.exe: wpa_cli 2028 mv -f $< $@ 2029wpa_passphrase.exe: wpa_passphrase 2030 mv -f $< $@ 2031win_if_list.exe: win_if_list 2032 mv -f $< $@ 2033eapol_test.exe: eapol_test 2034 mv -f $< $@ 2035 2036WINALL=wpa_supplicant.exe wpa_cli.exe wpa_passphrase.exe win_if_list.exe 2037 2038windows-bin: $(WINALL) 2039 $(STRIP) $(WINALL) 2040 2041wpa_gui: 2042 @echo "wpa_gui has been removed - see wpa_gui-qt4 for replacement" 2043 2044wpa_gui-qt4/Makefile: 2045 qmake -o wpa_gui-qt4/Makefile wpa_gui-qt4/wpa_gui.pro 2046 2047wpa_gui-qt4/lang/wpa_gui_de.qm: wpa_gui-qt4/lang/wpa_gui_de.ts 2048 lrelease wpa_gui-qt4/wpa_gui.pro 2049 2050wpa_gui-qt4: wpa_gui-qt4/Makefile wpa_gui-qt4/lang/wpa_gui_de.qm 2051 $(MAKE) -C wpa_gui-qt4 2052 2053FIPSDIR=/usr/local/ssl/fips-2.0 2054FIPSLD=$(FIPSDIR)/bin/fipsld 2055fips: 2056 $(MAKE) CC=$(FIPSLD) FIPSLD_CC="$(CC)" 2057 2058.PHONY: lcov-html 2059lcov-html: $(call BUILDOBJ,wpa_supplicant.gcda) 2060 lcov -c -d $(BUILDDIR) > lcov.info 2061 genhtml lcov.info --output-directory lcov-html 2062 2063clean: common-clean 2064 $(MAKE) -C ../src clean 2065 $(MAKE) -C dbus clean 2066 rm -f core *~ *.o *.d *.gcno *.gcda *.gcov 2067 rm -f eap_*.so $(WINALL) eapol_test preauth_test 2068 rm -f wpa_priv 2069 rm -f nfc_pw_token 2070 rm -f lcov.info 2071 rm -rf lcov-html 2072 rm -f libwpa_client.a 2073 rm -f libwpa_client.so 2074 rm -f libwpa_test1 libwpa_test2 2075