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