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