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