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