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