Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2008 The Android Open Source Project |
| 3 | # |
Dmitry Shmidt | c81d5b6 | 2012-05-14 13:35:02 -0700 | [diff] [blame] | 4 | # This software may be distributed under the terms of the BSD license. |
| 5 | # See README for more details. |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 6 | # |
| 7 | |
| 8 | LOCAL_PATH := $(call my-dir) |
Dmitry Shmidt | c55524a | 2011-07-07 11:18:38 -0700 | [diff] [blame] | 9 | PKG_CONFIG ?= pkg-config |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 10 | |
Jeff Brown | bbda627 | 2011-07-11 22:12:15 -0700 | [diff] [blame] | 11 | ifneq ($(BOARD_WPA_SUPPLICANT_DRIVER),) |
Jeff Brown | bbda627 | 2011-07-11 22:12:15 -0700 | [diff] [blame] | 12 | CONFIG_DRIVER_$(BOARD_WPA_SUPPLICANT_DRIVER) := y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 13 | endif |
| 14 | |
Ecco Park | 7d24a75 | 2018-06-06 14:45:45 -0700 | [diff] [blame] | 15 | ifeq ($(BOARD_WLAN_DEVICE), qcwcn) |
| 16 | CONFIG_DRIVER_NL80211_QCA=y |
| 17 | endif |
| 18 | |
Dmitry Shmidt | 7dd0f20 | 2012-02-21 16:49:00 -0800 | [diff] [blame] | 19 | include $(LOCAL_PATH)/android.config |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 20 | |
| 21 | # To ignore possible wrong network configurations |
| 22 | L_CFLAGS = -DWPA_IGNORE_CONFIG_ERRORS |
| 23 | |
Dmitry Shmidt | ea01dac | 2011-10-25 10:50:42 -0700 | [diff] [blame] | 24 | L_CFLAGS += -DVERSION_STR_POSTFIX=\"-$(PLATFORM_VERSION)\" |
| 25 | |
Dmitry Shmidt | 648b749 | 2011-09-30 15:03:42 -0700 | [diff] [blame] | 26 | # Set Android log name |
| 27 | L_CFLAGS += -DANDROID_LOG_NAME=\"wpa_supplicant\" |
| 28 | |
Chih-Hung Hsieh | cedf556 | 2017-10-26 10:56:55 -0700 | [diff] [blame] | 29 | L_CFLAGS += -Wall -Werror |
| 30 | |
| 31 | # Keep sometimes uninitialized warnings |
| 32 | L_CFLAGS += -Wno-error-sometimes-uninitialized |
| 33 | |
| 34 | # Disable incompatible pointer type warnings |
| 35 | L_CFLAGS += -Wno-incompatible-pointer-types |
| 36 | L_CFLAGS += -Wno-incompatible-pointer-types-discards-qualifiers |
| 37 | |
| 38 | # Disable extraneous parentheses warnings |
| 39 | L_CFLAGS += -Wno-parentheses-equality |
| 40 | |
| 41 | # Disable sign compare warnings |
| 42 | L_CFLAGS += -Wno-sign-compare |
| 43 | |
Elliott Hughes | 17cb3c1 | 2018-01-22 13:31:46 -0800 | [diff] [blame] | 44 | # TODO: move off readdir_r upstream, pull fix back (http://b/72326431). |
| 45 | L_CFLAGS += -Wno-error-deprecated-declarations |
| 46 | |
Chih-Hung Hsieh | cedf556 | 2017-10-26 10:56:55 -0700 | [diff] [blame] | 47 | # Disable unused function warnings |
| 48 | L_CFLAGS += -Wno-unused-function |
| 49 | |
| 50 | # Disable unused variable warnings |
| 51 | L_CFLAGS += -Wno-unused-variable |
| 52 | |
Dmitry Shmidt | f9bdef9 | 2014-04-25 10:46:36 -0700 | [diff] [blame] | 53 | # Disable unused parameter warnings |
| 54 | L_CFLAGS += -Wno-unused-parameter |
| 55 | |
Christopher Ferris | b6c19e0 | 2017-02-23 15:50:04 -0800 | [diff] [blame] | 56 | # Disable redefined macro warnings |
| 57 | L_CFLAGS += -Wno-macro-redefined |
| 58 | |
Dmitry Shmidt | b58836e | 2014-04-29 14:35:56 -0700 | [diff] [blame] | 59 | # Set Android extended P2P functionality |
| 60 | L_CFLAGS += -DANDROID_P2P |
Dmitry Shmidt | 4171258 | 2015-06-29 11:02:15 -0700 | [diff] [blame] | 61 | |
Dmitry Shmidt | b58836e | 2014-04-29 14:35:56 -0700 | [diff] [blame] | 62 | ifeq ($(BOARD_WPA_SUPPLICANT_PRIVATE_LIB),) |
Dmitry Shmidt | 4171258 | 2015-06-29 11:02:15 -0700 | [diff] [blame] | 63 | L_CFLAGS += -DANDROID_LIB_STUB |
Dmitry Shmidt | b58836e | 2014-04-29 14:35:56 -0700 | [diff] [blame] | 64 | endif |
| 65 | |
Dmitry Shmidt | 006dedf | 2012-02-21 16:30:45 -0800 | [diff] [blame] | 66 | # Disable roaming in wpa_supplicant |
| 67 | ifdef CONFIG_NO_ROAMING |
| 68 | L_CFLAGS += -DCONFIG_NO_ROAMING |
| 69 | endif |
| 70 | |
Dennis Jeon | e2cb56b | 2020-10-23 21:23:01 +0900 | [diff] [blame^] | 71 | ifeq ($(WIFI_PRIV_CMD_UPDATE_MBO_CELL_STATUS), enabled) |
| 72 | L_CFLAGS += -DENABLE_PRIV_CMD_UPDATE_MBO_CELL_STATUS |
| 73 | endif |
| 74 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 75 | # Use Android specific directory for control interface sockets |
Jeff Vander Stoep | f9b80ff | 2018-01-24 07:51:04 -0800 | [diff] [blame] | 76 | L_CFLAGS += -DCONFIG_CTRL_IFACE_CLIENT_DIR=\"/data/vendor/wifi/wpa/sockets\" |
| 77 | L_CFLAGS += -DCONFIG_CTRL_IFACE_DIR=\"/data/vendor/wifi/wpa/sockets\" |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 78 | |
Dmitry Shmidt | 912c6ec | 2015-03-30 13:16:51 -0700 | [diff] [blame] | 79 | # Use Android specific directory for wpa_cli command completion history |
Jeff Vander Stoep | f9b80ff | 2018-01-24 07:51:04 -0800 | [diff] [blame] | 80 | L_CFLAGS += -DCONFIG_WPA_CLI_HISTORY_DIR=\"/data/vendor/wifi/wpa\" |
Dmitry Shmidt | 912c6ec | 2015-03-30 13:16:51 -0700 | [diff] [blame] | 81 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 82 | # To force sizeof(enum) = 4 |
| 83 | ifeq ($(TARGET_ARCH),arm) |
| 84 | L_CFLAGS += -mabi=aapcs-linux |
| 85 | endif |
| 86 | |
Roshan Pius | 57ffbcf | 2016-09-27 09:12:46 -0700 | [diff] [blame] | 87 | # C++ flags for hidl interface |
Roshan Pius | ad7939e | 2016-12-06 16:48:59 -0800 | [diff] [blame] | 88 | L_CPPFLAGS := -Wall -Werror |
Dmitry Shmidt | 7f2c753 | 2016-08-15 09:48:12 -0700 | [diff] [blame] | 89 | # TODO: Remove these allowed warnings later. |
| 90 | L_CPPFLAGS += -Wno-unused-variable -Wno-unused-parameter |
| 91 | L_CPPFLAGS += -Wno-unused-private-field |
| 92 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 93 | INCLUDES = $(LOCAL_PATH) |
| 94 | INCLUDES += $(LOCAL_PATH)/src |
| 95 | INCLUDES += $(LOCAL_PATH)/src/common |
| 96 | # INCLUDES += $(LOCAL_PATH)/src/crypto # To force proper includes |
| 97 | INCLUDES += $(LOCAL_PATH)/src/drivers |
| 98 | INCLUDES += $(LOCAL_PATH)/src/eap_common |
| 99 | INCLUDES += $(LOCAL_PATH)/src/eapol_supp |
| 100 | INCLUDES += $(LOCAL_PATH)/src/eap_peer |
| 101 | INCLUDES += $(LOCAL_PATH)/src/eap_server |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 102 | INCLUDES += $(LOCAL_PATH)/src/l2_packet |
| 103 | INCLUDES += $(LOCAL_PATH)/src/radius |
| 104 | INCLUDES += $(LOCAL_PATH)/src/rsn_supp |
| 105 | INCLUDES += $(LOCAL_PATH)/src/tls |
| 106 | INCLUDES += $(LOCAL_PATH)/src/utils |
| 107 | INCLUDES += $(LOCAL_PATH)/src/wps |
Dmitry Shmidt | ffd6bf9 | 2013-11-07 18:13:08 -0800 | [diff] [blame] | 108 | INCLUDES += system/security/keystore/include |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 109 | ifdef CONFIG_DRIVER_NL80211 |
Dmitry Shmidt | cd44645 | 2014-02-18 16:03:35 -0800 | [diff] [blame] | 110 | ifneq ($(wildcard external/libnl),) |
Dmitry Shmidt | d620e6d | 2014-02-18 11:07:59 -0800 | [diff] [blame] | 111 | INCLUDES += external/libnl/include |
Dmitry Shmidt | cd44645 | 2014-02-18 16:03:35 -0800 | [diff] [blame] | 112 | else |
| 113 | INCLUDES += external/libnl-headers |
| 114 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 115 | endif |
| 116 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 117 | ifdef CONFIG_FIPS |
| 118 | CONFIG_NO_RANDOM_POOL= |
| 119 | CONFIG_OPENSSL_CMAC=y |
| 120 | endif |
| 121 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 122 | OBJS = config.c |
| 123 | OBJS += notify.c |
| 124 | OBJS += bss.c |
| 125 | OBJS += eap_register.c |
| 126 | OBJS += src/utils/common.c |
| 127 | OBJS += src/utils/wpa_debug.c |
| 128 | OBJS += src/utils/wpabuf.c |
Dmitry Shmidt | 2933359 | 2017-01-09 12:27:11 -0800 | [diff] [blame] | 129 | OBJS += src/utils/bitfield.c |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 130 | OBJS += src/utils/ip_addr.c |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 131 | OBJS += src/utils/crc32.c |
Dmitry Shmidt | fb45fd5 | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 132 | OBJS += wmm_ac.c |
Dmitry Shmidt | 2933359 | 2017-01-09 12:27:11 -0800 | [diff] [blame] | 133 | OBJS += op_classes.c |
| 134 | OBJS += rrm.c |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 135 | OBJS += robust_av.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 136 | OBJS_p = wpa_passphrase.c |
| 137 | OBJS_p += src/utils/common.c |
| 138 | OBJS_p += src/utils/wpa_debug.c |
| 139 | OBJS_p += src/utils/wpabuf.c |
| 140 | OBJS_c = wpa_cli.c src/common/wpa_ctrl.c |
| 141 | OBJS_c += src/utils/wpa_debug.c |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 142 | OBJS_c += src/utils/common.c |
Dmitry Shmidt | 7f2c753 | 2016-08-15 09:48:12 -0700 | [diff] [blame] | 143 | OBJS_c += src/common/cli.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 144 | OBJS_d = |
| 145 | OBJS_priv = |
| 146 | |
| 147 | ifndef CONFIG_OS |
| 148 | ifdef CONFIG_NATIVE_WINDOWS |
| 149 | CONFIG_OS=win32 |
| 150 | else |
| 151 | CONFIG_OS=unix |
| 152 | endif |
| 153 | endif |
| 154 | |
| 155 | ifeq ($(CONFIG_OS), internal) |
| 156 | L_CFLAGS += -DOS_NO_C_LIB_DEFINES |
| 157 | endif |
| 158 | |
| 159 | OBJS += src/utils/os_$(CONFIG_OS).c |
| 160 | OBJS_p += src/utils/os_$(CONFIG_OS).c |
| 161 | OBJS_c += src/utils/os_$(CONFIG_OS).c |
| 162 | |
| 163 | ifdef CONFIG_WPA_TRACE |
| 164 | L_CFLAGS += -DWPA_TRACE |
| 165 | OBJS += src/utils/trace.c |
| 166 | OBJS_p += src/utils/trace.c |
| 167 | OBJS_c += src/utils/trace.c |
| 168 | LDFLAGS += -rdynamic |
| 169 | L_CFLAGS += -funwind-tables |
| 170 | ifdef CONFIG_WPA_TRACE_BFD |
| 171 | L_CFLAGS += -DWPA_TRACE_BFD |
| 172 | LIBS += -lbfd |
| 173 | LIBS_p += -lbfd |
| 174 | LIBS_c += -lbfd |
| 175 | endif |
| 176 | endif |
| 177 | |
| 178 | ifndef CONFIG_ELOOP |
| 179 | CONFIG_ELOOP=eloop |
| 180 | endif |
| 181 | OBJS += src/utils/$(CONFIG_ELOOP).c |
| 182 | OBJS_c += src/utils/$(CONFIG_ELOOP).c |
| 183 | |
Dmitry Shmidt | c5ec7f5 | 2012-03-06 16:33:24 -0800 | [diff] [blame] | 184 | ifdef CONFIG_ELOOP_POLL |
| 185 | L_CFLAGS += -DCONFIG_ELOOP_POLL |
| 186 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 187 | |
Dmitry Shmidt | 50b691d | 2014-05-21 14:01:45 -0700 | [diff] [blame] | 188 | ifdef CONFIG_ELOOP_EPOLL |
| 189 | L_CFLAGS += -DCONFIG_ELOOP_EPOLL |
| 190 | endif |
| 191 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 192 | ifdef CONFIG_EAPOL_TEST |
| 193 | L_CFLAGS += -Werror -DEAPOL_TEST |
| 194 | endif |
| 195 | |
Dmitry Shmidt | c5ec7f5 | 2012-03-06 16:33:24 -0800 | [diff] [blame] | 196 | ifdef CONFIG_HT_OVERRIDES |
| 197 | L_CFLAGS += -DCONFIG_HT_OVERRIDES |
| 198 | endif |
| 199 | |
Dmitry Shmidt | 2f02319 | 2013-03-12 12:44:17 -0700 | [diff] [blame] | 200 | ifdef CONFIG_VHT_OVERRIDES |
| 201 | L_CFLAGS += -DCONFIG_VHT_OVERRIDES |
| 202 | endif |
| 203 | |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 204 | ifdef CONFIG_HE_OVERRIDES |
| 205 | L_CFLAGS += -DCONFIG_HE_OVERRIDES |
| 206 | endif |
| 207 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 208 | ifndef CONFIG_BACKEND |
| 209 | CONFIG_BACKEND=file |
| 210 | endif |
| 211 | |
| 212 | ifeq ($(CONFIG_BACKEND), file) |
| 213 | OBJS += config_file.c |
| 214 | ifndef CONFIG_NO_CONFIG_BLOBS |
| 215 | NEED_BASE64=y |
| 216 | endif |
| 217 | L_CFLAGS += -DCONFIG_BACKEND_FILE |
| 218 | endif |
| 219 | |
| 220 | ifeq ($(CONFIG_BACKEND), winreg) |
| 221 | OBJS += config_winreg.c |
| 222 | endif |
| 223 | |
| 224 | ifeq ($(CONFIG_BACKEND), none) |
| 225 | OBJS += config_none.c |
| 226 | endif |
| 227 | |
| 228 | ifdef CONFIG_NO_CONFIG_WRITE |
| 229 | L_CFLAGS += -DCONFIG_NO_CONFIG_WRITE |
| 230 | endif |
| 231 | |
| 232 | ifdef CONFIG_NO_CONFIG_BLOBS |
| 233 | L_CFLAGS += -DCONFIG_NO_CONFIG_BLOBS |
| 234 | endif |
| 235 | |
| 236 | ifdef CONFIG_NO_SCAN_PROCESSING |
| 237 | L_CFLAGS += -DCONFIG_NO_SCAN_PROCESSING |
| 238 | endif |
| 239 | |
Dmitry Shmidt | fb45fd5 | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 240 | ifdef CONFIG_SUITEB |
| 241 | L_CFLAGS += -DCONFIG_SUITEB |
Dmitry Shmidt | fb45fd5 | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 242 | endif |
| 243 | |
Dmitry Shmidt | 40b0720 | 2015-01-27 13:40:23 -0800 | [diff] [blame] | 244 | ifdef CONFIG_SUITEB192 |
| 245 | L_CFLAGS += -DCONFIG_SUITEB192 |
| 246 | NEED_SHA384=y |
| 247 | endif |
| 248 | |
Hai Shalom | 74f70d4 | 2019-02-11 14:42:39 -0800 | [diff] [blame] | 249 | ifdef CONFIG_OCV |
| 250 | L_CFLAGS += -DCONFIG_OCV |
| 251 | OBJS += src/common/ocv.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 252 | endif |
| 253 | |
| 254 | ifdef CONFIG_IEEE80211R |
| 255 | L_CFLAGS += -DCONFIG_IEEE80211R |
| 256 | OBJS += src/rsn_supp/wpa_ft.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 257 | endif |
| 258 | |
Dmitry Shmidt | fb45fd5 | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 259 | ifdef CONFIG_MESH |
| 260 | NEED_80211_COMMON=y |
Dmitry Shmidt | fb45fd5 | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 261 | NEED_AES_SIV=y |
Dmitry Shmidt | fb45fd5 | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 262 | CONFIG_SAE=y |
| 263 | CONFIG_AP=y |
| 264 | L_CFLAGS += -DCONFIG_MESH |
| 265 | OBJS += mesh.c |
| 266 | OBJS += mesh_mpm.c |
| 267 | OBJS += mesh_rsn.c |
| 268 | endif |
| 269 | |
Dmitry Shmidt | d5e4923 | 2012-12-03 15:08:10 -0800 | [diff] [blame] | 270 | ifdef CONFIG_SAE |
| 271 | L_CFLAGS += -DCONFIG_SAE |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 272 | OBJS += src/common/sae.c |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 273 | ifdef CONFIG_SAE_PK |
| 274 | L_CFLAGS += -DCONFIG_SAE_PK |
| 275 | OBJS += src/common/sae_pk.c |
| 276 | endif |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 277 | NEED_ECC=y |
| 278 | NEED_DH_GROUPS=y |
Hai Shalom | b755a2a | 2020-04-23 21:49:02 -0700 | [diff] [blame] | 279 | NEED_HMAC_SHA256_KDF=y |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 280 | NEED_DRAGONFLY=y |
Ahmed ElArabawy | 0ff61c5 | 2019-12-26 12:38:39 -0800 | [diff] [blame] | 281 | ifdef CONFIG_TESTING_OPTIONS |
| 282 | NEED_DH_GROUPS_ALL=y |
| 283 | endif |
Dmitry Shmidt | d5e4923 | 2012-12-03 15:08:10 -0800 | [diff] [blame] | 284 | endif |
| 285 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 286 | ifdef CONFIG_DPP |
| 287 | L_CFLAGS += -DCONFIG_DPP |
| 288 | OBJS += src/common/dpp.c |
Hai Shalom | 4fbc08f | 2020-05-18 12:37:00 -0700 | [diff] [blame] | 289 | OBJS += src/common/dpp_auth.c |
| 290 | OBJS += src/common/dpp_backup.c |
| 291 | OBJS += src/common/dpp_crypto.c |
| 292 | OBJS += src/common/dpp_pkex.c |
| 293 | OBJS += src/common/dpp_reconfig.c |
| 294 | OBJS += src/common/dpp_tcp.c |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 295 | OBJS += dpp_supplicant.c |
| 296 | NEED_AES_SIV=y |
| 297 | NEED_HMAC_SHA256_KDF=y |
| 298 | NEED_HMAC_SHA384_KDF=y |
| 299 | NEED_HMAC_SHA512_KDF=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 300 | NEED_SHA384=y |
| 301 | NEED_SHA512=y |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 302 | NEED_ECC=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 303 | NEED_JSON=y |
| 304 | NEED_GAS_SERVER=y |
| 305 | NEED_BASE64=y |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 306 | NEED_ASN1=y |
Hai Shalom | 021b0b5 | 2019-04-10 11:17:58 -0700 | [diff] [blame] | 307 | ifdef CONFIG_DPP2 |
| 308 | L_CFLAGS += -DCONFIG_DPP2 |
| 309 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 310 | endif |
| 311 | |
| 312 | ifdef CONFIG_OWE |
| 313 | L_CFLAGS += -DCONFIG_OWE |
| 314 | NEED_ECC=y |
| 315 | NEED_HMAC_SHA256_KDF=y |
| 316 | NEED_HMAC_SHA384_KDF=y |
| 317 | NEED_HMAC_SHA512_KDF=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 318 | NEED_SHA384=y |
| 319 | NEED_SHA512=y |
| 320 | endif |
| 321 | |
Jimmy Chen | caaac07 | 2019-09-16 16:36:06 +0800 | [diff] [blame] | 322 | ifdef CONFIG_WAPI_INTERFACE |
| 323 | L_CFLAGS += -DCONFIG_WAPI_INTERFACE |
| 324 | endif |
| 325 | |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 326 | ifdef CONFIG_FILS |
| 327 | L_CFLAGS += -DCONFIG_FILS |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 328 | NEED_SHA384=y |
| 329 | NEED_AES_SIV=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 330 | ifdef CONFIG_FILS_SK_PFS |
| 331 | L_CFLAGS += -DCONFIG_FILS_SK_PFS |
| 332 | NEED_ECC=y |
| 333 | endif |
| 334 | endif |
| 335 | |
| 336 | ifdef CONFIG_MBO |
| 337 | CONFIG_WNM=y |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 338 | endif |
| 339 | |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 340 | ifdef CONFIG_WNM |
| 341 | L_CFLAGS += -DCONFIG_WNM |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 342 | OBJS += wnm_sta.c |
| 343 | endif |
| 344 | |
Dmitry Shmidt | 405b5af | 2011-05-09 14:53:38 -0700 | [diff] [blame] | 345 | ifdef CONFIG_TDLS |
| 346 | L_CFLAGS += -DCONFIG_TDLS |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 347 | OBJS += src/rsn_supp/tdls.c |
Dmitry Shmidt | 405b5af | 2011-05-09 14:53:38 -0700 | [diff] [blame] | 348 | endif |
| 349 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 350 | ifdef CONFIG_TDLS_TESTING |
| 351 | L_CFLAGS += -DCONFIG_TDLS_TESTING |
| 352 | endif |
| 353 | |
Dmitry Shmidt | 2933359 | 2017-01-09 12:27:11 -0800 | [diff] [blame] | 354 | ifdef CONFIG_PMKSA_CACHE_EXTERNAL |
| 355 | L_CFLAGS += -DCONFIG_PMKSA_CACHE_EXTERNAL |
| 356 | endif |
| 357 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 358 | ifndef CONFIG_NO_WPA |
| 359 | OBJS += src/rsn_supp/wpa.c |
| 360 | OBJS += src/rsn_supp/preauth.c |
| 361 | OBJS += src/rsn_supp/pmksa_cache.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 362 | OBJS += src/rsn_supp/wpa_ie.c |
| 363 | OBJS += src/common/wpa_common.c |
| 364 | NEED_AES=y |
| 365 | NEED_SHA1=y |
| 366 | NEED_MD5=y |
| 367 | NEED_RC4=y |
| 368 | else |
Dmitry Shmidt | 34af306 | 2013-07-11 10:46:32 -0700 | [diff] [blame] | 369 | L_CFLAGS += -DCONFIG_NO_WPA |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 370 | endif |
| 371 | |
| 372 | ifdef CONFIG_IBSS_RSN |
| 373 | NEED_RSN_AUTHENTICATOR=y |
| 374 | L_CFLAGS += -DCONFIG_IBSS_RSN |
Dmitry Shmidt | e466304 | 2016-04-04 10:07:49 -0700 | [diff] [blame] | 375 | L_CFLAGS += -DCONFIG_NO_VLAN |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 376 | OBJS += ibss_rsn.c |
| 377 | endif |
| 378 | |
| 379 | ifdef CONFIG_P2P |
| 380 | OBJS += p2p_supplicant.c |
Dmitry Shmidt | f73259c | 2015-03-17 11:00:54 -0700 | [diff] [blame] | 381 | OBJS += p2p_supplicant_sd.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 382 | OBJS += src/p2p/p2p.c |
| 383 | OBJS += src/p2p/p2p_utils.c |
| 384 | OBJS += src/p2p/p2p_parse.c |
| 385 | OBJS += src/p2p/p2p_build.c |
| 386 | OBJS += src/p2p/p2p_go_neg.c |
| 387 | OBJS += src/p2p/p2p_sd.c |
| 388 | OBJS += src/p2p/p2p_pd.c |
| 389 | OBJS += src/p2p/p2p_invitation.c |
| 390 | OBJS += src/p2p/p2p_dev_disc.c |
| 391 | OBJS += src/p2p/p2p_group.c |
| 392 | OBJS += src/ap/p2p_hostapd.c |
| 393 | L_CFLAGS += -DCONFIG_P2P |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 394 | NEED_GAS=y |
| 395 | NEED_OFFCHANNEL=y |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 396 | CONFIG_WPS=y |
| 397 | CONFIG_AP=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 398 | ifdef CONFIG_P2P_STRICT |
| 399 | L_CFLAGS += -DCONFIG_P2P_STRICT |
| 400 | endif |
| 401 | endif |
| 402 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 403 | ifdef CONFIG_WIFI_DISPLAY |
| 404 | L_CFLAGS += -DCONFIG_WIFI_DISPLAY |
| 405 | OBJS += wifi_display.c |
| 406 | endif |
| 407 | |
| 408 | ifdef CONFIG_HS20 |
| 409 | OBJS += hs20_supplicant.c |
| 410 | L_CFLAGS += -DCONFIG_HS20 |
| 411 | CONFIG_INTERWORKING=y |
| 412 | endif |
| 413 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 414 | ifdef CONFIG_INTERWORKING |
| 415 | OBJS += interworking.c |
| 416 | L_CFLAGS += -DCONFIG_INTERWORKING |
| 417 | NEED_GAS=y |
| 418 | endif |
| 419 | |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 420 | ifdef CONFIG_FST |
| 421 | L_CFLAGS += -DCONFIG_FST |
| 422 | OBJS += src/fst/fst.c |
| 423 | OBJS += src/fst/fst_session.c |
| 424 | OBJS += src/fst/fst_iface.c |
| 425 | OBJS += src/fst/fst_group.c |
| 426 | OBJS += src/fst/fst_ctrl_aux.c |
| 427 | ifdef CONFIG_FST_TEST |
| 428 | L_CFLAGS += -DCONFIG_FST_TEST |
| 429 | endif |
| 430 | ifdef CONFIG_CTRL_IFACE |
| 431 | OBJS += src/fst/fst_ctrl_iface.c |
| 432 | endif |
| 433 | endif |
| 434 | |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 435 | ifdef CONFIG_WEP |
| 436 | L_CFLAGS += -DCONFIG_WEP |
| 437 | endif |
| 438 | |
Hai Shalom | b755a2a | 2020-04-23 21:49:02 -0700 | [diff] [blame] | 439 | ifdef CONFIG_NO_TKIP |
| 440 | L_CFLAGS += -DCONFIG_NO_TKIP |
| 441 | endif |
| 442 | |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 443 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 444 | include $(LOCAL_PATH)/src/drivers/drivers.mk |
| 445 | |
| 446 | ifdef CONFIG_AP |
| 447 | OBJS_d += $(DRV_BOTH_OBJS) |
| 448 | L_CFLAGS += $(DRV_BOTH_CFLAGS) |
| 449 | LDFLAGS += $(DRV_BOTH_LDFLAGS) |
| 450 | LIBS += $(DRV_BOTH_LIBS) |
| 451 | else |
| 452 | NEED_AP_MLME= |
| 453 | OBJS_d += $(DRV_WPA_OBJS) |
| 454 | L_CFLAGS += $(DRV_WPA_CFLAGS) |
| 455 | LDFLAGS += $(DRV_WPA_LDFLAGS) |
| 456 | LIBS += $(DRV_WPA_LIBS) |
| 457 | endif |
| 458 | |
| 459 | ifndef CONFIG_L2_PACKET |
| 460 | CONFIG_L2_PACKET=linux |
| 461 | endif |
| 462 | |
| 463 | OBJS_l2 += src/l2_packet/l2_packet_$(CONFIG_L2_PACKET).c |
| 464 | |
| 465 | ifeq ($(CONFIG_L2_PACKET), pcap) |
| 466 | ifdef CONFIG_WINPCAP |
| 467 | L_CFLAGS += -DCONFIG_WINPCAP |
| 468 | LIBS += -lwpcap -lpacket |
| 469 | LIBS_w += -lwpcap |
| 470 | else |
| 471 | LIBS += -ldnet -lpcap |
| 472 | endif |
| 473 | endif |
| 474 | |
| 475 | ifeq ($(CONFIG_L2_PACKET), winpcap) |
| 476 | LIBS += -lwpcap -lpacket |
| 477 | LIBS_w += -lwpcap |
| 478 | endif |
| 479 | |
| 480 | ifeq ($(CONFIG_L2_PACKET), freebsd) |
| 481 | LIBS += -lpcap |
| 482 | endif |
| 483 | |
Dmitry Shmidt | fb45fd5 | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 484 | ifdef CONFIG_ERP |
| 485 | L_CFLAGS += -DCONFIG_ERP |
Dmitry Shmidt | fb45fd5 | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 486 | NEED_HMAC_SHA256_KDF=y |
| 487 | endif |
| 488 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 489 | ifdef CONFIG_EAP_TLS |
| 490 | # EAP-TLS |
| 491 | ifeq ($(CONFIG_EAP_TLS), dyn) |
| 492 | L_CFLAGS += -DEAP_TLS_DYNAMIC |
| 493 | EAPDYN += src/eap_peer/eap_tls.so |
| 494 | else |
| 495 | L_CFLAGS += -DEAP_TLS |
| 496 | OBJS += src/eap_peer/eap_tls.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 497 | endif |
| 498 | TLS_FUNCS=y |
| 499 | CONFIG_IEEE8021X_EAPOL=y |
| 500 | endif |
| 501 | |
Dmitry Shmidt | d5e4923 | 2012-12-03 15:08:10 -0800 | [diff] [blame] | 502 | ifdef CONFIG_EAP_UNAUTH_TLS |
| 503 | # EAP-UNAUTH-TLS |
| 504 | L_CFLAGS += -DEAP_UNAUTH_TLS |
Dmitry Shmidt | dda10c2 | 2015-03-24 16:05:01 -0700 | [diff] [blame] | 505 | ifndef CONFIG_EAP_TLS |
Dmitry Shmidt | d5e4923 | 2012-12-03 15:08:10 -0800 | [diff] [blame] | 506 | OBJS += src/eap_peer/eap_tls.c |
Dmitry Shmidt | d5e4923 | 2012-12-03 15:08:10 -0800 | [diff] [blame] | 507 | TLS_FUNCS=y |
| 508 | endif |
| 509 | CONFIG_IEEE8021X_EAPOL=y |
| 510 | endif |
| 511 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 512 | ifdef CONFIG_EAP_PEAP |
| 513 | # EAP-PEAP |
| 514 | ifeq ($(CONFIG_EAP_PEAP), dyn) |
| 515 | L_CFLAGS += -DEAP_PEAP_DYNAMIC |
| 516 | EAPDYN += src/eap_peer/eap_peap.so |
| 517 | else |
| 518 | L_CFLAGS += -DEAP_PEAP |
| 519 | OBJS += src/eap_peer/eap_peap.c |
| 520 | OBJS += src/eap_common/eap_peap_common.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 521 | endif |
| 522 | TLS_FUNCS=y |
| 523 | CONFIG_IEEE8021X_EAPOL=y |
| 524 | endif |
| 525 | |
| 526 | ifdef CONFIG_EAP_TTLS |
| 527 | # EAP-TTLS |
| 528 | ifeq ($(CONFIG_EAP_TTLS), dyn) |
| 529 | L_CFLAGS += -DEAP_TTLS_DYNAMIC |
| 530 | EAPDYN += src/eap_peer/eap_ttls.so |
| 531 | else |
| 532 | L_CFLAGS += -DEAP_TTLS |
| 533 | OBJS += src/eap_peer/eap_ttls.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 534 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 535 | TLS_FUNCS=y |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 536 | ifndef CONFIG_FIPS |
| 537 | MS_FUNCS=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 538 | CHAP=y |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 539 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 540 | CONFIG_IEEE8021X_EAPOL=y |
| 541 | endif |
| 542 | |
| 543 | ifdef CONFIG_EAP_MD5 |
| 544 | # EAP-MD5 |
| 545 | ifeq ($(CONFIG_EAP_MD5), dyn) |
| 546 | L_CFLAGS += -DEAP_MD5_DYNAMIC |
| 547 | EAPDYN += src/eap_peer/eap_md5.so |
| 548 | else |
| 549 | L_CFLAGS += -DEAP_MD5 |
| 550 | OBJS += src/eap_peer/eap_md5.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 551 | endif |
| 552 | CHAP=y |
| 553 | CONFIG_IEEE8021X_EAPOL=y |
| 554 | endif |
| 555 | |
| 556 | # backwards compatibility for old spelling |
| 557 | ifdef CONFIG_MSCHAPV2 |
| 558 | ifndef CONFIG_EAP_MSCHAPV2 |
| 559 | CONFIG_EAP_MSCHAPV2=y |
| 560 | endif |
| 561 | endif |
| 562 | |
| 563 | ifdef CONFIG_EAP_MSCHAPV2 |
| 564 | # EAP-MSCHAPv2 |
| 565 | ifeq ($(CONFIG_EAP_MSCHAPV2), dyn) |
| 566 | L_CFLAGS += -DEAP_MSCHAPv2_DYNAMIC |
| 567 | EAPDYN += src/eap_peer/eap_mschapv2.so |
| 568 | EAPDYN += src/eap_peer/mschapv2.so |
| 569 | else |
| 570 | L_CFLAGS += -DEAP_MSCHAPv2 |
| 571 | OBJS += src/eap_peer/eap_mschapv2.c |
| 572 | OBJS += src/eap_peer/mschapv2.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 573 | endif |
| 574 | MS_FUNCS=y |
| 575 | CONFIG_IEEE8021X_EAPOL=y |
| 576 | endif |
| 577 | |
| 578 | ifdef CONFIG_EAP_GTC |
| 579 | # EAP-GTC |
| 580 | ifeq ($(CONFIG_EAP_GTC), dyn) |
| 581 | L_CFLAGS += -DEAP_GTC_DYNAMIC |
| 582 | EAPDYN += src/eap_peer/eap_gtc.so |
| 583 | else |
| 584 | L_CFLAGS += -DEAP_GTC |
| 585 | OBJS += src/eap_peer/eap_gtc.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 586 | endif |
| 587 | CONFIG_IEEE8021X_EAPOL=y |
| 588 | endif |
| 589 | |
| 590 | ifdef CONFIG_EAP_OTP |
| 591 | # EAP-OTP |
| 592 | ifeq ($(CONFIG_EAP_OTP), dyn) |
| 593 | L_CFLAGS += -DEAP_OTP_DYNAMIC |
| 594 | EAPDYN += src/eap_peer/eap_otp.so |
| 595 | else |
| 596 | L_CFLAGS += -DEAP_OTP |
| 597 | OBJS += src/eap_peer/eap_otp.c |
| 598 | endif |
| 599 | CONFIG_IEEE8021X_EAPOL=y |
| 600 | endif |
| 601 | |
| 602 | ifdef CONFIG_EAP_SIM |
| 603 | # EAP-SIM |
| 604 | ifeq ($(CONFIG_EAP_SIM), dyn) |
| 605 | L_CFLAGS += -DEAP_SIM_DYNAMIC |
| 606 | EAPDYN += src/eap_peer/eap_sim.so |
| 607 | else |
| 608 | L_CFLAGS += -DEAP_SIM |
| 609 | OBJS += src/eap_peer/eap_sim.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 610 | endif |
| 611 | CONFIG_IEEE8021X_EAPOL=y |
| 612 | CONFIG_EAP_SIM_COMMON=y |
| 613 | NEED_AES_CBC=y |
| 614 | endif |
| 615 | |
| 616 | ifdef CONFIG_EAP_LEAP |
| 617 | # EAP-LEAP |
| 618 | ifeq ($(CONFIG_EAP_LEAP), dyn) |
| 619 | L_CFLAGS += -DEAP_LEAP_DYNAMIC |
| 620 | EAPDYN += src/eap_peer/eap_leap.so |
| 621 | else |
| 622 | L_CFLAGS += -DEAP_LEAP |
| 623 | OBJS += src/eap_peer/eap_leap.c |
| 624 | endif |
| 625 | MS_FUNCS=y |
| 626 | CONFIG_IEEE8021X_EAPOL=y |
| 627 | endif |
| 628 | |
| 629 | ifdef CONFIG_EAP_PSK |
| 630 | # EAP-PSK |
| 631 | ifeq ($(CONFIG_EAP_PSK), dyn) |
| 632 | L_CFLAGS += -DEAP_PSK_DYNAMIC |
| 633 | EAPDYN += src/eap_peer/eap_psk.so |
| 634 | else |
| 635 | L_CFLAGS += -DEAP_PSK |
| 636 | OBJS += src/eap_peer/eap_psk.c src/eap_common/eap_psk_common.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 637 | endif |
| 638 | CONFIG_IEEE8021X_EAPOL=y |
| 639 | NEED_AES=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 640 | NEED_AES_ENCBLOCK=y |
| 641 | NEED_AES_EAX=y |
| 642 | endif |
| 643 | |
| 644 | ifdef CONFIG_EAP_AKA |
| 645 | # EAP-AKA |
| 646 | ifeq ($(CONFIG_EAP_AKA), dyn) |
| 647 | L_CFLAGS += -DEAP_AKA_DYNAMIC |
| 648 | EAPDYN += src/eap_peer/eap_aka.so |
| 649 | else |
| 650 | L_CFLAGS += -DEAP_AKA |
| 651 | OBJS += src/eap_peer/eap_aka.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 652 | endif |
| 653 | CONFIG_IEEE8021X_EAPOL=y |
| 654 | CONFIG_EAP_SIM_COMMON=y |
| 655 | NEED_AES_CBC=y |
| 656 | endif |
| 657 | |
Dmitry Shmidt | f862328 | 2013-02-20 14:34:59 -0800 | [diff] [blame] | 658 | ifdef CONFIG_EAP_PROXY |
| 659 | L_CFLAGS += -DCONFIG_EAP_PROXY |
| 660 | OBJS += src/eap_peer/eap_proxy_$(CONFIG_EAP_PROXY).c |
Dmitry Shmidt | 04f534e | 2013-12-09 15:50:16 -0800 | [diff] [blame] | 661 | include $(LOCAL_PATH)/eap_proxy_$(CONFIG_EAP_PROXY).mk |
Dmitry Shmidt | f862328 | 2013-02-20 14:34:59 -0800 | [diff] [blame] | 662 | CONFIG_IEEE8021X_EAPOL=y |
| 663 | endif |
| 664 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 665 | ifdef CONFIG_EAP_AKA_PRIME |
| 666 | # EAP-AKA' |
| 667 | ifeq ($(CONFIG_EAP_AKA_PRIME), dyn) |
| 668 | L_CFLAGS += -DEAP_AKA_PRIME_DYNAMIC |
| 669 | else |
| 670 | L_CFLAGS += -DEAP_AKA_PRIME |
| 671 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 672 | endif |
| 673 | |
| 674 | ifdef CONFIG_EAP_SIM_COMMON |
| 675 | OBJS += src/eap_common/eap_sim_common.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 676 | NEED_AES=y |
| 677 | NEED_FIPS186_2_PRF=y |
| 678 | endif |
| 679 | |
| 680 | ifdef CONFIG_EAP_FAST |
| 681 | # EAP-FAST |
| 682 | ifeq ($(CONFIG_EAP_FAST), dyn) |
| 683 | L_CFLAGS += -DEAP_FAST_DYNAMIC |
| 684 | EAPDYN += src/eap_peer/eap_fast.so |
| 685 | EAPDYN += src/eap_common/eap_fast_common.c |
| 686 | else |
| 687 | L_CFLAGS += -DEAP_FAST |
| 688 | OBJS += src/eap_peer/eap_fast.c src/eap_peer/eap_fast_pac.c |
| 689 | OBJS += src/eap_common/eap_fast_common.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 690 | endif |
| 691 | TLS_FUNCS=y |
| 692 | CONFIG_IEEE8021X_EAPOL=y |
| 693 | NEED_T_PRF=y |
| 694 | endif |
| 695 | |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 696 | ifdef CONFIG_EAP_TEAP |
| 697 | # EAP-TEAP |
| 698 | ifeq ($(CONFIG_EAP_TEAP), dyn) |
| 699 | L_CFLAGS += -DEAP_YEAP_DYNAMIC |
| 700 | EAPDYN += src/eap_peer/eap_teap.so |
| 701 | EAPDYN += src/eap_common/eap_teap_common.c |
| 702 | else |
| 703 | L_CFLAGS += -DEAP_TEAP |
| 704 | OBJS += src/eap_peer/eap_teap.c src/eap_peer/eap_teap_pac.c |
| 705 | OBJS += src/eap_common/eap_teap_common.c |
| 706 | endif |
| 707 | TLS_FUNCS=y |
| 708 | CONFIG_IEEE8021X_EAPOL=y |
| 709 | NEED_T_PRF=y |
| 710 | NEED_SHA384=y |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 711 | NEED_TLS_PRF_SHA256=y |
| 712 | NEED_TLS_PRF_SHA384=y |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 713 | endif |
| 714 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 715 | ifdef CONFIG_EAP_PAX |
| 716 | # EAP-PAX |
| 717 | ifeq ($(CONFIG_EAP_PAX), dyn) |
| 718 | L_CFLAGS += -DEAP_PAX_DYNAMIC |
| 719 | EAPDYN += src/eap_peer/eap_pax.so |
| 720 | else |
| 721 | L_CFLAGS += -DEAP_PAX |
| 722 | OBJS += src/eap_peer/eap_pax.c src/eap_common/eap_pax_common.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 723 | endif |
| 724 | CONFIG_IEEE8021X_EAPOL=y |
| 725 | endif |
| 726 | |
| 727 | ifdef CONFIG_EAP_SAKE |
| 728 | # EAP-SAKE |
| 729 | ifeq ($(CONFIG_EAP_SAKE), dyn) |
| 730 | L_CFLAGS += -DEAP_SAKE_DYNAMIC |
| 731 | EAPDYN += src/eap_peer/eap_sake.so |
| 732 | else |
| 733 | L_CFLAGS += -DEAP_SAKE |
| 734 | OBJS += src/eap_peer/eap_sake.c src/eap_common/eap_sake_common.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 735 | endif |
| 736 | CONFIG_IEEE8021X_EAPOL=y |
| 737 | endif |
| 738 | |
| 739 | ifdef CONFIG_EAP_GPSK |
| 740 | # EAP-GPSK |
| 741 | ifeq ($(CONFIG_EAP_GPSK), dyn) |
| 742 | L_CFLAGS += -DEAP_GPSK_DYNAMIC |
| 743 | EAPDYN += src/eap_peer/eap_gpsk.so |
| 744 | else |
| 745 | L_CFLAGS += -DEAP_GPSK |
| 746 | OBJS += src/eap_peer/eap_gpsk.c src/eap_common/eap_gpsk_common.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 747 | endif |
| 748 | CONFIG_IEEE8021X_EAPOL=y |
| 749 | ifdef CONFIG_EAP_GPSK_SHA256 |
| 750 | L_CFLAGS += -DEAP_GPSK_SHA256 |
| 751 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 752 | endif |
| 753 | |
| 754 | ifdef CONFIG_EAP_PWD |
| 755 | L_CFLAGS += -DEAP_PWD |
| 756 | OBJS += src/eap_peer/eap_pwd.c src/eap_common/eap_pwd_common.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 757 | CONFIG_IEEE8021X_EAPOL=y |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 758 | NEED_ECC=y |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 759 | NEED_DRAGONFLY=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 760 | endif |
| 761 | |
Dmitry Shmidt | 34af306 | 2013-07-11 10:46:32 -0700 | [diff] [blame] | 762 | ifdef CONFIG_EAP_EKE |
| 763 | # EAP-EKE |
| 764 | ifeq ($(CONFIG_EAP_EKE), dyn) |
| 765 | L_CFLAGS += -DEAP_EKE_DYNAMIC |
| 766 | EAPDYN += src/eap_peer/eap_eke.so |
| 767 | else |
| 768 | L_CFLAGS += -DEAP_EKE |
| 769 | OBJS += src/eap_peer/eap_eke.c src/eap_common/eap_eke_common.c |
Dmitry Shmidt | 34af306 | 2013-07-11 10:46:32 -0700 | [diff] [blame] | 770 | endif |
| 771 | CONFIG_IEEE8021X_EAPOL=y |
| 772 | NEED_DH_GROUPS=y |
| 773 | NEED_DH_GROUPS_ALL=y |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 774 | NEED_AES_CBC=y |
Dmitry Shmidt | 34af306 | 2013-07-11 10:46:32 -0700 | [diff] [blame] | 775 | endif |
| 776 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 777 | ifdef CONFIG_WPS |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 778 | # EAP-WSC |
| 779 | L_CFLAGS += -DCONFIG_WPS -DEAP_WSC |
| 780 | OBJS += wps_supplicant.c |
| 781 | OBJS += src/utils/uuid.c |
| 782 | OBJS += src/eap_peer/eap_wsc.c src/eap_common/eap_wsc_common.c |
| 783 | OBJS += src/wps/wps.c |
| 784 | OBJS += src/wps/wps_common.c |
| 785 | OBJS += src/wps/wps_attr_parse.c |
| 786 | OBJS += src/wps/wps_attr_build.c |
| 787 | OBJS += src/wps/wps_attr_process.c |
| 788 | OBJS += src/wps/wps_dev_attr.c |
| 789 | OBJS += src/wps/wps_enrollee.c |
| 790 | OBJS += src/wps/wps_registrar.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 791 | CONFIG_IEEE8021X_EAPOL=y |
| 792 | NEED_DH_GROUPS=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 793 | NEED_BASE64=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 794 | NEED_AES_CBC=y |
| 795 | NEED_MODEXP=y |
| 796 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 797 | ifdef CONFIG_WPS_NFC |
| 798 | L_CFLAGS += -DCONFIG_WPS_NFC |
| 799 | OBJS += src/wps/ndef.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 800 | NEED_WPS_OOB=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 801 | endif |
| 802 | |
| 803 | ifdef NEED_WPS_OOB |
| 804 | L_CFLAGS += -DCONFIG_WPS_OOB |
| 805 | endif |
| 806 | |
| 807 | ifdef CONFIG_WPS_ER |
| 808 | CONFIG_WPS_UPNP=y |
| 809 | L_CFLAGS += -DCONFIG_WPS_ER |
| 810 | OBJS += src/wps/wps_er.c |
| 811 | OBJS += src/wps/wps_er_ssdp.c |
| 812 | endif |
| 813 | |
| 814 | ifdef CONFIG_WPS_UPNP |
| 815 | L_CFLAGS += -DCONFIG_WPS_UPNP |
| 816 | OBJS += src/wps/wps_upnp.c |
| 817 | OBJS += src/wps/wps_upnp_ssdp.c |
| 818 | OBJS += src/wps/wps_upnp_web.c |
| 819 | OBJS += src/wps/wps_upnp_event.c |
| 820 | OBJS += src/wps/wps_upnp_ap.c |
| 821 | OBJS += src/wps/upnp_xml.c |
| 822 | OBJS += src/wps/httpread.c |
| 823 | OBJS += src/wps/http_client.c |
| 824 | OBJS += src/wps/http_server.c |
| 825 | endif |
| 826 | |
| 827 | ifdef CONFIG_WPS_STRICT |
| 828 | L_CFLAGS += -DCONFIG_WPS_STRICT |
| 829 | OBJS += src/wps/wps_validate.c |
| 830 | endif |
| 831 | |
| 832 | ifdef CONFIG_WPS_TESTING |
| 833 | L_CFLAGS += -DCONFIG_WPS_TESTING |
| 834 | endif |
| 835 | |
| 836 | ifdef CONFIG_WPS_REG_DISABLE_OPEN |
| 837 | L_CFLAGS += -DCONFIG_WPS_REG_DISABLE_OPEN |
| 838 | endif |
| 839 | |
| 840 | endif |
| 841 | |
| 842 | ifdef CONFIG_EAP_IKEV2 |
| 843 | # EAP-IKEv2 |
| 844 | ifeq ($(CONFIG_EAP_IKEV2), dyn) |
| 845 | L_CFLAGS += -DEAP_IKEV2_DYNAMIC |
| 846 | EAPDYN += src/eap_peer/eap_ikev2.so src/eap_peer/ikev2.c |
| 847 | EAPDYN += src/eap_common/eap_ikev2_common.c src/eap_common/ikev2_common.c |
| 848 | else |
| 849 | L_CFLAGS += -DEAP_IKEV2 |
| 850 | OBJS += src/eap_peer/eap_ikev2.c src/eap_peer/ikev2.c |
| 851 | OBJS += src/eap_common/eap_ikev2_common.c src/eap_common/ikev2_common.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 852 | endif |
| 853 | CONFIG_IEEE8021X_EAPOL=y |
| 854 | NEED_DH_GROUPS=y |
| 855 | NEED_DH_GROUPS_ALL=y |
| 856 | NEED_MODEXP=y |
| 857 | NEED_CIPHER=y |
| 858 | endif |
| 859 | |
| 860 | ifdef CONFIG_EAP_VENDOR_TEST |
| 861 | ifeq ($(CONFIG_EAP_VENDOR_TEST), dyn) |
| 862 | L_CFLAGS += -DEAP_VENDOR_TEST_DYNAMIC |
| 863 | EAPDYN += src/eap_peer/eap_vendor_test.so |
| 864 | else |
| 865 | L_CFLAGS += -DEAP_VENDOR_TEST |
| 866 | OBJS += src/eap_peer/eap_vendor_test.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 867 | endif |
| 868 | CONFIG_IEEE8021X_EAPOL=y |
| 869 | endif |
| 870 | |
| 871 | ifdef CONFIG_EAP_TNC |
| 872 | # EAP-TNC |
| 873 | L_CFLAGS += -DEAP_TNC |
| 874 | OBJS += src/eap_peer/eap_tnc.c |
| 875 | OBJS += src/eap_peer/tncc.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 876 | NEED_BASE64=y |
| 877 | ifndef CONFIG_NATIVE_WINDOWS |
| 878 | ifndef CONFIG_DRIVER_BSD |
| 879 | LIBS += -ldl |
| 880 | endif |
| 881 | endif |
| 882 | endif |
| 883 | |
| 884 | ifdef CONFIG_IEEE8021X_EAPOL |
| 885 | # IEEE 802.1X/EAPOL state machines (e.g., for RADIUS authentication) |
| 886 | L_CFLAGS += -DIEEE8021X_EAPOL |
| 887 | OBJS += src/eapol_supp/eapol_supp_sm.c |
| 888 | OBJS += src/eap_peer/eap.c src/eap_peer/eap_methods.c |
| 889 | NEED_EAP_COMMON=y |
| 890 | ifdef CONFIG_DYNAMIC_EAP_METHODS |
| 891 | L_CFLAGS += -DCONFIG_DYNAMIC_EAP_METHODS |
| 892 | LIBS += -ldl -rdynamic |
| 893 | endif |
| 894 | endif |
| 895 | |
| 896 | ifdef CONFIG_AP |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 897 | NEED_EAP_COMMON=y |
| 898 | NEED_RSN_AUTHENTICATOR=y |
| 899 | L_CFLAGS += -DCONFIG_AP |
| 900 | OBJS += ap.c |
| 901 | L_CFLAGS += -DCONFIG_NO_RADIUS |
| 902 | L_CFLAGS += -DCONFIG_NO_ACCOUNTING |
| 903 | L_CFLAGS += -DCONFIG_NO_VLAN |
| 904 | OBJS += src/ap/hostapd.c |
| 905 | OBJS += src/ap/wpa_auth_glue.c |
| 906 | OBJS += src/ap/utils.c |
| 907 | OBJS += src/ap/authsrv.c |
| 908 | OBJS += src/ap/ap_config.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 909 | OBJS += src/ap/sta_info.c |
| 910 | OBJS += src/ap/tkip_countermeasures.c |
| 911 | OBJS += src/ap/ap_mlme.c |
| 912 | OBJS += src/ap/ieee802_1x.c |
| 913 | OBJS += src/eapol_auth/eapol_auth_sm.c |
| 914 | OBJS += src/ap/ieee802_11_auth.c |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 915 | OBJS += src/ap/ieee802_11_shared.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 916 | OBJS += src/ap/drv_callbacks.c |
| 917 | OBJS += src/ap/ap_drv_ops.c |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 918 | OBJS += src/ap/beacon.c |
Dmitry Shmidt | fb45fd5 | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 919 | OBJS += src/ap/bss_load.c |
Dmitry Shmidt | d5e4923 | 2012-12-03 15:08:10 -0800 | [diff] [blame] | 920 | OBJS += src/ap/eap_user_db.c |
Dmitry Shmidt | 849734c | 2016-05-27 09:59:01 -0700 | [diff] [blame] | 921 | OBJS += src/ap/neighbor_db.c |
| 922 | OBJS += src/ap/rrm.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 923 | OBJS += src/ap/ieee802_11_ht.c |
Dmitry Shmidt | 68d0e3e | 2013-10-28 17:59:21 -0700 | [diff] [blame] | 924 | ifdef CONFIG_IEEE80211AC |
| 925 | OBJS += src/ap/ieee802_11_vht.c |
| 926 | endif |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 927 | ifdef CONFIG_IEEE80211AX |
| 928 | OBJS += src/ap/ieee802_11_he.c |
| 929 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 930 | ifdef CONFIG_WNM_AP |
| 931 | L_CFLAGS += -DCONFIG_WNM_AP |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 932 | OBJS += src/ap/wnm_ap.c |
| 933 | endif |
Dmitry Shmidt | 57c2d39 | 2016-02-23 13:40:19 -0800 | [diff] [blame] | 934 | ifdef CONFIG_MBO |
| 935 | OBJS += src/ap/mbo_ap.c |
| 936 | endif |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 937 | ifdef CONFIG_FILS |
| 938 | OBJS += src/ap/fils_hlp.c |
| 939 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 940 | ifdef CONFIG_CTRL_IFACE |
| 941 | OBJS += src/ap/ctrl_iface_ap.c |
| 942 | endif |
| 943 | |
| 944 | L_CFLAGS += -DEAP_SERVER -DEAP_SERVER_IDENTITY |
| 945 | OBJS += src/eap_server/eap_server.c |
| 946 | OBJS += src/eap_server/eap_server_identity.c |
| 947 | OBJS += src/eap_server/eap_server_methods.c |
| 948 | |
Dmitry Shmidt | 68d0e3e | 2013-10-28 17:59:21 -0700 | [diff] [blame] | 949 | ifdef CONFIG_IEEE80211AC |
| 950 | L_CFLAGS += -DCONFIG_IEEE80211AC |
| 951 | endif |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 952 | ifdef CONFIG_IEEE80211AX |
| 953 | L_CFLAGS += -DCONFIG_IEEE80211AX |
| 954 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 955 | |
| 956 | ifdef NEED_AP_MLME |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 957 | OBJS += src/ap/wmm.c |
| 958 | OBJS += src/ap/ap_list.c |
| 959 | OBJS += src/ap/ieee802_11.c |
| 960 | OBJS += src/ap/hw_features.c |
Dmitry Shmidt | 051af73 | 2013-10-22 13:52:46 -0700 | [diff] [blame] | 961 | OBJS += src/ap/dfs.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 962 | L_CFLAGS += -DNEED_AP_MLME |
| 963 | endif |
| 964 | ifdef CONFIG_WPS |
| 965 | L_CFLAGS += -DEAP_SERVER_WSC |
| 966 | OBJS += src/ap/wps_hostapd.c |
| 967 | OBJS += src/eap_server/eap_server_wsc.c |
| 968 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 969 | ifdef CONFIG_DPP |
| 970 | OBJS += src/ap/dpp_hostapd.c |
| 971 | OBJS += src/ap/gas_query_ap.c |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 972 | NEED_AP_GAS_SERV=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 973 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 974 | ifdef CONFIG_INTERWORKING |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 975 | NEED_AP_GAS_SERV=y |
| 976 | endif |
| 977 | ifdef NEED_AP_GAS_SERV |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 978 | OBJS += src/ap/gas_serv.c |
| 979 | endif |
| 980 | ifdef CONFIG_HS20 |
| 981 | OBJS += src/ap/hs20.c |
| 982 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 983 | endif |
| 984 | |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 985 | ifdef CONFIG_MBO |
| 986 | OBJS += mbo.c |
| 987 | L_CFLAGS += -DCONFIG_MBO |
| 988 | endif |
| 989 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 990 | ifdef CONFIG_TESTING_OPTIONS |
| 991 | L_CFLAGS += -DCONFIG_TESTING_OPTIONS |
| 992 | endif |
| 993 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 994 | ifdef NEED_RSN_AUTHENTICATOR |
| 995 | L_CFLAGS += -DCONFIG_NO_RADIUS |
| 996 | NEED_AES_WRAP=y |
| 997 | OBJS += src/ap/wpa_auth.c |
| 998 | OBJS += src/ap/wpa_auth_ie.c |
| 999 | OBJS += src/ap/pmksa_cache_auth.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1000 | endif |
| 1001 | |
Dmitry Shmidt | 014a3ff | 2015-12-28 13:27:49 -0800 | [diff] [blame] | 1002 | ifdef CONFIG_ACS |
| 1003 | L_CFLAGS += -DCONFIG_ACS |
| 1004 | OBJS += src/ap/acs.c |
| 1005 | LIBS += -lm |
| 1006 | endif |
| 1007 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1008 | ifdef CONFIG_PCSC |
| 1009 | # PC/SC interface for smartcards (USIM, GSM SIM) |
| 1010 | L_CFLAGS += -DPCSC_FUNCS -I/usr/include/PCSC |
| 1011 | OBJS += src/utils/pcsc_funcs.c |
| 1012 | # -lpthread may not be needed depending on how pcsc-lite was configured |
| 1013 | ifdef CONFIG_NATIVE_WINDOWS |
| 1014 | #Once MinGW gets support for WinScard, -lwinscard could be used instead of the |
| 1015 | #dynamic symbol loading that is now used in pcsc_funcs.c |
| 1016 | #LIBS += -lwinscard |
| 1017 | else |
| 1018 | LIBS += -lpcsclite -lpthread |
| 1019 | endif |
| 1020 | endif |
| 1021 | |
| 1022 | ifdef CONFIG_SIM_SIMULATOR |
| 1023 | L_CFLAGS += -DCONFIG_SIM_SIMULATOR |
| 1024 | NEED_MILENAGE=y |
| 1025 | endif |
| 1026 | |
| 1027 | ifdef CONFIG_USIM_SIMULATOR |
| 1028 | L_CFLAGS += -DCONFIG_USIM_SIMULATOR |
| 1029 | NEED_MILENAGE=y |
| 1030 | endif |
| 1031 | |
| 1032 | ifdef NEED_MILENAGE |
| 1033 | OBJS += src/crypto/milenage.c |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1034 | NEED_AES_ENCBLOCK=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1035 | endif |
| 1036 | |
| 1037 | ifdef CONFIG_PKCS12 |
| 1038 | L_CFLAGS += -DPKCS12_FUNCS |
| 1039 | endif |
| 1040 | |
| 1041 | ifdef CONFIG_SMARTCARD |
| 1042 | L_CFLAGS += -DCONFIG_SMARTCARD |
| 1043 | endif |
| 1044 | |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 1045 | ifdef NEED_DRAGONFLY |
| 1046 | OBJS += src/common/dragonfly.c |
| 1047 | endif |
| 1048 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1049 | ifdef MS_FUNCS |
| 1050 | OBJS += src/crypto/ms_funcs.c |
| 1051 | NEED_DES=y |
| 1052 | NEED_MD4=y |
| 1053 | endif |
| 1054 | |
| 1055 | ifdef CHAP |
| 1056 | OBJS += src/eap_common/chap.c |
| 1057 | endif |
| 1058 | |
| 1059 | ifdef TLS_FUNCS |
| 1060 | NEED_DES=y |
| 1061 | # Shared TLS functions (needed for EAP_TLS, EAP_PEAP, EAP_TTLS, and EAP_FAST) |
| 1062 | OBJS += src/eap_peer/eap_tls_common.c |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1063 | ifndef CONFIG_FIPS |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1064 | NEED_TLS_PRF=y |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 1065 | NEED_SHA1=y |
| 1066 | NEED_MD5=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1067 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1068 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1069 | |
| 1070 | ifndef CONFIG_TLS |
| 1071 | CONFIG_TLS=openssl |
Rich Cannings | f8d3d11 | 2018-10-09 13:56:37 -0700 | [diff] [blame] | 1072 | L_CFLAGS += -DCONFIG_USE_OPENSSL_RNG |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1073 | endif |
| 1074 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1075 | ifdef CONFIG_TLSV11 |
| 1076 | L_CFLAGS += -DCONFIG_TLSV11 |
| 1077 | endif |
| 1078 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1079 | ifdef CONFIG_TLSV12 |
| 1080 | L_CFLAGS += -DCONFIG_TLSV12 |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1081 | endif |
| 1082 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1083 | ifeq ($(CONFIG_TLS), openssl) |
| 1084 | ifdef TLS_FUNCS |
| 1085 | L_CFLAGS += -DEAP_TLS_OPENSSL |
| 1086 | OBJS += src/crypto/tls_openssl.c |
Dmitry Shmidt | d7ff03d | 2015-12-04 14:49:35 -0800 | [diff] [blame] | 1087 | OBJS += src/crypto/tls_openssl_ocsp.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1088 | LIBS += -lssl |
| 1089 | endif |
| 1090 | OBJS += src/crypto/crypto_openssl.c |
| 1091 | OBJS_p += src/crypto/crypto_openssl.c |
| 1092 | ifdef NEED_FIPS186_2_PRF |
| 1093 | OBJS += src/crypto/fips_prf_openssl.c |
| 1094 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1095 | NEED_TLS_PRF_SHA256=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1096 | LIBS += -lcrypto |
| 1097 | LIBS_p += -lcrypto |
Dmitry Shmidt | d5e4923 | 2012-12-03 15:08:10 -0800 | [diff] [blame] | 1098 | ifdef CONFIG_TLS_ADD_DL |
| 1099 | LIBS += -ldl |
| 1100 | LIBS_p += -ldl |
| 1101 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1102 | ifndef CONFIG_TLS_DEFAULT_CIPHERS |
| 1103 | CONFIG_TLS_DEFAULT_CIPHERS = "DEFAULT:!EXP:!LOW" |
| 1104 | endif |
| 1105 | L_CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONFIG_TLS_DEFAULT_CIPHERS)\" |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1106 | endif |
| 1107 | |
| 1108 | ifeq ($(CONFIG_TLS), gnutls) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1109 | ifndef CONFIG_CRYPTO |
| 1110 | # default to libgcrypt |
| 1111 | CONFIG_CRYPTO=gnutls |
| 1112 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1113 | ifdef TLS_FUNCS |
| 1114 | OBJS += src/crypto/tls_gnutls.c |
| 1115 | LIBS += -lgnutls -lgpg-error |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1116 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1117 | OBJS += src/crypto/crypto_$(CONFIG_CRYPTO).c |
| 1118 | OBJS_p += src/crypto/crypto_$(CONFIG_CRYPTO).c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1119 | ifdef NEED_FIPS186_2_PRF |
Dmitry Shmidt | 9866086 | 2014-03-11 17:26:21 -0700 | [diff] [blame] | 1120 | OBJS += src/crypto/fips_prf_internal.c |
| 1121 | OBJS += src/crypto/sha1-internal.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1122 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1123 | ifeq ($(CONFIG_CRYPTO), gnutls) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1124 | LIBS += -lgcrypt |
| 1125 | LIBS_p += -lgcrypt |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1126 | CONFIG_INTERNAL_RC4=y |
| 1127 | CONFIG_INTERNAL_DH_GROUP5=y |
| 1128 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1129 | ifeq ($(CONFIG_CRYPTO), nettle) |
| 1130 | LIBS += -lnettle -lgmp |
| 1131 | LIBS_p += -lnettle -lgmp |
| 1132 | CONFIG_INTERNAL_RC4=y |
| 1133 | CONFIG_INTERNAL_DH_GROUP5=y |
| 1134 | endif |
| 1135 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1136 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1137 | ifeq ($(CONFIG_TLS), internal) |
| 1138 | ifndef CONFIG_CRYPTO |
| 1139 | CONFIG_CRYPTO=internal |
| 1140 | endif |
| 1141 | ifdef TLS_FUNCS |
| 1142 | OBJS += src/crypto/crypto_internal-rsa.c |
| 1143 | OBJS += src/crypto/tls_internal.c |
| 1144 | OBJS += src/tls/tlsv1_common.c |
| 1145 | OBJS += src/tls/tlsv1_record.c |
| 1146 | OBJS += src/tls/tlsv1_cred.c |
| 1147 | OBJS += src/tls/tlsv1_client.c |
| 1148 | OBJS += src/tls/tlsv1_client_write.c |
| 1149 | OBJS += src/tls/tlsv1_client_read.c |
Dmitry Shmidt | 55840ad | 2015-12-14 12:45:46 -0800 | [diff] [blame] | 1150 | OBJS += src/tls/tlsv1_client_ocsp.c |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 1151 | NEED_ASN1=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1152 | OBJS += src/tls/rsa.c |
| 1153 | OBJS += src/tls/x509v3.c |
| 1154 | OBJS += src/tls/pkcs1.c |
| 1155 | OBJS += src/tls/pkcs5.c |
| 1156 | OBJS += src/tls/pkcs8.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1157 | NEED_BASE64=y |
| 1158 | NEED_TLS_PRF=y |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1159 | ifdef CONFIG_TLSV12 |
| 1160 | NEED_TLS_PRF_SHA256=y |
| 1161 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1162 | NEED_MODEXP=y |
| 1163 | NEED_CIPHER=y |
| 1164 | L_CFLAGS += -DCONFIG_TLS_INTERNAL_CLIENT |
| 1165 | endif |
| 1166 | ifdef NEED_CIPHER |
| 1167 | NEED_DES=y |
| 1168 | OBJS += src/crypto/crypto_internal-cipher.c |
| 1169 | endif |
| 1170 | ifdef NEED_MODEXP |
| 1171 | OBJS += src/crypto/crypto_internal-modexp.c |
| 1172 | OBJS += src/tls/bignum.c |
| 1173 | endif |
| 1174 | ifeq ($(CONFIG_CRYPTO), libtomcrypt) |
| 1175 | OBJS += src/crypto/crypto_libtomcrypt.c |
| 1176 | OBJS_p += src/crypto/crypto_libtomcrypt.c |
| 1177 | LIBS += -ltomcrypt -ltfm |
| 1178 | LIBS_p += -ltomcrypt -ltfm |
| 1179 | CONFIG_INTERNAL_SHA256=y |
| 1180 | CONFIG_INTERNAL_RC4=y |
| 1181 | CONFIG_INTERNAL_DH_GROUP5=y |
| 1182 | endif |
| 1183 | ifeq ($(CONFIG_CRYPTO), internal) |
| 1184 | OBJS += src/crypto/crypto_internal.c |
| 1185 | OBJS_p += src/crypto/crypto_internal.c |
| 1186 | NEED_AES_ENC=y |
| 1187 | L_CFLAGS += -DCONFIG_CRYPTO_INTERNAL |
| 1188 | ifdef CONFIG_INTERNAL_LIBTOMMATH |
| 1189 | L_CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH |
| 1190 | ifdef CONFIG_INTERNAL_LIBTOMMATH_FAST |
| 1191 | L_CFLAGS += -DLTM_FAST |
| 1192 | endif |
| 1193 | else |
| 1194 | LIBS += -ltommath |
| 1195 | LIBS_p += -ltommath |
| 1196 | endif |
| 1197 | CONFIG_INTERNAL_AES=y |
| 1198 | CONFIG_INTERNAL_DES=y |
| 1199 | CONFIG_INTERNAL_SHA1=y |
| 1200 | CONFIG_INTERNAL_MD4=y |
| 1201 | CONFIG_INTERNAL_MD5=y |
| 1202 | CONFIG_INTERNAL_SHA256=y |
Dmitry Shmidt | d7ff03d | 2015-12-04 14:49:35 -0800 | [diff] [blame] | 1203 | CONFIG_INTERNAL_SHA384=y |
| 1204 | CONFIG_INTERNAL_SHA512=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1205 | CONFIG_INTERNAL_RC4=y |
| 1206 | CONFIG_INTERNAL_DH_GROUP5=y |
| 1207 | endif |
| 1208 | ifeq ($(CONFIG_CRYPTO), cryptoapi) |
| 1209 | OBJS += src/crypto/crypto_cryptoapi.c |
| 1210 | OBJS_p += src/crypto/crypto_cryptoapi.c |
| 1211 | L_CFLAGS += -DCONFIG_CRYPTO_CRYPTOAPI |
| 1212 | CONFIG_INTERNAL_SHA256=y |
| 1213 | CONFIG_INTERNAL_RC4=y |
| 1214 | endif |
| 1215 | endif |
| 1216 | |
| 1217 | ifeq ($(CONFIG_TLS), none) |
| 1218 | ifdef TLS_FUNCS |
| 1219 | OBJS += src/crypto/tls_none.c |
| 1220 | L_CFLAGS += -DEAP_TLS_NONE |
| 1221 | CONFIG_INTERNAL_AES=y |
| 1222 | CONFIG_INTERNAL_SHA1=y |
| 1223 | CONFIG_INTERNAL_MD5=y |
| 1224 | endif |
| 1225 | OBJS += src/crypto/crypto_none.c |
| 1226 | OBJS_p += src/crypto/crypto_none.c |
| 1227 | CONFIG_INTERNAL_SHA256=y |
| 1228 | CONFIG_INTERNAL_RC4=y |
| 1229 | endif |
| 1230 | |
| 1231 | ifdef TLS_FUNCS |
| 1232 | ifdef CONFIG_SMARTCARD |
| 1233 | ifndef CONFIG_NATIVE_WINDOWS |
| 1234 | ifneq ($(CONFIG_L2_PACKET), freebsd) |
| 1235 | LIBS += -ldl |
| 1236 | endif |
| 1237 | endif |
| 1238 | endif |
| 1239 | endif |
| 1240 | |
| 1241 | ifndef TLS_FUNCS |
| 1242 | OBJS += src/crypto/tls_none.c |
| 1243 | ifeq ($(CONFIG_TLS), internal) |
| 1244 | CONFIG_INTERNAL_AES=y |
| 1245 | CONFIG_INTERNAL_SHA1=y |
| 1246 | CONFIG_INTERNAL_MD5=y |
| 1247 | CONFIG_INTERNAL_RC4=y |
| 1248 | endif |
| 1249 | endif |
| 1250 | |
| 1251 | AESOBJS = # none so far (see below) |
| 1252 | ifdef CONFIG_INTERNAL_AES |
| 1253 | AESOBJS += src/crypto/aes-internal.c src/crypto/aes-internal-dec.c |
| 1254 | endif |
| 1255 | |
Dmitry Shmidt | aff761d | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 1256 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1257 | NEED_INTERNAL_AES_WRAP=y |
| 1258 | endif |
| 1259 | ifdef CONFIG_OPENSSL_INTERNAL_AES_WRAP |
| 1260 | # Seems to be needed at least with BoringSSL |
| 1261 | NEED_INTERNAL_AES_WRAP=y |
| 1262 | L_CFLAGS += -DCONFIG_OPENSSL_INTERNAL_AES_WRAP |
| 1263 | endif |
| 1264 | ifdef CONFIG_FIPS |
| 1265 | # Have to use internal AES key wrap routines to use OpenSSL EVP since the |
| 1266 | # OpenSSL AES_wrap_key()/AES_unwrap_key() API is not available in FIPS mode. |
| 1267 | NEED_INTERNAL_AES_WRAP=y |
| 1268 | endif |
| 1269 | |
| 1270 | ifdef NEED_INTERNAL_AES_WRAP |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1271 | AESOBJS += src/crypto/aes-unwrap.c |
Dmitry Shmidt | aff761d | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 1272 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1273 | ifdef NEED_AES_EAX |
| 1274 | AESOBJS += src/crypto/aes-eax.c |
| 1275 | NEED_AES_CTR=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1276 | endif |
| 1277 | ifdef NEED_AES_SIV |
| 1278 | AESOBJS += src/crypto/aes-siv.c |
| 1279 | NEED_AES_CTR=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1280 | endif |
| 1281 | ifdef NEED_AES_CTR |
| 1282 | AESOBJS += src/crypto/aes-ctr.c |
| 1283 | endif |
| 1284 | ifdef NEED_AES_ENCBLOCK |
| 1285 | AESOBJS += src/crypto/aes-encblock.c |
| 1286 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1287 | NEED_AES_ENC=y |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1288 | ifdef CONFIG_OPENSSL_CMAC |
Dmitry Shmidt | 0fdea2c | 2013-11-05 18:12:54 -0800 | [diff] [blame] | 1289 | L_CFLAGS += -DCONFIG_OPENSSL_CMAC |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1290 | else |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1291 | AESOBJS += src/crypto/aes-omac1.c |
| 1292 | endif |
| 1293 | ifdef NEED_AES_WRAP |
| 1294 | NEED_AES_ENC=y |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1295 | ifdef NEED_INTERNAL_AES_WRAP |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1296 | AESOBJS += src/crypto/aes-wrap.c |
| 1297 | endif |
Dmitry Shmidt | aff761d | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 1298 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1299 | ifdef NEED_AES_CBC |
| 1300 | NEED_AES_ENC=y |
Dmitry Shmidt | 912c6ec | 2015-03-30 13:16:51 -0700 | [diff] [blame] | 1301 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1302 | AESOBJS += src/crypto/aes-cbc.c |
| 1303 | endif |
Dmitry Shmidt | 912c6ec | 2015-03-30 13:16:51 -0700 | [diff] [blame] | 1304 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1305 | ifdef NEED_AES_ENC |
| 1306 | ifdef CONFIG_INTERNAL_AES |
| 1307 | AESOBJS += src/crypto/aes-internal-enc.c |
| 1308 | endif |
| 1309 | endif |
| 1310 | ifdef NEED_AES |
| 1311 | OBJS += $(AESOBJS) |
| 1312 | endif |
| 1313 | |
| 1314 | SHA1OBJS = |
| 1315 | ifdef NEED_SHA1 |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1316 | ifneq ($(CONFIG_TLS), openssl) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1317 | ifneq ($(CONFIG_TLS), gnutls) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1318 | SHA1OBJS += src/crypto/sha1.c |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1319 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1320 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1321 | SHA1OBJS += src/crypto/sha1-prf.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1322 | ifdef CONFIG_INTERNAL_SHA1 |
| 1323 | SHA1OBJS += src/crypto/sha1-internal.c |
| 1324 | ifdef NEED_FIPS186_2_PRF |
| 1325 | SHA1OBJS += src/crypto/fips_prf_internal.c |
| 1326 | endif |
| 1327 | endif |
Dmitry Shmidt | 13970b0 | 2011-06-30 16:51:41 -0700 | [diff] [blame] | 1328 | ifdef CONFIG_NO_WPA_PASSPHRASE |
| 1329 | L_CFLAGS += -DCONFIG_NO_PBKDF2 |
| 1330 | else |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1331 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1332 | SHA1OBJS += src/crypto/sha1-pbkdf2.c |
| 1333 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1334 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1335 | ifdef NEED_T_PRF |
| 1336 | SHA1OBJS += src/crypto/sha1-tprf.c |
| 1337 | endif |
| 1338 | ifdef NEED_TLS_PRF |
| 1339 | SHA1OBJS += src/crypto/sha1-tlsprf.c |
| 1340 | endif |
| 1341 | endif |
| 1342 | |
Dmitry Shmidt | 5460547 | 2013-11-08 11:10:19 -0800 | [diff] [blame] | 1343 | MD5OBJS = |
| 1344 | ifndef CONFIG_FIPS |
Dmitry Shmidt | aff761d | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 1345 | ifneq ($(CONFIG_TLS), openssl) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1346 | ifneq ($(CONFIG_TLS), gnutls) |
Dmitry Shmidt | 5460547 | 2013-11-08 11:10:19 -0800 | [diff] [blame] | 1347 | MD5OBJS += src/crypto/md5.c |
| 1348 | endif |
Dmitry Shmidt | aff761d | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 1349 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1350 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1351 | ifdef NEED_MD5 |
| 1352 | ifdef CONFIG_INTERNAL_MD5 |
| 1353 | MD5OBJS += src/crypto/md5-internal.c |
| 1354 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1355 | OBJS += $(MD5OBJS) |
| 1356 | OBJS_p += $(MD5OBJS) |
| 1357 | endif |
| 1358 | |
| 1359 | ifdef NEED_MD4 |
| 1360 | ifdef CONFIG_INTERNAL_MD4 |
| 1361 | OBJS += src/crypto/md4-internal.c |
| 1362 | endif |
| 1363 | endif |
| 1364 | |
| 1365 | DESOBJS = # none needed when not internal |
| 1366 | ifdef NEED_DES |
| 1367 | ifdef CONFIG_INTERNAL_DES |
| 1368 | DESOBJS += src/crypto/des-internal.c |
| 1369 | endif |
| 1370 | endif |
| 1371 | |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1372 | ifdef CONFIG_NO_RC4 |
| 1373 | L_CFLAGS += -DCONFIG_NO_RC4 |
| 1374 | endif |
| 1375 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1376 | ifdef NEED_RC4 |
| 1377 | ifdef CONFIG_INTERNAL_RC4 |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1378 | ifndef CONFIG_NO_RC4 |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1379 | OBJS += src/crypto/rc4.c |
| 1380 | endif |
| 1381 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1382 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1383 | |
| 1384 | SHA256OBJS = # none by default |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1385 | L_CFLAGS += -DCONFIG_SHA256 |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1386 | ifneq ($(CONFIG_TLS), openssl) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1387 | ifneq ($(CONFIG_TLS), gnutls) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1388 | SHA256OBJS += src/crypto/sha256.c |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1389 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1390 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1391 | SHA256OBJS += src/crypto/sha256-prf.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1392 | ifdef CONFIG_INTERNAL_SHA256 |
| 1393 | SHA256OBJS += src/crypto/sha256-internal.c |
| 1394 | endif |
Dmitry Shmidt | d7ff03d | 2015-12-04 14:49:35 -0800 | [diff] [blame] | 1395 | ifdef CONFIG_INTERNAL_SHA384 |
| 1396 | L_CFLAGS += -DCONFIG_INTERNAL_SHA384 |
| 1397 | SHA256OBJS += src/crypto/sha384-internal.c |
| 1398 | endif |
| 1399 | ifdef CONFIG_INTERNAL_SHA512 |
| 1400 | L_CFLAGS += -DCONFIG_INTERNAL_SHA512 |
| 1401 | SHA256OBJS += src/crypto/sha512-internal.c |
| 1402 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1403 | ifdef NEED_TLS_PRF_SHA256 |
| 1404 | SHA256OBJS += src/crypto/sha256-tlsprf.c |
| 1405 | endif |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 1406 | ifdef NEED_TLS_PRF_SHA384 |
| 1407 | SHA256OBJS += src/crypto/sha384-tlsprf.c |
| 1408 | endif |
Dmitry Shmidt | fb45fd5 | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 1409 | ifdef NEED_HMAC_SHA256_KDF |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1410 | L_CFLAGS += -DCONFIG_HMAC_SHA256_KDF |
Dmitry Shmidt | fb45fd5 | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 1411 | SHA256OBJS += src/crypto/sha256-kdf.c |
| 1412 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1413 | ifdef NEED_HMAC_SHA384_KDF |
| 1414 | L_CFLAGS += -DCONFIG_HMAC_SHA384_KDF |
| 1415 | SHA256OBJS += src/crypto/sha384-kdf.c |
| 1416 | endif |
| 1417 | ifdef NEED_HMAC_SHA512_KDF |
| 1418 | L_CFLAGS += -DCONFIG_HMAC_SHA512_KDF |
| 1419 | SHA256OBJS += src/crypto/sha512-kdf.c |
| 1420 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1421 | OBJS += $(SHA256OBJS) |
Dmitry Shmidt | 40b0720 | 2015-01-27 13:40:23 -0800 | [diff] [blame] | 1422 | ifdef NEED_SHA384 |
| 1423 | L_CFLAGS += -DCONFIG_SHA384 |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 1424 | ifneq ($(CONFIG_TLS), openssl) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1425 | ifneq ($(CONFIG_TLS), gnutls) |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 1426 | OBJS += src/crypto/sha384.c |
| 1427 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1428 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1429 | OBJS += src/crypto/sha384-prf.c |
Dmitry Shmidt | 40b0720 | 2015-01-27 13:40:23 -0800 | [diff] [blame] | 1430 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1431 | ifdef NEED_SHA512 |
| 1432 | L_CFLAGS += -DCONFIG_SHA512 |
| 1433 | ifneq ($(CONFIG_TLS), openssl) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1434 | ifneq ($(CONFIG_TLS), gnutls) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1435 | OBJS += src/crypto/sha512.c |
| 1436 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1437 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1438 | OBJS += src/crypto/sha512-prf.c |
| 1439 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1440 | |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 1441 | ifdef NEED_ASN1 |
| 1442 | OBJS += src/tls/asn1.c |
| 1443 | endif |
| 1444 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1445 | ifdef NEED_DH_GROUPS |
| 1446 | OBJS += src/crypto/dh_groups.c |
| 1447 | endif |
| 1448 | ifdef NEED_DH_GROUPS_ALL |
| 1449 | L_CFLAGS += -DALL_DH_GROUPS |
| 1450 | endif |
| 1451 | ifdef CONFIG_INTERNAL_DH_GROUP5 |
| 1452 | ifdef NEED_DH_GROUPS |
| 1453 | OBJS += src/crypto/dh_group5.c |
| 1454 | endif |
| 1455 | endif |
| 1456 | |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 1457 | ifdef NEED_ECC |
| 1458 | L_CFLAGS += -DCONFIG_ECC |
| 1459 | endif |
| 1460 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1461 | ifdef CONFIG_NO_RANDOM_POOL |
| 1462 | L_CFLAGS += -DCONFIG_NO_RANDOM_POOL |
| 1463 | else |
| 1464 | OBJS += src/crypto/random.c |
| 1465 | endif |
| 1466 | |
| 1467 | ifdef CONFIG_CTRL_IFACE |
| 1468 | ifeq ($(CONFIG_CTRL_IFACE), y) |
| 1469 | ifdef CONFIG_NATIVE_WINDOWS |
| 1470 | CONFIG_CTRL_IFACE=named_pipe |
| 1471 | else |
| 1472 | CONFIG_CTRL_IFACE=unix |
| 1473 | endif |
| 1474 | endif |
| 1475 | L_CFLAGS += -DCONFIG_CTRL_IFACE |
| 1476 | ifeq ($(CONFIG_CTRL_IFACE), unix) |
| 1477 | L_CFLAGS += -DCONFIG_CTRL_IFACE_UNIX |
Dmitry Shmidt | 31a29cc | 2016-03-09 15:58:17 -0800 | [diff] [blame] | 1478 | OBJS += src/common/ctrl_iface_common.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1479 | endif |
| 1480 | ifeq ($(CONFIG_CTRL_IFACE), udp) |
| 1481 | L_CFLAGS += -DCONFIG_CTRL_IFACE_UDP |
| 1482 | endif |
| 1483 | ifeq ($(CONFIG_CTRL_IFACE), named_pipe) |
| 1484 | L_CFLAGS += -DCONFIG_CTRL_IFACE_NAMED_PIPE |
| 1485 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1486 | ifeq ($(CONFIG_CTRL_IFACE), udp-remote) |
| 1487 | CONFIG_CTRL_IFACE=udp |
| 1488 | L_CFLAGS += -DCONFIG_CTRL_IFACE_UDP |
| 1489 | L_CFLAGS += -DCONFIG_CTRL_IFACE_UDP_REMOTE |
| 1490 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1491 | OBJS += ctrl_iface.c ctrl_iface_$(CONFIG_CTRL_IFACE).c |
| 1492 | endif |
| 1493 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1494 | ifdef CONFIG_CTRL_IFACE_DBUS_NEW |
Hai Shalom | 021b0b5 | 2019-04-10 11:17:58 -0700 | [diff] [blame] | 1495 | L_CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_NEW |
| 1496 | OBJS += dbus/dbus_dict_helpers.c |
| 1497 | OBJS += dbus/dbus_new_helpers.c |
| 1498 | OBJS += dbus/dbus_new.c dbus/dbus_new_handlers.c |
| 1499 | OBJS += dbus/dbus_common.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1500 | ifdef CONFIG_WPS |
Hai Shalom | 021b0b5 | 2019-04-10 11:17:58 -0700 | [diff] [blame] | 1501 | OBJS += dbus/dbus_new_handlers_wps.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1502 | endif |
Dmitry Shmidt | 13970b0 | 2011-06-30 16:51:41 -0700 | [diff] [blame] | 1503 | ifdef CONFIG_P2P |
Hai Shalom | 021b0b5 | 2019-04-10 11:17:58 -0700 | [diff] [blame] | 1504 | OBJS += dbus/dbus_new_handlers_p2p.c |
Dmitry Shmidt | 13970b0 | 2011-06-30 16:51:41 -0700 | [diff] [blame] | 1505 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1506 | ifdef CONFIG_CTRL_IFACE_DBUS_INTRO |
Hai Shalom | 021b0b5 | 2019-04-10 11:17:58 -0700 | [diff] [blame] | 1507 | OBJS += dbus/dbus_new_introspect.c |
| 1508 | L_CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_INTRO |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1509 | endif |
Hai Shalom | 021b0b5 | 2019-04-10 11:17:58 -0700 | [diff] [blame] | 1510 | L_CFLAGS += $(DBUS_INCLUDE) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1511 | endif |
| 1512 | |
Roshan Pius | 57ffbcf | 2016-09-27 09:12:46 -0700 | [diff] [blame] | 1513 | ifdef CONFIG_CTRL_IFACE_HIDL |
| 1514 | WPA_SUPPLICANT_USE_HIDL=y |
| 1515 | L_CFLAGS += -DCONFIG_HIDL -DCONFIG_CTRL_IFACE_HIDL |
Jimmy Chen | 105f8b8 | 2020-08-05 10:20:30 +0800 | [diff] [blame] | 1516 | HIDL_INTERFACE_VERSION := 1.4 |
Dmitry Shmidt | e466304 | 2016-04-04 10:07:49 -0700 | [diff] [blame] | 1517 | endif |
| 1518 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1519 | ifdef CONFIG_READLINE |
| 1520 | OBJS_c += src/utils/edit_readline.c |
| 1521 | LIBS_c += -lncurses -lreadline |
| 1522 | else |
| 1523 | ifdef CONFIG_WPA_CLI_EDIT |
| 1524 | OBJS_c += src/utils/edit.c |
| 1525 | else |
| 1526 | OBJS_c += src/utils/edit_simple.c |
| 1527 | endif |
| 1528 | endif |
| 1529 | |
| 1530 | ifdef CONFIG_NATIVE_WINDOWS |
| 1531 | L_CFLAGS += -DCONFIG_NATIVE_WINDOWS |
| 1532 | LIBS += -lws2_32 -lgdi32 -lcrypt32 |
| 1533 | LIBS_c += -lws2_32 |
| 1534 | LIBS_p += -lws2_32 -lgdi32 |
| 1535 | ifeq ($(CONFIG_CRYPTO), cryptoapi) |
| 1536 | LIBS_p += -lcrypt32 |
| 1537 | endif |
| 1538 | endif |
| 1539 | |
| 1540 | ifdef CONFIG_NO_STDOUT_DEBUG |
| 1541 | L_CFLAGS += -DCONFIG_NO_STDOUT_DEBUG |
| 1542 | ifndef CONFIG_CTRL_IFACE |
| 1543 | L_CFLAGS += -DCONFIG_NO_WPA_MSG |
| 1544 | endif |
| 1545 | endif |
| 1546 | |
| 1547 | ifdef CONFIG_ANDROID_LOG |
| 1548 | L_CFLAGS += -DCONFIG_ANDROID_LOG |
| 1549 | endif |
| 1550 | |
| 1551 | ifdef CONFIG_IPV6 |
| 1552 | # for eapol_test only |
| 1553 | L_CFLAGS += -DCONFIG_IPV6 |
| 1554 | endif |
| 1555 | |
| 1556 | ifdef NEED_BASE64 |
| 1557 | OBJS += src/utils/base64.c |
| 1558 | endif |
| 1559 | |
| 1560 | ifdef NEED_SME |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1561 | OBJS += sme.c |
| 1562 | L_CFLAGS += -DCONFIG_SME |
| 1563 | endif |
| 1564 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1565 | OBJS += src/common/ieee802_11_common.c |
Dmitry Shmidt | 746bde5 | 2015-01-12 13:01:47 -0800 | [diff] [blame] | 1566 | OBJS += src/common/hw_features_common.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1567 | |
| 1568 | ifdef NEED_EAP_COMMON |
| 1569 | OBJS += src/eap_common/eap_common.c |
| 1570 | endif |
| 1571 | |
| 1572 | ifndef CONFIG_MAIN |
| 1573 | CONFIG_MAIN=main |
| 1574 | endif |
| 1575 | |
| 1576 | ifdef CONFIG_DEBUG_SYSLOG |
| 1577 | L_CFLAGS += -DCONFIG_DEBUG_SYSLOG |
Dmitry Shmidt | 13970b0 | 2011-06-30 16:51:41 -0700 | [diff] [blame] | 1578 | ifdef CONFIG_DEBUG_SYSLOG_FACILITY |
| 1579 | L_CFLAGS += -DLOG_HOSTAPD="$(CONFIG_DEBUG_SYSLOG_FACILITY)" |
| 1580 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1581 | endif |
| 1582 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1583 | ifdef CONFIG_DEBUG_LINUX_TRACING |
| 1584 | L_CFLAGS += -DCONFIG_DEBUG_LINUX_TRACING |
| 1585 | endif |
| 1586 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1587 | ifdef CONFIG_DEBUG_FILE |
| 1588 | L_CFLAGS += -DCONFIG_DEBUG_FILE |
| 1589 | endif |
| 1590 | |
| 1591 | ifdef CONFIG_DELAYED_MIC_ERROR_REPORT |
| 1592 | L_CFLAGS += -DCONFIG_DELAYED_MIC_ERROR_REPORT |
| 1593 | endif |
| 1594 | |
| 1595 | ifdef CONFIG_FIPS |
| 1596 | L_CFLAGS += -DCONFIG_FIPS |
| 1597 | endif |
| 1598 | |
| 1599 | OBJS += $(SHA1OBJS) $(DESOBJS) |
| 1600 | |
| 1601 | OBJS_p += $(SHA1OBJS) |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1602 | OBJS_p += $(SHA256OBJS) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1603 | |
| 1604 | ifdef CONFIG_BGSCAN_SIMPLE |
| 1605 | L_CFLAGS += -DCONFIG_BGSCAN_SIMPLE |
| 1606 | OBJS += bgscan_simple.c |
| 1607 | NEED_BGSCAN=y |
| 1608 | endif |
| 1609 | |
| 1610 | ifdef CONFIG_BGSCAN_LEARN |
| 1611 | L_CFLAGS += -DCONFIG_BGSCAN_LEARN |
| 1612 | OBJS += bgscan_learn.c |
| 1613 | NEED_BGSCAN=y |
| 1614 | endif |
| 1615 | |
| 1616 | ifdef NEED_BGSCAN |
| 1617 | L_CFLAGS += -DCONFIG_BGSCAN |
| 1618 | OBJS += bgscan.c |
| 1619 | endif |
| 1620 | |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 1621 | ifdef CONFIG_AUTOSCAN_EXPONENTIAL |
| 1622 | L_CFLAGS += -DCONFIG_AUTOSCAN_EXPONENTIAL |
| 1623 | OBJS += autoscan_exponential.c |
| 1624 | NEED_AUTOSCAN=y |
| 1625 | endif |
| 1626 | |
| 1627 | ifdef CONFIG_AUTOSCAN_PERIODIC |
Dmitry Shmidt | 0fdea2c | 2013-11-05 18:12:54 -0800 | [diff] [blame] | 1628 | L_CFLAGS += -DCONFIG_AUTOSCAN_PERIODIC |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 1629 | OBJS += autoscan_periodic.c |
| 1630 | NEED_AUTOSCAN=y |
| 1631 | endif |
| 1632 | |
| 1633 | ifdef NEED_AUTOSCAN |
| 1634 | L_CFLAGS += -DCONFIG_AUTOSCAN |
| 1635 | OBJS += autoscan.c |
| 1636 | endif |
| 1637 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1638 | ifdef CONFIG_EXT_PASSWORD_TEST |
| 1639 | OBJS += src/utils/ext_password_test.c |
| 1640 | L_CFLAGS += -DCONFIG_EXT_PASSWORD_TEST |
| 1641 | NEED_EXT_PASSWORD=y |
| 1642 | endif |
| 1643 | |
| 1644 | ifdef NEED_EXT_PASSWORD |
| 1645 | OBJS += src/utils/ext_password.c |
| 1646 | L_CFLAGS += -DCONFIG_EXT_PASSWORD |
| 1647 | endif |
| 1648 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1649 | ifdef NEED_GAS_SERVER |
| 1650 | OBJS += src/common/gas_server.c |
| 1651 | L_CFLAGS += -DCONFIG_GAS_SERVER |
| 1652 | NEED_GAS=y |
| 1653 | endif |
| 1654 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1655 | ifdef NEED_GAS |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1656 | OBJS += src/common/gas.c |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1657 | OBJS += gas_query.c |
| 1658 | L_CFLAGS += -DCONFIG_GAS |
| 1659 | NEED_OFFCHANNEL=y |
| 1660 | endif |
| 1661 | |
| 1662 | ifdef NEED_OFFCHANNEL |
| 1663 | OBJS += offchannel.c |
| 1664 | L_CFLAGS += -DCONFIG_OFFCHANNEL |
| 1665 | endif |
| 1666 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1667 | ifdef NEED_JSON |
| 1668 | OBJS += src/utils/json.c |
| 1669 | L_CFLAGS += -DCONFIG_JSON |
| 1670 | endif |
| 1671 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1672 | OBJS += src/drivers/driver_common.c |
| 1673 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1674 | OBJS += wpa_supplicant.c events.c blacklist.c wpas_glue.c scan.c |
| 1675 | OBJS_t := $(OBJS) $(OBJS_l2) eapol_test.c |
| 1676 | OBJS_t += src/radius/radius_client.c |
| 1677 | OBJS_t += src/radius/radius.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1678 | OBJS_t2 := $(OBJS) $(OBJS_l2) preauth_test.c |
| 1679 | OBJS += $(CONFIG_MAIN).c |
| 1680 | |
| 1681 | ifdef CONFIG_PRIVSEP |
| 1682 | OBJS_priv += $(OBJS_d) src/drivers/drivers.c |
| 1683 | OBJS_priv += $(OBJS_l2) |
| 1684 | OBJS_priv += src/utils/os_$(CONFIG_OS).c |
| 1685 | OBJS_priv += src/utils/$(CONFIG_ELOOP).c |
| 1686 | OBJS_priv += src/utils/common.c |
| 1687 | OBJS_priv += src/utils/wpa_debug.c |
| 1688 | OBJS_priv += src/utils/wpabuf.c |
| 1689 | OBJS_priv += wpa_priv.c |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1690 | ifdef CONFIG_DRIVER_NL80211 |
| 1691 | OBJS_priv += src/common/ieee802_11_common.c |
| 1692 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1693 | OBJS += src/l2_packet/l2_packet_privsep.c |
| 1694 | OBJS += src/drivers/driver_privsep.c |
| 1695 | EXTRA_progs += wpa_priv |
| 1696 | else |
| 1697 | OBJS += $(OBJS_d) src/drivers/drivers.c |
| 1698 | OBJS += $(OBJS_l2) |
| 1699 | endif |
| 1700 | |
| 1701 | ifdef CONFIG_NDIS_EVENTS_INTEGRATED |
| 1702 | L_CFLAGS += -DCONFIG_NDIS_EVENTS_INTEGRATED |
| 1703 | OBJS += src/drivers/ndis_events.c |
| 1704 | EXTRALIBS += -loleaut32 -lole32 -luuid |
| 1705 | ifdef PLATFORMSDKLIB |
| 1706 | EXTRALIBS += $(PLATFORMSDKLIB)/WbemUuid.Lib |
| 1707 | else |
| 1708 | EXTRALIBS += WbemUuid.Lib |
| 1709 | endif |
| 1710 | endif |
| 1711 | |
| 1712 | ifndef LDO |
| 1713 | LDO=$(CC) |
| 1714 | endif |
| 1715 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1716 | ######################## |
| 1717 | |
| 1718 | include $(CLEAR_VARS) |
| 1719 | LOCAL_MODULE := wpa_cli |
Roshan Pius | 7c9288c | 2017-02-23 08:27:38 -0800 | [diff] [blame] | 1720 | LOCAL_PROPRIETARY_MODULE := true |
Ying Wang | e93dd11 | 2013-04-09 21:53:29 -0700 | [diff] [blame] | 1721 | LOCAL_SHARED_LIBRARIES := libc libcutils liblog |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1722 | LOCAL_CFLAGS := $(L_CFLAGS) |
| 1723 | LOCAL_SRC_FILES := $(OBJS_c) |
| 1724 | LOCAL_C_INCLUDES := $(INCLUDES) |
| 1725 | include $(BUILD_EXECUTABLE) |
| 1726 | |
| 1727 | ######################## |
| 1728 | include $(CLEAR_VARS) |
| 1729 | LOCAL_MODULE := wpa_supplicant |
Roshan Pius | 7c9288c | 2017-02-23 08:27:38 -0800 | [diff] [blame] | 1730 | LOCAL_PROPRIETARY_MODULE := true |
| 1731 | LOCAL_MODULE_RELATIVE_PATH := hw |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1732 | ifdef CONFIG_DRIVER_CUSTOM |
| 1733 | LOCAL_STATIC_LIBRARIES := libCustomWifi |
| 1734 | endif |
| 1735 | ifneq ($(BOARD_WPA_SUPPLICANT_PRIVATE_LIB),) |
| 1736 | LOCAL_STATIC_LIBRARIES += $(BOARD_WPA_SUPPLICANT_PRIVATE_LIB) |
| 1737 | endif |
Ying Wang | e93dd11 | 2013-04-09 21:53:29 -0700 | [diff] [blame] | 1738 | LOCAL_SHARED_LIBRARIES := libc libcutils liblog |
Dmitry Shmidt | 04f534e | 2013-12-09 15:50:16 -0800 | [diff] [blame] | 1739 | ifdef CONFIG_EAP_PROXY |
| 1740 | LOCAL_STATIC_LIBRARIES += $(LIB_STATIC_EAP_PROXY) |
| 1741 | LOCAL_SHARED_LIBRARIES += $(LIB_SHARED_EAP_PROXY) |
| 1742 | endif |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1743 | ifeq ($(CONFIG_TLS), openssl) |
Roshan Pius | 3eb7b24 | 2017-03-28 13:39:46 -0700 | [diff] [blame] | 1744 | LOCAL_SHARED_LIBRARIES += libcrypto libssl libkeystore-wifi-hidl |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1745 | endif |
Adam Langley | 1eb02ed | 2015-04-21 19:00:05 -0700 | [diff] [blame] | 1746 | |
| 1747 | # With BoringSSL we need libkeystore-engine in order to provide access to |
| 1748 | # keystore keys. |
Roshan Pius | 3eb7b24 | 2017-03-28 13:39:46 -0700 | [diff] [blame] | 1749 | LOCAL_SHARED_LIBRARIES += libkeystore-engine-wifi-hidl |
Adam Langley | 1eb02ed | 2015-04-21 19:00:05 -0700 | [diff] [blame] | 1750 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1751 | ifdef CONFIG_DRIVER_NL80211 |
Dmitry Shmidt | cd44645 | 2014-02-18 16:03:35 -0800 | [diff] [blame] | 1752 | ifneq ($(wildcard external/libnl),) |
Dmitry Shmidt | d620e6d | 2014-02-18 11:07:59 -0800 | [diff] [blame] | 1753 | LOCAL_SHARED_LIBRARIES += libnl |
Dmitry Shmidt | cd44645 | 2014-02-18 16:03:35 -0800 | [diff] [blame] | 1754 | else |
| 1755 | LOCAL_STATIC_LIBRARIES += libnl_2 |
| 1756 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1757 | endif |
| 1758 | LOCAL_CFLAGS := $(L_CFLAGS) |
| 1759 | LOCAL_SRC_FILES := $(OBJS) |
| 1760 | LOCAL_C_INCLUDES := $(INCLUDES) |
Samuel Tan | b798399 | 2015-08-11 09:59:20 -0700 | [diff] [blame] | 1761 | ifeq ($(DBUS), y) |
| 1762 | LOCAL_SHARED_LIBRARIES += libdbus |
| 1763 | endif |
Roshan Pius | 57ffbcf | 2016-09-27 09:12:46 -0700 | [diff] [blame] | 1764 | ifeq ($(WPA_SUPPLICANT_USE_HIDL), y) |
Roshan Pius | 7c0ebf2 | 2016-09-20 15:11:56 -0700 | [diff] [blame] | 1765 | LOCAL_SHARED_LIBRARIES += android.hardware.wifi.supplicant@1.0 |
Roshan Pius | 6ca7b54 | 2017-09-26 17:16:37 -0700 | [diff] [blame] | 1766 | LOCAL_SHARED_LIBRARIES += android.hardware.wifi.supplicant@1.1 |
Hai Shalom | 653e893 | 2018-10-15 15:21:37 -0700 | [diff] [blame] | 1767 | LOCAL_SHARED_LIBRARIES += android.hardware.wifi.supplicant@1.2 |
Jimmy Chen | 8b4fcbe | 2019-07-04 15:33:10 +0800 | [diff] [blame] | 1768 | LOCAL_SHARED_LIBRARIES += android.hardware.wifi.supplicant@1.3 |
Jimmy Chen | 105f8b8 | 2020-08-05 10:20:30 +0800 | [diff] [blame] | 1769 | LOCAL_SHARED_LIBRARIES += android.hardware.wifi.supplicant@1.4 |
Steven Moreland | 423bc96 | 2019-10-04 10:29:53 -0700 | [diff] [blame] | 1770 | LOCAL_SHARED_LIBRARIES += libhidlbase libutils libbase |
Roshan Pius | 57ffbcf | 2016-09-27 09:12:46 -0700 | [diff] [blame] | 1771 | LOCAL_STATIC_LIBRARIES += libwpa_hidl |
Jimmy Chen | 105f8b8 | 2020-08-05 10:20:30 +0800 | [diff] [blame] | 1772 | LOCAL_VINTF_FRAGMENTS := hidl/$(HIDL_INTERFACE_VERSION)/android.hardware.wifi.supplicant.xml |
Jimmy Chen | 461aeef | 2019-10-01 10:55:20 +0800 | [diff] [blame] | 1773 | ifeq ($(WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY), true) |
| 1774 | LOCAL_INIT_RC=hidl/$(HIDL_INTERFACE_VERSION)/android.hardware.wifi.supplicant-service.rc |
| 1775 | endif |
Dmitry Shmidt | e466304 | 2016-04-04 10:07:49 -0700 | [diff] [blame] | 1776 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1777 | include $(BUILD_EXECUTABLE) |
| 1778 | |
| 1779 | ######################## |
| 1780 | # |
| 1781 | #include $(CLEAR_VARS) |
| 1782 | #LOCAL_MODULE := eapol_test |
| 1783 | #ifdef CONFIG_DRIVER_CUSTOM |
| 1784 | #LOCAL_STATIC_LIBRARIES := libCustomWifi |
| 1785 | #endif |
| 1786 | #LOCAL_SHARED_LIBRARIES := libc libcrypto libssl |
| 1787 | #LOCAL_CFLAGS := $(L_CFLAGS) |
| 1788 | #LOCAL_SRC_FILES := $(OBJS_t) |
| 1789 | #LOCAL_C_INCLUDES := $(INCLUDES) |
| 1790 | #include $(BUILD_EXECUTABLE) |
| 1791 | # |
| 1792 | ######################## |
| 1793 | # |
| 1794 | #local_target_dir := $(TARGET_OUT)/etc/wifi |
| 1795 | # |
| 1796 | #include $(CLEAR_VARS) |
| 1797 | #LOCAL_MODULE := wpa_supplicant.conf |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1798 | #LOCAL_MODULE_CLASS := ETC |
| 1799 | #LOCAL_MODULE_PATH := $(local_target_dir) |
| 1800 | #LOCAL_SRC_FILES := $(LOCAL_MODULE) |
| 1801 | #include $(BUILD_PREBUILT) |
| 1802 | # |
| 1803 | ######################## |
| 1804 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1805 | include $(CLEAR_VARS) |
| 1806 | LOCAL_MODULE = libwpa_client |
Roshan Pius | 7c9288c | 2017-02-23 08:27:38 -0800 | [diff] [blame] | 1807 | LOCAL_PROPRIETARY_MODULE := true |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1808 | LOCAL_CFLAGS = $(L_CFLAGS) |
| 1809 | LOCAL_SRC_FILES = src/common/wpa_ctrl.c src/utils/os_$(CONFIG_OS).c |
| 1810 | LOCAL_C_INCLUDES = $(INCLUDES) |
Ying Wang | e93dd11 | 2013-04-09 21:53:29 -0700 | [diff] [blame] | 1811 | LOCAL_SHARED_LIBRARIES := libcutils liblog |
Vijay Venkatraman | 1afec61 | 2016-12-06 11:09:03 -0800 | [diff] [blame] | 1812 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/wpa_client_include $(LOCAL_PATH)/wpa_client_include/libwpa_client |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1813 | include $(BUILD_SHARED_LIBRARY) |
Dmitry Shmidt | 7f2c753 | 2016-08-15 09:48:12 -0700 | [diff] [blame] | 1814 | |
Roshan Pius | 57ffbcf | 2016-09-27 09:12:46 -0700 | [diff] [blame] | 1815 | ifeq ($(WPA_SUPPLICANT_USE_HIDL), y) |
| 1816 | ### Hidl service library ### |
Dmitry Shmidt | 7f2c753 | 2016-08-15 09:48:12 -0700 | [diff] [blame] | 1817 | ######################## |
Dmitry Shmidt | 7f2c753 | 2016-08-15 09:48:12 -0700 | [diff] [blame] | 1818 | include $(CLEAR_VARS) |
Roshan Pius | 57ffbcf | 2016-09-27 09:12:46 -0700 | [diff] [blame] | 1819 | LOCAL_MODULE := libwpa_hidl |
Jiyong Park | a1d8ba2 | 2017-06-26 13:11:29 +0900 | [diff] [blame] | 1820 | LOCAL_VENDOR_MODULE := true |
Dmitry Shmidt | 7f2c753 | 2016-08-15 09:48:12 -0700 | [diff] [blame] | 1821 | LOCAL_CPPFLAGS := $(L_CPPFLAGS) |
| 1822 | LOCAL_CFLAGS := $(L_CFLAGS) |
| 1823 | LOCAL_C_INCLUDES := $(INCLUDES) |
| 1824 | LOCAL_SRC_FILES := \ |
Roshan Pius | edd820c | 2017-05-16 14:21:49 -0700 | [diff] [blame] | 1825 | hidl/$(HIDL_INTERFACE_VERSION)/hidl.cpp \ |
| 1826 | hidl/$(HIDL_INTERFACE_VERSION)/hidl_manager.cpp \ |
| 1827 | hidl/$(HIDL_INTERFACE_VERSION)/iface_config_utils.cpp \ |
| 1828 | hidl/$(HIDL_INTERFACE_VERSION)/p2p_iface.cpp \ |
| 1829 | hidl/$(HIDL_INTERFACE_VERSION)/p2p_network.cpp \ |
| 1830 | hidl/$(HIDL_INTERFACE_VERSION)/sta_iface.cpp \ |
| 1831 | hidl/$(HIDL_INTERFACE_VERSION)/sta_network.cpp \ |
| 1832 | hidl/$(HIDL_INTERFACE_VERSION)/supplicant.cpp |
Dmitry Shmidt | 7f2c753 | 2016-08-15 09:48:12 -0700 | [diff] [blame] | 1833 | LOCAL_SHARED_LIBRARIES := \ |
Roshan Pius | 6ca7b54 | 2017-09-26 17:16:37 -0700 | [diff] [blame] | 1834 | android.hardware.wifi.supplicant@1.0 \ |
| 1835 | android.hardware.wifi.supplicant@1.1 \ |
Hai Shalom | 653e893 | 2018-10-15 15:21:37 -0700 | [diff] [blame] | 1836 | android.hardware.wifi.supplicant@1.2 \ |
Jimmy Chen | 8b4fcbe | 2019-07-04 15:33:10 +0800 | [diff] [blame] | 1837 | android.hardware.wifi.supplicant@1.3 \ |
Jimmy Chen | 105f8b8 | 2020-08-05 10:20:30 +0800 | [diff] [blame] | 1838 | android.hardware.wifi.supplicant@1.4 \ |
Roshan Pius | 0b4856b | 2018-02-09 14:29:24 -0800 | [diff] [blame] | 1839 | libbase \ |
Yifan Hong | 4313d26 | 2016-11-17 10:54:47 -0800 | [diff] [blame] | 1840 | libhidlbase \ |
Jiyong Park | a1d8ba2 | 2017-06-26 13:11:29 +0900 | [diff] [blame] | 1841 | libutils \ |
Hai Shalom | 5953285 | 2018-12-07 10:32:58 -0800 | [diff] [blame] | 1842 | liblog \ |
| 1843 | libssl |
Roshan Pius | edd820c | 2017-05-16 14:21:49 -0700 | [diff] [blame] | 1844 | LOCAL_EXPORT_C_INCLUDE_DIRS := \ |
| 1845 | $(LOCAL_PATH)/hidl/$(HIDL_INTERFACE_VERSION) |
Dmitry Shmidt | 7f2c753 | 2016-08-15 09:48:12 -0700 | [diff] [blame] | 1846 | include $(BUILD_STATIC_LIBRARY) |
Roshan Pius | 57ffbcf | 2016-09-27 09:12:46 -0700 | [diff] [blame] | 1847 | endif # WPA_SUPPLICANT_USE_HIDL == y |