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