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