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