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