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