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