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