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