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