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