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 | |
Elliott Hughes | 17cb3c1 | 2018-01-22 13:31:46 -0800 | [diff] [blame] | 40 | # TODO: move off readdir_r upstream, pull fix back (http://b/72326431). |
| 41 | L_CFLAGS += -Wno-error-deprecated-declarations |
| 42 | |
Chih-Hung Hsieh | cedf556 | 2017-10-26 10:56:55 -0700 | [diff] [blame] | 43 | # Disable unused function warnings |
| 44 | L_CFLAGS += -Wno-unused-function |
| 45 | |
| 46 | # Disable unused variable warnings |
| 47 | L_CFLAGS += -Wno-unused-variable |
| 48 | |
Dmitry Shmidt | f9bdef9 | 2014-04-25 10:46:36 -0700 | [diff] [blame] | 49 | # Disable unused parameter warnings |
| 50 | L_CFLAGS += -Wno-unused-parameter |
| 51 | |
Christopher Ferris | b6c19e0 | 2017-02-23 15:50:04 -0800 | [diff] [blame] | 52 | # Disable redefined macro warnings |
| 53 | L_CFLAGS += -Wno-macro-redefined |
| 54 | |
Dmitry Shmidt | b58836e | 2014-04-29 14:35:56 -0700 | [diff] [blame] | 55 | # Set Android extended P2P functionality |
| 56 | L_CFLAGS += -DANDROID_P2P |
Dmitry Shmidt | 4171258 | 2015-06-29 11:02:15 -0700 | [diff] [blame] | 57 | |
Dmitry Shmidt | b58836e | 2014-04-29 14:35:56 -0700 | [diff] [blame] | 58 | ifeq ($(BOARD_WPA_SUPPLICANT_PRIVATE_LIB),) |
Dmitry Shmidt | 4171258 | 2015-06-29 11:02:15 -0700 | [diff] [blame] | 59 | L_CFLAGS += -DANDROID_LIB_STUB |
Dmitry Shmidt | b58836e | 2014-04-29 14:35:56 -0700 | [diff] [blame] | 60 | endif |
| 61 | |
Dmitry Shmidt | 006dedf | 2012-02-21 16:30:45 -0800 | [diff] [blame] | 62 | # Disable roaming in wpa_supplicant |
| 63 | ifdef CONFIG_NO_ROAMING |
| 64 | L_CFLAGS += -DCONFIG_NO_ROAMING |
| 65 | endif |
| 66 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 67 | # Use Android specific directory for control interface sockets |
Jeff Vander Stoep | f9b80ff | 2018-01-24 07:51:04 -0800 | [diff] [blame^] | 68 | L_CFLAGS += -DCONFIG_CTRL_IFACE_CLIENT_DIR=\"/data/vendor/wifi/wpa/sockets\" |
| 69 | L_CFLAGS += -DCONFIG_CTRL_IFACE_DIR=\"/data/vendor/wifi/wpa/sockets\" |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 70 | |
Dmitry Shmidt | 912c6ec | 2015-03-30 13:16:51 -0700 | [diff] [blame] | 71 | # Use Android specific directory for wpa_cli command completion history |
Jeff Vander Stoep | f9b80ff | 2018-01-24 07:51:04 -0800 | [diff] [blame^] | 72 | L_CFLAGS += -DCONFIG_WPA_CLI_HISTORY_DIR=\"/data/vendor/wifi/wpa\" |
Dmitry Shmidt | 912c6ec | 2015-03-30 13:16:51 -0700 | [diff] [blame] | 73 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 74 | # To force sizeof(enum) = 4 |
| 75 | ifeq ($(TARGET_ARCH),arm) |
| 76 | L_CFLAGS += -mabi=aapcs-linux |
| 77 | endif |
| 78 | |
Roshan Pius | 57ffbcf | 2016-09-27 09:12:46 -0700 | [diff] [blame] | 79 | # C++ flags for hidl interface |
Roshan Pius | ad7939e | 2016-12-06 16:48:59 -0800 | [diff] [blame] | 80 | L_CPPFLAGS := -Wall -Werror |
Dmitry Shmidt | 7f2c753 | 2016-08-15 09:48:12 -0700 | [diff] [blame] | 81 | # TODO: Remove these allowed warnings later. |
| 82 | L_CPPFLAGS += -Wno-unused-variable -Wno-unused-parameter |
| 83 | L_CPPFLAGS += -Wno-unused-private-field |
| 84 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 85 | INCLUDES = $(LOCAL_PATH) |
| 86 | INCLUDES += $(LOCAL_PATH)/src |
| 87 | INCLUDES += $(LOCAL_PATH)/src/common |
| 88 | # INCLUDES += $(LOCAL_PATH)/src/crypto # To force proper includes |
| 89 | INCLUDES += $(LOCAL_PATH)/src/drivers |
| 90 | INCLUDES += $(LOCAL_PATH)/src/eap_common |
| 91 | INCLUDES += $(LOCAL_PATH)/src/eapol_supp |
| 92 | INCLUDES += $(LOCAL_PATH)/src/eap_peer |
| 93 | INCLUDES += $(LOCAL_PATH)/src/eap_server |
| 94 | INCLUDES += $(LOCAL_PATH)/src/hlr_auc_gw |
| 95 | INCLUDES += $(LOCAL_PATH)/src/l2_packet |
| 96 | INCLUDES += $(LOCAL_PATH)/src/radius |
| 97 | INCLUDES += $(LOCAL_PATH)/src/rsn_supp |
| 98 | INCLUDES += $(LOCAL_PATH)/src/tls |
| 99 | INCLUDES += $(LOCAL_PATH)/src/utils |
| 100 | INCLUDES += $(LOCAL_PATH)/src/wps |
Dmitry Shmidt | ffd6bf9 | 2013-11-07 18:13:08 -0800 | [diff] [blame] | 101 | INCLUDES += system/security/keystore/include |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 102 | ifdef CONFIG_DRIVER_NL80211 |
Dmitry Shmidt | cd44645 | 2014-02-18 16:03:35 -0800 | [diff] [blame] | 103 | ifneq ($(wildcard external/libnl),) |
Dmitry Shmidt | d620e6d | 2014-02-18 11:07:59 -0800 | [diff] [blame] | 104 | INCLUDES += external/libnl/include |
Dmitry Shmidt | cd44645 | 2014-02-18 16:03:35 -0800 | [diff] [blame] | 105 | else |
| 106 | INCLUDES += external/libnl-headers |
| 107 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 108 | endif |
| 109 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 110 | ifdef CONFIG_FIPS |
| 111 | CONFIG_NO_RANDOM_POOL= |
| 112 | CONFIG_OPENSSL_CMAC=y |
| 113 | endif |
| 114 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 115 | OBJS = config.c |
| 116 | OBJS += notify.c |
| 117 | OBJS += bss.c |
| 118 | OBJS += eap_register.c |
| 119 | OBJS += src/utils/common.c |
| 120 | OBJS += src/utils/wpa_debug.c |
| 121 | OBJS += src/utils/wpabuf.c |
Dmitry Shmidt | 2933359 | 2017-01-09 12:27:11 -0800 | [diff] [blame] | 122 | OBJS += src/utils/bitfield.c |
Dmitry Shmidt | fb45fd5 | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 123 | OBJS += wmm_ac.c |
Dmitry Shmidt | 2933359 | 2017-01-09 12:27:11 -0800 | [diff] [blame] | 124 | OBJS += op_classes.c |
| 125 | OBJS += rrm.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 126 | OBJS_p = wpa_passphrase.c |
| 127 | OBJS_p += src/utils/common.c |
| 128 | OBJS_p += src/utils/wpa_debug.c |
| 129 | OBJS_p += src/utils/wpabuf.c |
| 130 | OBJS_c = wpa_cli.c src/common/wpa_ctrl.c |
| 131 | OBJS_c += src/utils/wpa_debug.c |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 132 | OBJS_c += src/utils/common.c |
Dmitry Shmidt | 7f2c753 | 2016-08-15 09:48:12 -0700 | [diff] [blame] | 133 | OBJS_c += src/common/cli.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 134 | OBJS_d = |
| 135 | OBJS_priv = |
| 136 | |
| 137 | ifndef CONFIG_OS |
| 138 | ifdef CONFIG_NATIVE_WINDOWS |
| 139 | CONFIG_OS=win32 |
| 140 | else |
| 141 | CONFIG_OS=unix |
| 142 | endif |
| 143 | endif |
| 144 | |
| 145 | ifeq ($(CONFIG_OS), internal) |
| 146 | L_CFLAGS += -DOS_NO_C_LIB_DEFINES |
| 147 | endif |
| 148 | |
| 149 | OBJS += src/utils/os_$(CONFIG_OS).c |
| 150 | OBJS_p += src/utils/os_$(CONFIG_OS).c |
| 151 | OBJS_c += src/utils/os_$(CONFIG_OS).c |
| 152 | |
| 153 | ifdef CONFIG_WPA_TRACE |
| 154 | L_CFLAGS += -DWPA_TRACE |
| 155 | OBJS += src/utils/trace.c |
| 156 | OBJS_p += src/utils/trace.c |
| 157 | OBJS_c += src/utils/trace.c |
| 158 | LDFLAGS += -rdynamic |
| 159 | L_CFLAGS += -funwind-tables |
| 160 | ifdef CONFIG_WPA_TRACE_BFD |
| 161 | L_CFLAGS += -DWPA_TRACE_BFD |
| 162 | LIBS += -lbfd |
| 163 | LIBS_p += -lbfd |
| 164 | LIBS_c += -lbfd |
| 165 | endif |
| 166 | endif |
| 167 | |
| 168 | ifndef CONFIG_ELOOP |
| 169 | CONFIG_ELOOP=eloop |
| 170 | endif |
| 171 | OBJS += src/utils/$(CONFIG_ELOOP).c |
| 172 | OBJS_c += src/utils/$(CONFIG_ELOOP).c |
| 173 | |
Dmitry Shmidt | c5ec7f5 | 2012-03-06 16:33:24 -0800 | [diff] [blame] | 174 | ifdef CONFIG_ELOOP_POLL |
| 175 | L_CFLAGS += -DCONFIG_ELOOP_POLL |
| 176 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 177 | |
Dmitry Shmidt | 50b691d | 2014-05-21 14:01:45 -0700 | [diff] [blame] | 178 | ifdef CONFIG_ELOOP_EPOLL |
| 179 | L_CFLAGS += -DCONFIG_ELOOP_EPOLL |
| 180 | endif |
| 181 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 182 | ifdef CONFIG_EAPOL_TEST |
| 183 | L_CFLAGS += -Werror -DEAPOL_TEST |
| 184 | endif |
| 185 | |
Dmitry Shmidt | c5ec7f5 | 2012-03-06 16:33:24 -0800 | [diff] [blame] | 186 | ifdef CONFIG_HT_OVERRIDES |
| 187 | L_CFLAGS += -DCONFIG_HT_OVERRIDES |
| 188 | endif |
| 189 | |
Dmitry Shmidt | 2f02319 | 2013-03-12 12:44:17 -0700 | [diff] [blame] | 190 | ifdef CONFIG_VHT_OVERRIDES |
| 191 | L_CFLAGS += -DCONFIG_VHT_OVERRIDES |
| 192 | endif |
| 193 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 194 | ifndef CONFIG_BACKEND |
| 195 | CONFIG_BACKEND=file |
| 196 | endif |
| 197 | |
| 198 | ifeq ($(CONFIG_BACKEND), file) |
| 199 | OBJS += config_file.c |
| 200 | ifndef CONFIG_NO_CONFIG_BLOBS |
| 201 | NEED_BASE64=y |
| 202 | endif |
| 203 | L_CFLAGS += -DCONFIG_BACKEND_FILE |
| 204 | endif |
| 205 | |
| 206 | ifeq ($(CONFIG_BACKEND), winreg) |
| 207 | OBJS += config_winreg.c |
| 208 | endif |
| 209 | |
| 210 | ifeq ($(CONFIG_BACKEND), none) |
| 211 | OBJS += config_none.c |
| 212 | endif |
| 213 | |
| 214 | ifdef CONFIG_NO_CONFIG_WRITE |
| 215 | L_CFLAGS += -DCONFIG_NO_CONFIG_WRITE |
| 216 | endif |
| 217 | |
| 218 | ifdef CONFIG_NO_CONFIG_BLOBS |
| 219 | L_CFLAGS += -DCONFIG_NO_CONFIG_BLOBS |
| 220 | endif |
| 221 | |
| 222 | ifdef CONFIG_NO_SCAN_PROCESSING |
| 223 | L_CFLAGS += -DCONFIG_NO_SCAN_PROCESSING |
| 224 | endif |
| 225 | |
Dmitry Shmidt | fb45fd5 | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 226 | ifdef CONFIG_SUITEB |
| 227 | L_CFLAGS += -DCONFIG_SUITEB |
| 228 | NEED_SHA256=y |
| 229 | NEED_AES_OMAC1=y |
| 230 | endif |
| 231 | |
Dmitry Shmidt | 40b0720 | 2015-01-27 13:40:23 -0800 | [diff] [blame] | 232 | ifdef CONFIG_SUITEB192 |
| 233 | L_CFLAGS += -DCONFIG_SUITEB192 |
| 234 | NEED_SHA384=y |
| 235 | endif |
| 236 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 237 | ifdef CONFIG_IEEE80211W |
| 238 | L_CFLAGS += -DCONFIG_IEEE80211W |
| 239 | NEED_SHA256=y |
| 240 | NEED_AES_OMAC1=y |
| 241 | endif |
| 242 | |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 243 | ifdef CONFIG_IEEE80211R_AP |
| 244 | CONFIG_IEEE80211R=y |
| 245 | endif |
| 246 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 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 |
| 714 | endif |
| 715 | |
Dmitry Shmidt | 34af306 | 2013-07-11 10:46:32 -0700 | [diff] [blame] | 716 | ifdef CONFIG_EAP_EKE |
| 717 | # EAP-EKE |
| 718 | ifeq ($(CONFIG_EAP_EKE), dyn) |
| 719 | L_CFLAGS += -DEAP_EKE_DYNAMIC |
| 720 | EAPDYN += src/eap_peer/eap_eke.so |
| 721 | else |
| 722 | L_CFLAGS += -DEAP_EKE |
| 723 | 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] | 724 | endif |
| 725 | CONFIG_IEEE8021X_EAPOL=y |
| 726 | NEED_DH_GROUPS=y |
| 727 | NEED_DH_GROUPS_ALL=y |
| 728 | NEED_SHA256=y |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 729 | NEED_AES_CBC=y |
Dmitry Shmidt | 34af306 | 2013-07-11 10:46:32 -0700 | [diff] [blame] | 730 | endif |
| 731 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 732 | ifdef CONFIG_WPS |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 733 | # EAP-WSC |
| 734 | L_CFLAGS += -DCONFIG_WPS -DEAP_WSC |
| 735 | OBJS += wps_supplicant.c |
| 736 | OBJS += src/utils/uuid.c |
| 737 | OBJS += src/eap_peer/eap_wsc.c src/eap_common/eap_wsc_common.c |
| 738 | OBJS += src/wps/wps.c |
| 739 | OBJS += src/wps/wps_common.c |
| 740 | OBJS += src/wps/wps_attr_parse.c |
| 741 | OBJS += src/wps/wps_attr_build.c |
| 742 | OBJS += src/wps/wps_attr_process.c |
| 743 | OBJS += src/wps/wps_dev_attr.c |
| 744 | OBJS += src/wps/wps_enrollee.c |
| 745 | OBJS += src/wps/wps_registrar.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 746 | CONFIG_IEEE8021X_EAPOL=y |
| 747 | NEED_DH_GROUPS=y |
| 748 | NEED_SHA256=y |
| 749 | NEED_BASE64=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 750 | NEED_AES_CBC=y |
| 751 | NEED_MODEXP=y |
| 752 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 753 | ifdef CONFIG_WPS_NFC |
| 754 | L_CFLAGS += -DCONFIG_WPS_NFC |
| 755 | OBJS += src/wps/ndef.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 756 | NEED_WPS_OOB=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 757 | endif |
| 758 | |
| 759 | ifdef NEED_WPS_OOB |
| 760 | L_CFLAGS += -DCONFIG_WPS_OOB |
| 761 | endif |
| 762 | |
| 763 | ifdef CONFIG_WPS_ER |
| 764 | CONFIG_WPS_UPNP=y |
| 765 | L_CFLAGS += -DCONFIG_WPS_ER |
| 766 | OBJS += src/wps/wps_er.c |
| 767 | OBJS += src/wps/wps_er_ssdp.c |
| 768 | endif |
| 769 | |
| 770 | ifdef CONFIG_WPS_UPNP |
| 771 | L_CFLAGS += -DCONFIG_WPS_UPNP |
| 772 | OBJS += src/wps/wps_upnp.c |
| 773 | OBJS += src/wps/wps_upnp_ssdp.c |
| 774 | OBJS += src/wps/wps_upnp_web.c |
| 775 | OBJS += src/wps/wps_upnp_event.c |
| 776 | OBJS += src/wps/wps_upnp_ap.c |
| 777 | OBJS += src/wps/upnp_xml.c |
| 778 | OBJS += src/wps/httpread.c |
| 779 | OBJS += src/wps/http_client.c |
| 780 | OBJS += src/wps/http_server.c |
| 781 | endif |
| 782 | |
| 783 | ifdef CONFIG_WPS_STRICT |
| 784 | L_CFLAGS += -DCONFIG_WPS_STRICT |
| 785 | OBJS += src/wps/wps_validate.c |
| 786 | endif |
| 787 | |
| 788 | ifdef CONFIG_WPS_TESTING |
| 789 | L_CFLAGS += -DCONFIG_WPS_TESTING |
| 790 | endif |
| 791 | |
| 792 | ifdef CONFIG_WPS_REG_DISABLE_OPEN |
| 793 | L_CFLAGS += -DCONFIG_WPS_REG_DISABLE_OPEN |
| 794 | endif |
| 795 | |
| 796 | endif |
| 797 | |
| 798 | ifdef CONFIG_EAP_IKEV2 |
| 799 | # EAP-IKEv2 |
| 800 | ifeq ($(CONFIG_EAP_IKEV2), dyn) |
| 801 | L_CFLAGS += -DEAP_IKEV2_DYNAMIC |
| 802 | EAPDYN += src/eap_peer/eap_ikev2.so src/eap_peer/ikev2.c |
| 803 | EAPDYN += src/eap_common/eap_ikev2_common.c src/eap_common/ikev2_common.c |
| 804 | else |
| 805 | L_CFLAGS += -DEAP_IKEV2 |
| 806 | OBJS += src/eap_peer/eap_ikev2.c src/eap_peer/ikev2.c |
| 807 | 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] | 808 | endif |
| 809 | CONFIG_IEEE8021X_EAPOL=y |
| 810 | NEED_DH_GROUPS=y |
| 811 | NEED_DH_GROUPS_ALL=y |
| 812 | NEED_MODEXP=y |
| 813 | NEED_CIPHER=y |
| 814 | endif |
| 815 | |
| 816 | ifdef CONFIG_EAP_VENDOR_TEST |
| 817 | ifeq ($(CONFIG_EAP_VENDOR_TEST), dyn) |
| 818 | L_CFLAGS += -DEAP_VENDOR_TEST_DYNAMIC |
| 819 | EAPDYN += src/eap_peer/eap_vendor_test.so |
| 820 | else |
| 821 | L_CFLAGS += -DEAP_VENDOR_TEST |
| 822 | OBJS += src/eap_peer/eap_vendor_test.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 823 | endif |
| 824 | CONFIG_IEEE8021X_EAPOL=y |
| 825 | endif |
| 826 | |
| 827 | ifdef CONFIG_EAP_TNC |
| 828 | # EAP-TNC |
| 829 | L_CFLAGS += -DEAP_TNC |
| 830 | OBJS += src/eap_peer/eap_tnc.c |
| 831 | OBJS += src/eap_peer/tncc.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 832 | NEED_BASE64=y |
| 833 | ifndef CONFIG_NATIVE_WINDOWS |
| 834 | ifndef CONFIG_DRIVER_BSD |
| 835 | LIBS += -ldl |
| 836 | endif |
| 837 | endif |
| 838 | endif |
| 839 | |
| 840 | ifdef CONFIG_IEEE8021X_EAPOL |
| 841 | # IEEE 802.1X/EAPOL state machines (e.g., for RADIUS authentication) |
| 842 | L_CFLAGS += -DIEEE8021X_EAPOL |
| 843 | OBJS += src/eapol_supp/eapol_supp_sm.c |
| 844 | OBJS += src/eap_peer/eap.c src/eap_peer/eap_methods.c |
| 845 | NEED_EAP_COMMON=y |
| 846 | ifdef CONFIG_DYNAMIC_EAP_METHODS |
| 847 | L_CFLAGS += -DCONFIG_DYNAMIC_EAP_METHODS |
| 848 | LIBS += -ldl -rdynamic |
| 849 | endif |
| 850 | endif |
| 851 | |
| 852 | ifdef CONFIG_AP |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 853 | NEED_EAP_COMMON=y |
| 854 | NEED_RSN_AUTHENTICATOR=y |
| 855 | L_CFLAGS += -DCONFIG_AP |
| 856 | OBJS += ap.c |
| 857 | L_CFLAGS += -DCONFIG_NO_RADIUS |
| 858 | L_CFLAGS += -DCONFIG_NO_ACCOUNTING |
| 859 | L_CFLAGS += -DCONFIG_NO_VLAN |
| 860 | OBJS += src/ap/hostapd.c |
| 861 | OBJS += src/ap/wpa_auth_glue.c |
| 862 | OBJS += src/ap/utils.c |
| 863 | OBJS += src/ap/authsrv.c |
| 864 | OBJS += src/ap/ap_config.c |
| 865 | OBJS += src/utils/ip_addr.c |
| 866 | OBJS += src/ap/sta_info.c |
| 867 | OBJS += src/ap/tkip_countermeasures.c |
| 868 | OBJS += src/ap/ap_mlme.c |
| 869 | OBJS += src/ap/ieee802_1x.c |
| 870 | OBJS += src/eapol_auth/eapol_auth_sm.c |
| 871 | OBJS += src/ap/ieee802_11_auth.c |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 872 | OBJS += src/ap/ieee802_11_shared.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 873 | OBJS += src/ap/drv_callbacks.c |
| 874 | OBJS += src/ap/ap_drv_ops.c |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 875 | OBJS += src/ap/beacon.c |
Dmitry Shmidt | fb45fd5 | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 876 | OBJS += src/ap/bss_load.c |
Dmitry Shmidt | d5e4923 | 2012-12-03 15:08:10 -0800 | [diff] [blame] | 877 | OBJS += src/ap/eap_user_db.c |
Dmitry Shmidt | 849734c | 2016-05-27 09:59:01 -0700 | [diff] [blame] | 878 | OBJS += src/ap/neighbor_db.c |
| 879 | OBJS += src/ap/rrm.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 880 | ifdef CONFIG_IEEE80211N |
| 881 | OBJS += src/ap/ieee802_11_ht.c |
Dmitry Shmidt | 68d0e3e | 2013-10-28 17:59:21 -0700 | [diff] [blame] | 882 | ifdef CONFIG_IEEE80211AC |
| 883 | OBJS += src/ap/ieee802_11_vht.c |
| 884 | endif |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 885 | ifdef CONFIG_IEEE80211AX |
| 886 | OBJS += src/ap/ieee802_11_he.c |
| 887 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 888 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 889 | ifdef CONFIG_WNM_AP |
| 890 | L_CFLAGS += -DCONFIG_WNM_AP |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 891 | OBJS += src/ap/wnm_ap.c |
| 892 | endif |
Dmitry Shmidt | 57c2d39 | 2016-02-23 13:40:19 -0800 | [diff] [blame] | 893 | ifdef CONFIG_MBO |
| 894 | OBJS += src/ap/mbo_ap.c |
| 895 | endif |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 896 | ifdef CONFIG_FILS |
| 897 | OBJS += src/ap/fils_hlp.c |
| 898 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 899 | ifdef CONFIG_CTRL_IFACE |
| 900 | OBJS += src/ap/ctrl_iface_ap.c |
| 901 | endif |
| 902 | |
| 903 | L_CFLAGS += -DEAP_SERVER -DEAP_SERVER_IDENTITY |
| 904 | OBJS += src/eap_server/eap_server.c |
| 905 | OBJS += src/eap_server/eap_server_identity.c |
| 906 | OBJS += src/eap_server/eap_server_methods.c |
| 907 | |
| 908 | ifdef CONFIG_IEEE80211N |
| 909 | L_CFLAGS += -DCONFIG_IEEE80211N |
Dmitry Shmidt | 68d0e3e | 2013-10-28 17:59:21 -0700 | [diff] [blame] | 910 | ifdef CONFIG_IEEE80211AC |
| 911 | L_CFLAGS += -DCONFIG_IEEE80211AC |
| 912 | endif |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 913 | ifdef CONFIG_IEEE80211AX |
| 914 | L_CFLAGS += -DCONFIG_IEEE80211AX |
| 915 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 916 | endif |
| 917 | |
| 918 | ifdef NEED_AP_MLME |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 919 | OBJS += src/ap/wmm.c |
| 920 | OBJS += src/ap/ap_list.c |
| 921 | OBJS += src/ap/ieee802_11.c |
| 922 | OBJS += src/ap/hw_features.c |
Dmitry Shmidt | 051af73 | 2013-10-22 13:52:46 -0700 | [diff] [blame] | 923 | OBJS += src/ap/dfs.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 924 | L_CFLAGS += -DNEED_AP_MLME |
| 925 | endif |
| 926 | ifdef CONFIG_WPS |
| 927 | L_CFLAGS += -DEAP_SERVER_WSC |
| 928 | OBJS += src/ap/wps_hostapd.c |
| 929 | OBJS += src/eap_server/eap_server_wsc.c |
| 930 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 931 | ifdef CONFIG_DPP |
| 932 | OBJS += src/ap/dpp_hostapd.c |
| 933 | OBJS += src/ap/gas_query_ap.c |
| 934 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 935 | ifdef CONFIG_INTERWORKING |
| 936 | OBJS += src/ap/gas_serv.c |
| 937 | endif |
| 938 | ifdef CONFIG_HS20 |
| 939 | OBJS += src/ap/hs20.c |
| 940 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 941 | endif |
| 942 | |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 943 | ifdef CONFIG_MBO |
| 944 | OBJS += mbo.c |
| 945 | L_CFLAGS += -DCONFIG_MBO |
| 946 | endif |
| 947 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 948 | ifdef CONFIG_TESTING_OPTIONS |
| 949 | L_CFLAGS += -DCONFIG_TESTING_OPTIONS |
| 950 | endif |
| 951 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 952 | ifdef NEED_RSN_AUTHENTICATOR |
| 953 | L_CFLAGS += -DCONFIG_NO_RADIUS |
| 954 | NEED_AES_WRAP=y |
| 955 | OBJS += src/ap/wpa_auth.c |
| 956 | OBJS += src/ap/wpa_auth_ie.c |
| 957 | OBJS += src/ap/pmksa_cache_auth.c |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 958 | ifdef CONFIG_IEEE80211R_AP |
| 959 | L_CFLAGS += -DCONFIG_IEEE80211R_AP |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 960 | OBJS += src/ap/wpa_auth_ft.c |
| 961 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 962 | endif |
| 963 | |
Dmitry Shmidt | 014a3ff | 2015-12-28 13:27:49 -0800 | [diff] [blame] | 964 | ifdef CONFIG_ACS |
| 965 | L_CFLAGS += -DCONFIG_ACS |
| 966 | OBJS += src/ap/acs.c |
| 967 | LIBS += -lm |
| 968 | endif |
| 969 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 970 | ifdef CONFIG_PCSC |
| 971 | # PC/SC interface for smartcards (USIM, GSM SIM) |
| 972 | L_CFLAGS += -DPCSC_FUNCS -I/usr/include/PCSC |
| 973 | OBJS += src/utils/pcsc_funcs.c |
| 974 | # -lpthread may not be needed depending on how pcsc-lite was configured |
| 975 | ifdef CONFIG_NATIVE_WINDOWS |
| 976 | #Once MinGW gets support for WinScard, -lwinscard could be used instead of the |
| 977 | #dynamic symbol loading that is now used in pcsc_funcs.c |
| 978 | #LIBS += -lwinscard |
| 979 | else |
| 980 | LIBS += -lpcsclite -lpthread |
| 981 | endif |
| 982 | endif |
| 983 | |
| 984 | ifdef CONFIG_SIM_SIMULATOR |
| 985 | L_CFLAGS += -DCONFIG_SIM_SIMULATOR |
| 986 | NEED_MILENAGE=y |
| 987 | endif |
| 988 | |
| 989 | ifdef CONFIG_USIM_SIMULATOR |
| 990 | L_CFLAGS += -DCONFIG_USIM_SIMULATOR |
| 991 | NEED_MILENAGE=y |
| 992 | endif |
| 993 | |
| 994 | ifdef NEED_MILENAGE |
| 995 | OBJS += src/crypto/milenage.c |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 996 | NEED_AES_ENCBLOCK=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 997 | endif |
| 998 | |
| 999 | ifdef CONFIG_PKCS12 |
| 1000 | L_CFLAGS += -DPKCS12_FUNCS |
| 1001 | endif |
| 1002 | |
| 1003 | ifdef CONFIG_SMARTCARD |
| 1004 | L_CFLAGS += -DCONFIG_SMARTCARD |
| 1005 | endif |
| 1006 | |
| 1007 | ifdef MS_FUNCS |
| 1008 | OBJS += src/crypto/ms_funcs.c |
| 1009 | NEED_DES=y |
| 1010 | NEED_MD4=y |
| 1011 | endif |
| 1012 | |
| 1013 | ifdef CHAP |
| 1014 | OBJS += src/eap_common/chap.c |
| 1015 | endif |
| 1016 | |
| 1017 | ifdef TLS_FUNCS |
| 1018 | NEED_DES=y |
| 1019 | # Shared TLS functions (needed for EAP_TLS, EAP_PEAP, EAP_TTLS, and EAP_FAST) |
| 1020 | OBJS += src/eap_peer/eap_tls_common.c |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1021 | ifndef CONFIG_FIPS |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1022 | NEED_TLS_PRF=y |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 1023 | NEED_SHA1=y |
| 1024 | NEED_MD5=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1025 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1026 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1027 | |
| 1028 | ifndef CONFIG_TLS |
| 1029 | CONFIG_TLS=openssl |
| 1030 | endif |
| 1031 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1032 | ifdef CONFIG_TLSV11 |
| 1033 | L_CFLAGS += -DCONFIG_TLSV11 |
| 1034 | endif |
| 1035 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1036 | ifdef CONFIG_TLSV12 |
| 1037 | L_CFLAGS += -DCONFIG_TLSV12 |
| 1038 | NEED_SHA256=y |
| 1039 | endif |
| 1040 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1041 | ifeq ($(CONFIG_TLS), openssl) |
| 1042 | ifdef TLS_FUNCS |
| 1043 | L_CFLAGS += -DEAP_TLS_OPENSSL |
| 1044 | OBJS += src/crypto/tls_openssl.c |
Dmitry Shmidt | d7ff03d | 2015-12-04 14:49:35 -0800 | [diff] [blame] | 1045 | OBJS += src/crypto/tls_openssl_ocsp.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1046 | LIBS += -lssl |
| 1047 | endif |
| 1048 | OBJS += src/crypto/crypto_openssl.c |
| 1049 | OBJS_p += src/crypto/crypto_openssl.c |
| 1050 | ifdef NEED_FIPS186_2_PRF |
| 1051 | OBJS += src/crypto/fips_prf_openssl.c |
| 1052 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1053 | NEED_SHA256=y |
| 1054 | NEED_TLS_PRF_SHA256=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1055 | LIBS += -lcrypto |
| 1056 | LIBS_p += -lcrypto |
Dmitry Shmidt | d5e4923 | 2012-12-03 15:08:10 -0800 | [diff] [blame] | 1057 | ifdef CONFIG_TLS_ADD_DL |
| 1058 | LIBS += -ldl |
| 1059 | LIBS_p += -ldl |
| 1060 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1061 | ifndef CONFIG_TLS_DEFAULT_CIPHERS |
| 1062 | CONFIG_TLS_DEFAULT_CIPHERS = "DEFAULT:!EXP:!LOW" |
| 1063 | endif |
| 1064 | L_CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONFIG_TLS_DEFAULT_CIPHERS)\" |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1065 | endif |
| 1066 | |
| 1067 | ifeq ($(CONFIG_TLS), gnutls) |
| 1068 | ifdef TLS_FUNCS |
| 1069 | OBJS += src/crypto/tls_gnutls.c |
| 1070 | LIBS += -lgnutls -lgpg-error |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1071 | endif |
| 1072 | OBJS += src/crypto/crypto_gnutls.c |
| 1073 | OBJS_p += src/crypto/crypto_gnutls.c |
| 1074 | ifdef NEED_FIPS186_2_PRF |
Dmitry Shmidt | 9866086 | 2014-03-11 17:26:21 -0700 | [diff] [blame] | 1075 | OBJS += src/crypto/fips_prf_internal.c |
| 1076 | OBJS += src/crypto/sha1-internal.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1077 | endif |
| 1078 | LIBS += -lgcrypt |
| 1079 | LIBS_p += -lgcrypt |
| 1080 | CONFIG_INTERNAL_SHA256=y |
| 1081 | CONFIG_INTERNAL_RC4=y |
| 1082 | CONFIG_INTERNAL_DH_GROUP5=y |
| 1083 | endif |
| 1084 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1085 | ifeq ($(CONFIG_TLS), internal) |
| 1086 | ifndef CONFIG_CRYPTO |
| 1087 | CONFIG_CRYPTO=internal |
| 1088 | endif |
| 1089 | ifdef TLS_FUNCS |
| 1090 | OBJS += src/crypto/crypto_internal-rsa.c |
| 1091 | OBJS += src/crypto/tls_internal.c |
| 1092 | OBJS += src/tls/tlsv1_common.c |
| 1093 | OBJS += src/tls/tlsv1_record.c |
| 1094 | OBJS += src/tls/tlsv1_cred.c |
| 1095 | OBJS += src/tls/tlsv1_client.c |
| 1096 | OBJS += src/tls/tlsv1_client_write.c |
| 1097 | OBJS += src/tls/tlsv1_client_read.c |
Dmitry Shmidt | 55840ad | 2015-12-14 12:45:46 -0800 | [diff] [blame] | 1098 | OBJS += src/tls/tlsv1_client_ocsp.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1099 | OBJS += src/tls/asn1.c |
| 1100 | OBJS += src/tls/rsa.c |
| 1101 | OBJS += src/tls/x509v3.c |
| 1102 | OBJS += src/tls/pkcs1.c |
| 1103 | OBJS += src/tls/pkcs5.c |
| 1104 | OBJS += src/tls/pkcs8.c |
| 1105 | NEED_SHA256=y |
| 1106 | NEED_BASE64=y |
| 1107 | NEED_TLS_PRF=y |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1108 | ifdef CONFIG_TLSV12 |
| 1109 | NEED_TLS_PRF_SHA256=y |
| 1110 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1111 | NEED_MODEXP=y |
| 1112 | NEED_CIPHER=y |
| 1113 | L_CFLAGS += -DCONFIG_TLS_INTERNAL_CLIENT |
| 1114 | endif |
| 1115 | ifdef NEED_CIPHER |
| 1116 | NEED_DES=y |
| 1117 | OBJS += src/crypto/crypto_internal-cipher.c |
| 1118 | endif |
| 1119 | ifdef NEED_MODEXP |
| 1120 | OBJS += src/crypto/crypto_internal-modexp.c |
| 1121 | OBJS += src/tls/bignum.c |
| 1122 | endif |
| 1123 | ifeq ($(CONFIG_CRYPTO), libtomcrypt) |
| 1124 | OBJS += src/crypto/crypto_libtomcrypt.c |
| 1125 | OBJS_p += src/crypto/crypto_libtomcrypt.c |
| 1126 | LIBS += -ltomcrypt -ltfm |
| 1127 | LIBS_p += -ltomcrypt -ltfm |
| 1128 | CONFIG_INTERNAL_SHA256=y |
| 1129 | CONFIG_INTERNAL_RC4=y |
| 1130 | CONFIG_INTERNAL_DH_GROUP5=y |
| 1131 | endif |
| 1132 | ifeq ($(CONFIG_CRYPTO), internal) |
| 1133 | OBJS += src/crypto/crypto_internal.c |
| 1134 | OBJS_p += src/crypto/crypto_internal.c |
| 1135 | NEED_AES_ENC=y |
| 1136 | L_CFLAGS += -DCONFIG_CRYPTO_INTERNAL |
| 1137 | ifdef CONFIG_INTERNAL_LIBTOMMATH |
| 1138 | L_CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH |
| 1139 | ifdef CONFIG_INTERNAL_LIBTOMMATH_FAST |
| 1140 | L_CFLAGS += -DLTM_FAST |
| 1141 | endif |
| 1142 | else |
| 1143 | LIBS += -ltommath |
| 1144 | LIBS_p += -ltommath |
| 1145 | endif |
| 1146 | CONFIG_INTERNAL_AES=y |
| 1147 | CONFIG_INTERNAL_DES=y |
| 1148 | CONFIG_INTERNAL_SHA1=y |
| 1149 | CONFIG_INTERNAL_MD4=y |
| 1150 | CONFIG_INTERNAL_MD5=y |
| 1151 | CONFIG_INTERNAL_SHA256=y |
Dmitry Shmidt | d7ff03d | 2015-12-04 14:49:35 -0800 | [diff] [blame] | 1152 | CONFIG_INTERNAL_SHA384=y |
| 1153 | CONFIG_INTERNAL_SHA512=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1154 | CONFIG_INTERNAL_RC4=y |
| 1155 | CONFIG_INTERNAL_DH_GROUP5=y |
| 1156 | endif |
| 1157 | ifeq ($(CONFIG_CRYPTO), cryptoapi) |
| 1158 | OBJS += src/crypto/crypto_cryptoapi.c |
| 1159 | OBJS_p += src/crypto/crypto_cryptoapi.c |
| 1160 | L_CFLAGS += -DCONFIG_CRYPTO_CRYPTOAPI |
| 1161 | CONFIG_INTERNAL_SHA256=y |
| 1162 | CONFIG_INTERNAL_RC4=y |
| 1163 | endif |
| 1164 | endif |
| 1165 | |
| 1166 | ifeq ($(CONFIG_TLS), none) |
| 1167 | ifdef TLS_FUNCS |
| 1168 | OBJS += src/crypto/tls_none.c |
| 1169 | L_CFLAGS += -DEAP_TLS_NONE |
| 1170 | CONFIG_INTERNAL_AES=y |
| 1171 | CONFIG_INTERNAL_SHA1=y |
| 1172 | CONFIG_INTERNAL_MD5=y |
| 1173 | endif |
| 1174 | OBJS += src/crypto/crypto_none.c |
| 1175 | OBJS_p += src/crypto/crypto_none.c |
| 1176 | CONFIG_INTERNAL_SHA256=y |
| 1177 | CONFIG_INTERNAL_RC4=y |
| 1178 | endif |
| 1179 | |
| 1180 | ifdef TLS_FUNCS |
| 1181 | ifdef CONFIG_SMARTCARD |
| 1182 | ifndef CONFIG_NATIVE_WINDOWS |
| 1183 | ifneq ($(CONFIG_L2_PACKET), freebsd) |
| 1184 | LIBS += -ldl |
| 1185 | endif |
| 1186 | endif |
| 1187 | endif |
| 1188 | endif |
| 1189 | |
| 1190 | ifndef TLS_FUNCS |
| 1191 | OBJS += src/crypto/tls_none.c |
| 1192 | ifeq ($(CONFIG_TLS), internal) |
| 1193 | CONFIG_INTERNAL_AES=y |
| 1194 | CONFIG_INTERNAL_SHA1=y |
| 1195 | CONFIG_INTERNAL_MD5=y |
| 1196 | CONFIG_INTERNAL_RC4=y |
| 1197 | endif |
| 1198 | endif |
| 1199 | |
| 1200 | AESOBJS = # none so far (see below) |
| 1201 | ifdef CONFIG_INTERNAL_AES |
| 1202 | AESOBJS += src/crypto/aes-internal.c src/crypto/aes-internal-dec.c |
| 1203 | endif |
| 1204 | |
Dmitry Shmidt | aff761d | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 1205 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1206 | NEED_INTERNAL_AES_WRAP=y |
| 1207 | endif |
| 1208 | ifdef CONFIG_OPENSSL_INTERNAL_AES_WRAP |
| 1209 | # Seems to be needed at least with BoringSSL |
| 1210 | NEED_INTERNAL_AES_WRAP=y |
| 1211 | L_CFLAGS += -DCONFIG_OPENSSL_INTERNAL_AES_WRAP |
| 1212 | endif |
| 1213 | ifdef CONFIG_FIPS |
| 1214 | # Have to use internal AES key wrap routines to use OpenSSL EVP since the |
| 1215 | # OpenSSL AES_wrap_key()/AES_unwrap_key() API is not available in FIPS mode. |
| 1216 | NEED_INTERNAL_AES_WRAP=y |
| 1217 | endif |
| 1218 | |
| 1219 | ifdef NEED_INTERNAL_AES_WRAP |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1220 | AESOBJS += src/crypto/aes-unwrap.c |
Dmitry Shmidt | aff761d | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 1221 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1222 | ifdef NEED_AES_EAX |
| 1223 | AESOBJS += src/crypto/aes-eax.c |
| 1224 | NEED_AES_CTR=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1225 | NEED_AES_OMAC1=y |
| 1226 | endif |
| 1227 | ifdef NEED_AES_SIV |
| 1228 | AESOBJS += src/crypto/aes-siv.c |
| 1229 | NEED_AES_CTR=y |
| 1230 | NEED_AES_OMAC1=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1231 | endif |
| 1232 | ifdef NEED_AES_CTR |
| 1233 | AESOBJS += src/crypto/aes-ctr.c |
| 1234 | endif |
| 1235 | ifdef NEED_AES_ENCBLOCK |
| 1236 | AESOBJS += src/crypto/aes-encblock.c |
| 1237 | endif |
| 1238 | ifdef NEED_AES_OMAC1 |
| 1239 | NEED_AES_ENC=y |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1240 | ifdef CONFIG_OPENSSL_CMAC |
Dmitry Shmidt | 0fdea2c | 2013-11-05 18:12:54 -0800 | [diff] [blame] | 1241 | L_CFLAGS += -DCONFIG_OPENSSL_CMAC |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1242 | else |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1243 | AESOBJS += src/crypto/aes-omac1.c |
| 1244 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1245 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1246 | ifdef NEED_AES_WRAP |
| 1247 | NEED_AES_ENC=y |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1248 | ifdef NEED_INTERNAL_AES_WRAP |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1249 | AESOBJS += src/crypto/aes-wrap.c |
| 1250 | endif |
Dmitry Shmidt | aff761d | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 1251 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1252 | ifdef NEED_AES_CBC |
| 1253 | NEED_AES_ENC=y |
Dmitry Shmidt | 912c6ec | 2015-03-30 13:16:51 -0700 | [diff] [blame] | 1254 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1255 | AESOBJS += src/crypto/aes-cbc.c |
| 1256 | endif |
Dmitry Shmidt | 912c6ec | 2015-03-30 13:16:51 -0700 | [diff] [blame] | 1257 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1258 | ifdef NEED_AES_ENC |
| 1259 | ifdef CONFIG_INTERNAL_AES |
| 1260 | AESOBJS += src/crypto/aes-internal-enc.c |
| 1261 | endif |
| 1262 | endif |
| 1263 | ifdef NEED_AES |
| 1264 | OBJS += $(AESOBJS) |
| 1265 | endif |
| 1266 | |
| 1267 | SHA1OBJS = |
| 1268 | ifdef NEED_SHA1 |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1269 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1270 | SHA1OBJS += src/crypto/sha1.c |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1271 | endif |
| 1272 | SHA1OBJS += src/crypto/sha1-prf.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1273 | ifdef CONFIG_INTERNAL_SHA1 |
| 1274 | SHA1OBJS += src/crypto/sha1-internal.c |
| 1275 | ifdef NEED_FIPS186_2_PRF |
| 1276 | SHA1OBJS += src/crypto/fips_prf_internal.c |
| 1277 | endif |
| 1278 | endif |
Dmitry Shmidt | 13970b0 | 2011-06-30 16:51:41 -0700 | [diff] [blame] | 1279 | ifdef CONFIG_NO_WPA_PASSPHRASE |
| 1280 | L_CFLAGS += -DCONFIG_NO_PBKDF2 |
| 1281 | else |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1282 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1283 | SHA1OBJS += src/crypto/sha1-pbkdf2.c |
| 1284 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1285 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1286 | ifdef NEED_T_PRF |
| 1287 | SHA1OBJS += src/crypto/sha1-tprf.c |
| 1288 | endif |
| 1289 | ifdef NEED_TLS_PRF |
| 1290 | SHA1OBJS += src/crypto/sha1-tlsprf.c |
| 1291 | endif |
| 1292 | endif |
| 1293 | |
Dmitry Shmidt | 5460547 | 2013-11-08 11:10:19 -0800 | [diff] [blame] | 1294 | MD5OBJS = |
| 1295 | ifndef CONFIG_FIPS |
Dmitry Shmidt | aff761d | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 1296 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | 5460547 | 2013-11-08 11:10:19 -0800 | [diff] [blame] | 1297 | MD5OBJS += src/crypto/md5.c |
| 1298 | endif |
Dmitry Shmidt | aff761d | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 1299 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1300 | ifdef NEED_MD5 |
| 1301 | ifdef CONFIG_INTERNAL_MD5 |
| 1302 | MD5OBJS += src/crypto/md5-internal.c |
| 1303 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1304 | OBJS += $(MD5OBJS) |
| 1305 | OBJS_p += $(MD5OBJS) |
| 1306 | endif |
| 1307 | |
| 1308 | ifdef NEED_MD4 |
| 1309 | ifdef CONFIG_INTERNAL_MD4 |
| 1310 | OBJS += src/crypto/md4-internal.c |
| 1311 | endif |
| 1312 | endif |
| 1313 | |
| 1314 | DESOBJS = # none needed when not internal |
| 1315 | ifdef NEED_DES |
| 1316 | ifdef CONFIG_INTERNAL_DES |
| 1317 | DESOBJS += src/crypto/des-internal.c |
| 1318 | endif |
| 1319 | endif |
| 1320 | |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1321 | ifdef CONFIG_NO_RC4 |
| 1322 | L_CFLAGS += -DCONFIG_NO_RC4 |
| 1323 | endif |
| 1324 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1325 | ifdef NEED_RC4 |
| 1326 | ifdef CONFIG_INTERNAL_RC4 |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1327 | ifndef CONFIG_NO_RC4 |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1328 | OBJS += src/crypto/rc4.c |
| 1329 | endif |
| 1330 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1331 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1332 | |
| 1333 | SHA256OBJS = # none by default |
| 1334 | ifdef NEED_SHA256 |
| 1335 | L_CFLAGS += -DCONFIG_SHA256 |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1336 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1337 | SHA256OBJS += src/crypto/sha256.c |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1338 | endif |
| 1339 | SHA256OBJS += src/crypto/sha256-prf.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1340 | ifdef CONFIG_INTERNAL_SHA256 |
| 1341 | SHA256OBJS += src/crypto/sha256-internal.c |
| 1342 | endif |
Dmitry Shmidt | d7ff03d | 2015-12-04 14:49:35 -0800 | [diff] [blame] | 1343 | ifdef CONFIG_INTERNAL_SHA384 |
| 1344 | L_CFLAGS += -DCONFIG_INTERNAL_SHA384 |
| 1345 | SHA256OBJS += src/crypto/sha384-internal.c |
| 1346 | endif |
| 1347 | ifdef CONFIG_INTERNAL_SHA512 |
| 1348 | L_CFLAGS += -DCONFIG_INTERNAL_SHA512 |
| 1349 | SHA256OBJS += src/crypto/sha512-internal.c |
| 1350 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1351 | ifdef NEED_TLS_PRF_SHA256 |
| 1352 | SHA256OBJS += src/crypto/sha256-tlsprf.c |
| 1353 | endif |
Dmitry Shmidt | fb45fd5 | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 1354 | ifdef NEED_HMAC_SHA256_KDF |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1355 | L_CFLAGS += -DCONFIG_HMAC_SHA256_KDF |
Dmitry Shmidt | fb45fd5 | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 1356 | SHA256OBJS += src/crypto/sha256-kdf.c |
| 1357 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1358 | ifdef NEED_HMAC_SHA384_KDF |
| 1359 | L_CFLAGS += -DCONFIG_HMAC_SHA384_KDF |
| 1360 | SHA256OBJS += src/crypto/sha384-kdf.c |
| 1361 | endif |
| 1362 | ifdef NEED_HMAC_SHA512_KDF |
| 1363 | L_CFLAGS += -DCONFIG_HMAC_SHA512_KDF |
| 1364 | SHA256OBJS += src/crypto/sha512-kdf.c |
| 1365 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1366 | OBJS += $(SHA256OBJS) |
| 1367 | endif |
Dmitry Shmidt | 40b0720 | 2015-01-27 13:40:23 -0800 | [diff] [blame] | 1368 | ifdef NEED_SHA384 |
| 1369 | L_CFLAGS += -DCONFIG_SHA384 |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 1370 | ifneq ($(CONFIG_TLS), openssl) |
| 1371 | OBJS += src/crypto/sha384.c |
| 1372 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1373 | OBJS += src/crypto/sha384-prf.c |
Dmitry Shmidt | 40b0720 | 2015-01-27 13:40:23 -0800 | [diff] [blame] | 1374 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1375 | ifdef NEED_SHA512 |
| 1376 | L_CFLAGS += -DCONFIG_SHA512 |
| 1377 | ifneq ($(CONFIG_TLS), openssl) |
| 1378 | OBJS += src/crypto/sha512.c |
| 1379 | endif |
| 1380 | OBJS += src/crypto/sha512-prf.c |
| 1381 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1382 | |
| 1383 | ifdef NEED_DH_GROUPS |
| 1384 | OBJS += src/crypto/dh_groups.c |
| 1385 | endif |
| 1386 | ifdef NEED_DH_GROUPS_ALL |
| 1387 | L_CFLAGS += -DALL_DH_GROUPS |
| 1388 | endif |
| 1389 | ifdef CONFIG_INTERNAL_DH_GROUP5 |
| 1390 | ifdef NEED_DH_GROUPS |
| 1391 | OBJS += src/crypto/dh_group5.c |
| 1392 | endif |
| 1393 | endif |
| 1394 | |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 1395 | ifdef NEED_ECC |
| 1396 | L_CFLAGS += -DCONFIG_ECC |
| 1397 | endif |
| 1398 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1399 | ifdef CONFIG_NO_RANDOM_POOL |
| 1400 | L_CFLAGS += -DCONFIG_NO_RANDOM_POOL |
| 1401 | else |
| 1402 | OBJS += src/crypto/random.c |
| 1403 | endif |
| 1404 | |
| 1405 | ifdef CONFIG_CTRL_IFACE |
| 1406 | ifeq ($(CONFIG_CTRL_IFACE), y) |
| 1407 | ifdef CONFIG_NATIVE_WINDOWS |
| 1408 | CONFIG_CTRL_IFACE=named_pipe |
| 1409 | else |
| 1410 | CONFIG_CTRL_IFACE=unix |
| 1411 | endif |
| 1412 | endif |
| 1413 | L_CFLAGS += -DCONFIG_CTRL_IFACE |
| 1414 | ifeq ($(CONFIG_CTRL_IFACE), unix) |
| 1415 | L_CFLAGS += -DCONFIG_CTRL_IFACE_UNIX |
Dmitry Shmidt | 31a29cc | 2016-03-09 15:58:17 -0800 | [diff] [blame] | 1416 | OBJS += src/common/ctrl_iface_common.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1417 | endif |
| 1418 | ifeq ($(CONFIG_CTRL_IFACE), udp) |
| 1419 | L_CFLAGS += -DCONFIG_CTRL_IFACE_UDP |
| 1420 | endif |
| 1421 | ifeq ($(CONFIG_CTRL_IFACE), named_pipe) |
| 1422 | L_CFLAGS += -DCONFIG_CTRL_IFACE_NAMED_PIPE |
| 1423 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1424 | ifeq ($(CONFIG_CTRL_IFACE), udp-remote) |
| 1425 | CONFIG_CTRL_IFACE=udp |
| 1426 | L_CFLAGS += -DCONFIG_CTRL_IFACE_UDP |
| 1427 | L_CFLAGS += -DCONFIG_CTRL_IFACE_UDP_REMOTE |
| 1428 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1429 | OBJS += ctrl_iface.c ctrl_iface_$(CONFIG_CTRL_IFACE).c |
| 1430 | endif |
| 1431 | |
| 1432 | ifdef CONFIG_CTRL_IFACE_DBUS |
| 1433 | DBUS=y |
| 1434 | DBUS_CFLAGS += -DCONFIG_CTRL_IFACE_DBUS -DDBUS_API_SUBJECT_TO_CHANGE |
| 1435 | DBUS_OBJS += dbus/dbus_old.c dbus/dbus_old_handlers.c |
| 1436 | ifdef CONFIG_WPS |
| 1437 | DBUS_OBJS += dbus/dbus_old_handlers_wps.c |
| 1438 | endif |
| 1439 | DBUS_OBJS += dbus/dbus_dict_helpers.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1440 | DBUS_CFLAGS += $(DBUS_INCLUDE) |
| 1441 | endif |
| 1442 | |
| 1443 | ifdef CONFIG_CTRL_IFACE_DBUS_NEW |
| 1444 | DBUS=y |
| 1445 | DBUS_CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_NEW |
| 1446 | DBUS_OBJS ?= dbus/dbus_dict_helpers.c |
| 1447 | DBUS_OBJS += dbus/dbus_new_helpers.c |
| 1448 | DBUS_OBJS += dbus/dbus_new.c dbus/dbus_new_handlers.c |
| 1449 | ifdef CONFIG_WPS |
| 1450 | DBUS_OBJS += dbus/dbus_new_handlers_wps.c |
| 1451 | endif |
Dmitry Shmidt | 13970b0 | 2011-06-30 16:51:41 -0700 | [diff] [blame] | 1452 | ifdef CONFIG_P2P |
| 1453 | DBUS_OBJS += dbus/dbus_new_handlers_p2p.c |
| 1454 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1455 | ifdef CONFIG_CTRL_IFACE_DBUS_INTRO |
| 1456 | DBUS_OBJS += dbus/dbus_new_introspect.c |
| 1457 | DBUS_CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_INTRO |
| 1458 | endif |
| 1459 | DBUS_CFLAGS += $(DBUS_INCLUDE) |
| 1460 | endif |
| 1461 | |
| 1462 | ifdef DBUS |
| 1463 | DBUS_CFLAGS += -DCONFIG_DBUS |
| 1464 | DBUS_OBJS += dbus/dbus_common.c |
| 1465 | endif |
| 1466 | |
| 1467 | OBJS += $(DBUS_OBJS) |
| 1468 | L_CFLAGS += $(DBUS_CFLAGS) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1469 | |
Roshan Pius | 57ffbcf | 2016-09-27 09:12:46 -0700 | [diff] [blame] | 1470 | ifdef CONFIG_CTRL_IFACE_HIDL |
| 1471 | WPA_SUPPLICANT_USE_HIDL=y |
| 1472 | L_CFLAGS += -DCONFIG_HIDL -DCONFIG_CTRL_IFACE_HIDL |
Dmitry Shmidt | e466304 | 2016-04-04 10:07:49 -0700 | [diff] [blame] | 1473 | endif |
| 1474 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1475 | ifdef CONFIG_READLINE |
| 1476 | OBJS_c += src/utils/edit_readline.c |
| 1477 | LIBS_c += -lncurses -lreadline |
| 1478 | else |
| 1479 | ifdef CONFIG_WPA_CLI_EDIT |
| 1480 | OBJS_c += src/utils/edit.c |
| 1481 | else |
| 1482 | OBJS_c += src/utils/edit_simple.c |
| 1483 | endif |
| 1484 | endif |
| 1485 | |
| 1486 | ifdef CONFIG_NATIVE_WINDOWS |
| 1487 | L_CFLAGS += -DCONFIG_NATIVE_WINDOWS |
| 1488 | LIBS += -lws2_32 -lgdi32 -lcrypt32 |
| 1489 | LIBS_c += -lws2_32 |
| 1490 | LIBS_p += -lws2_32 -lgdi32 |
| 1491 | ifeq ($(CONFIG_CRYPTO), cryptoapi) |
| 1492 | LIBS_p += -lcrypt32 |
| 1493 | endif |
| 1494 | endif |
| 1495 | |
| 1496 | ifdef CONFIG_NO_STDOUT_DEBUG |
| 1497 | L_CFLAGS += -DCONFIG_NO_STDOUT_DEBUG |
| 1498 | ifndef CONFIG_CTRL_IFACE |
| 1499 | L_CFLAGS += -DCONFIG_NO_WPA_MSG |
| 1500 | endif |
| 1501 | endif |
| 1502 | |
| 1503 | ifdef CONFIG_ANDROID_LOG |
| 1504 | L_CFLAGS += -DCONFIG_ANDROID_LOG |
| 1505 | endif |
| 1506 | |
| 1507 | ifdef CONFIG_IPV6 |
| 1508 | # for eapol_test only |
| 1509 | L_CFLAGS += -DCONFIG_IPV6 |
| 1510 | endif |
| 1511 | |
| 1512 | ifdef NEED_BASE64 |
| 1513 | OBJS += src/utils/base64.c |
| 1514 | endif |
| 1515 | |
| 1516 | ifdef NEED_SME |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1517 | OBJS += sme.c |
| 1518 | L_CFLAGS += -DCONFIG_SME |
| 1519 | endif |
| 1520 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1521 | OBJS += src/common/ieee802_11_common.c |
Dmitry Shmidt | 746bde5 | 2015-01-12 13:01:47 -0800 | [diff] [blame] | 1522 | OBJS += src/common/hw_features_common.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1523 | |
| 1524 | ifdef NEED_EAP_COMMON |
| 1525 | OBJS += src/eap_common/eap_common.c |
| 1526 | endif |
| 1527 | |
| 1528 | ifndef CONFIG_MAIN |
| 1529 | CONFIG_MAIN=main |
| 1530 | endif |
| 1531 | |
| 1532 | ifdef CONFIG_DEBUG_SYSLOG |
| 1533 | L_CFLAGS += -DCONFIG_DEBUG_SYSLOG |
Dmitry Shmidt | 13970b0 | 2011-06-30 16:51:41 -0700 | [diff] [blame] | 1534 | ifdef CONFIG_DEBUG_SYSLOG_FACILITY |
| 1535 | L_CFLAGS += -DLOG_HOSTAPD="$(CONFIG_DEBUG_SYSLOG_FACILITY)" |
| 1536 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1537 | endif |
| 1538 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1539 | ifdef CONFIG_DEBUG_LINUX_TRACING |
| 1540 | L_CFLAGS += -DCONFIG_DEBUG_LINUX_TRACING |
| 1541 | endif |
| 1542 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1543 | ifdef CONFIG_DEBUG_FILE |
| 1544 | L_CFLAGS += -DCONFIG_DEBUG_FILE |
| 1545 | endif |
| 1546 | |
| 1547 | ifdef CONFIG_DELAYED_MIC_ERROR_REPORT |
| 1548 | L_CFLAGS += -DCONFIG_DELAYED_MIC_ERROR_REPORT |
| 1549 | endif |
| 1550 | |
| 1551 | ifdef CONFIG_FIPS |
| 1552 | L_CFLAGS += -DCONFIG_FIPS |
| 1553 | endif |
| 1554 | |
| 1555 | OBJS += $(SHA1OBJS) $(DESOBJS) |
| 1556 | |
| 1557 | OBJS_p += $(SHA1OBJS) |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1558 | OBJS_p += $(SHA256OBJS) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1559 | |
| 1560 | ifdef CONFIG_BGSCAN_SIMPLE |
| 1561 | L_CFLAGS += -DCONFIG_BGSCAN_SIMPLE |
| 1562 | OBJS += bgscan_simple.c |
| 1563 | NEED_BGSCAN=y |
| 1564 | endif |
| 1565 | |
| 1566 | ifdef CONFIG_BGSCAN_LEARN |
| 1567 | L_CFLAGS += -DCONFIG_BGSCAN_LEARN |
| 1568 | OBJS += bgscan_learn.c |
| 1569 | NEED_BGSCAN=y |
| 1570 | endif |
| 1571 | |
| 1572 | ifdef NEED_BGSCAN |
| 1573 | L_CFLAGS += -DCONFIG_BGSCAN |
| 1574 | OBJS += bgscan.c |
| 1575 | endif |
| 1576 | |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 1577 | ifdef CONFIG_AUTOSCAN_EXPONENTIAL |
| 1578 | L_CFLAGS += -DCONFIG_AUTOSCAN_EXPONENTIAL |
| 1579 | OBJS += autoscan_exponential.c |
| 1580 | NEED_AUTOSCAN=y |
| 1581 | endif |
| 1582 | |
| 1583 | ifdef CONFIG_AUTOSCAN_PERIODIC |
Dmitry Shmidt | 0fdea2c | 2013-11-05 18:12:54 -0800 | [diff] [blame] | 1584 | L_CFLAGS += -DCONFIG_AUTOSCAN_PERIODIC |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 1585 | OBJS += autoscan_periodic.c |
| 1586 | NEED_AUTOSCAN=y |
| 1587 | endif |
| 1588 | |
| 1589 | ifdef NEED_AUTOSCAN |
| 1590 | L_CFLAGS += -DCONFIG_AUTOSCAN |
| 1591 | OBJS += autoscan.c |
| 1592 | endif |
| 1593 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1594 | ifdef CONFIG_EXT_PASSWORD_TEST |
| 1595 | OBJS += src/utils/ext_password_test.c |
| 1596 | L_CFLAGS += -DCONFIG_EXT_PASSWORD_TEST |
| 1597 | NEED_EXT_PASSWORD=y |
| 1598 | endif |
| 1599 | |
| 1600 | ifdef NEED_EXT_PASSWORD |
| 1601 | OBJS += src/utils/ext_password.c |
| 1602 | L_CFLAGS += -DCONFIG_EXT_PASSWORD |
| 1603 | endif |
| 1604 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1605 | ifdef NEED_GAS_SERVER |
| 1606 | OBJS += src/common/gas_server.c |
| 1607 | L_CFLAGS += -DCONFIG_GAS_SERVER |
| 1608 | NEED_GAS=y |
| 1609 | endif |
| 1610 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1611 | ifdef NEED_GAS |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1612 | OBJS += src/common/gas.c |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1613 | OBJS += gas_query.c |
| 1614 | L_CFLAGS += -DCONFIG_GAS |
| 1615 | NEED_OFFCHANNEL=y |
| 1616 | endif |
| 1617 | |
| 1618 | ifdef NEED_OFFCHANNEL |
| 1619 | OBJS += offchannel.c |
| 1620 | L_CFLAGS += -DCONFIG_OFFCHANNEL |
| 1621 | endif |
| 1622 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1623 | ifdef NEED_JSON |
| 1624 | OBJS += src/utils/json.c |
| 1625 | L_CFLAGS += -DCONFIG_JSON |
| 1626 | endif |
| 1627 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1628 | OBJS += src/drivers/driver_common.c |
| 1629 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1630 | OBJS += wpa_supplicant.c events.c blacklist.c wpas_glue.c scan.c |
| 1631 | OBJS_t := $(OBJS) $(OBJS_l2) eapol_test.c |
| 1632 | OBJS_t += src/radius/radius_client.c |
| 1633 | OBJS_t += src/radius/radius.c |
| 1634 | ifndef CONFIG_AP |
| 1635 | OBJS_t += src/utils/ip_addr.c |
| 1636 | endif |
| 1637 | OBJS_t2 := $(OBJS) $(OBJS_l2) preauth_test.c |
| 1638 | OBJS += $(CONFIG_MAIN).c |
| 1639 | |
| 1640 | ifdef CONFIG_PRIVSEP |
| 1641 | OBJS_priv += $(OBJS_d) src/drivers/drivers.c |
| 1642 | OBJS_priv += $(OBJS_l2) |
| 1643 | OBJS_priv += src/utils/os_$(CONFIG_OS).c |
| 1644 | OBJS_priv += src/utils/$(CONFIG_ELOOP).c |
| 1645 | OBJS_priv += src/utils/common.c |
| 1646 | OBJS_priv += src/utils/wpa_debug.c |
| 1647 | OBJS_priv += src/utils/wpabuf.c |
| 1648 | OBJS_priv += wpa_priv.c |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1649 | ifdef CONFIG_DRIVER_NL80211 |
| 1650 | OBJS_priv += src/common/ieee802_11_common.c |
| 1651 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1652 | OBJS += src/l2_packet/l2_packet_privsep.c |
| 1653 | OBJS += src/drivers/driver_privsep.c |
| 1654 | EXTRA_progs += wpa_priv |
| 1655 | else |
| 1656 | OBJS += $(OBJS_d) src/drivers/drivers.c |
| 1657 | OBJS += $(OBJS_l2) |
| 1658 | endif |
| 1659 | |
| 1660 | ifdef CONFIG_NDIS_EVENTS_INTEGRATED |
| 1661 | L_CFLAGS += -DCONFIG_NDIS_EVENTS_INTEGRATED |
| 1662 | OBJS += src/drivers/ndis_events.c |
| 1663 | EXTRALIBS += -loleaut32 -lole32 -luuid |
| 1664 | ifdef PLATFORMSDKLIB |
| 1665 | EXTRALIBS += $(PLATFORMSDKLIB)/WbemUuid.Lib |
| 1666 | else |
| 1667 | EXTRALIBS += WbemUuid.Lib |
| 1668 | endif |
| 1669 | endif |
| 1670 | |
| 1671 | ifndef LDO |
| 1672 | LDO=$(CC) |
| 1673 | endif |
| 1674 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1675 | ######################## |
| 1676 | |
| 1677 | include $(CLEAR_VARS) |
| 1678 | LOCAL_MODULE := wpa_cli |
Roshan Pius | 7c9288c | 2017-02-23 08:27:38 -0800 | [diff] [blame] | 1679 | LOCAL_PROPRIETARY_MODULE := true |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1680 | LOCAL_MODULE_TAGS := debug |
Ying Wang | e93dd11 | 2013-04-09 21:53:29 -0700 | [diff] [blame] | 1681 | LOCAL_SHARED_LIBRARIES := libc libcutils liblog |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1682 | LOCAL_CFLAGS := $(L_CFLAGS) |
| 1683 | LOCAL_SRC_FILES := $(OBJS_c) |
| 1684 | LOCAL_C_INCLUDES := $(INCLUDES) |
| 1685 | include $(BUILD_EXECUTABLE) |
| 1686 | |
| 1687 | ######################## |
| 1688 | include $(CLEAR_VARS) |
| 1689 | LOCAL_MODULE := wpa_supplicant |
Roshan Pius | 7c9288c | 2017-02-23 08:27:38 -0800 | [diff] [blame] | 1690 | LOCAL_PROPRIETARY_MODULE := true |
| 1691 | LOCAL_MODULE_RELATIVE_PATH := hw |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1692 | ifdef CONFIG_DRIVER_CUSTOM |
| 1693 | LOCAL_STATIC_LIBRARIES := libCustomWifi |
| 1694 | endif |
| 1695 | ifneq ($(BOARD_WPA_SUPPLICANT_PRIVATE_LIB),) |
| 1696 | LOCAL_STATIC_LIBRARIES += $(BOARD_WPA_SUPPLICANT_PRIVATE_LIB) |
| 1697 | endif |
Ying Wang | e93dd11 | 2013-04-09 21:53:29 -0700 | [diff] [blame] | 1698 | LOCAL_SHARED_LIBRARIES := libc libcutils liblog |
Dmitry Shmidt | 04f534e | 2013-12-09 15:50:16 -0800 | [diff] [blame] | 1699 | ifdef CONFIG_EAP_PROXY |
| 1700 | LOCAL_STATIC_LIBRARIES += $(LIB_STATIC_EAP_PROXY) |
| 1701 | LOCAL_SHARED_LIBRARIES += $(LIB_SHARED_EAP_PROXY) |
| 1702 | endif |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1703 | ifeq ($(CONFIG_TLS), openssl) |
Roshan Pius | 3eb7b24 | 2017-03-28 13:39:46 -0700 | [diff] [blame] | 1704 | LOCAL_SHARED_LIBRARIES += libcrypto libssl libkeystore-wifi-hidl |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1705 | endif |
Adam Langley | 1eb02ed | 2015-04-21 19:00:05 -0700 | [diff] [blame] | 1706 | |
| 1707 | # With BoringSSL we need libkeystore-engine in order to provide access to |
| 1708 | # keystore keys. |
Roshan Pius | 3eb7b24 | 2017-03-28 13:39:46 -0700 | [diff] [blame] | 1709 | LOCAL_SHARED_LIBRARIES += libkeystore-engine-wifi-hidl |
Adam Langley | 1eb02ed | 2015-04-21 19:00:05 -0700 | [diff] [blame] | 1710 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1711 | ifdef CONFIG_DRIVER_NL80211 |
Dmitry Shmidt | cd44645 | 2014-02-18 16:03:35 -0800 | [diff] [blame] | 1712 | ifneq ($(wildcard external/libnl),) |
Dmitry Shmidt | d620e6d | 2014-02-18 11:07:59 -0800 | [diff] [blame] | 1713 | LOCAL_SHARED_LIBRARIES += libnl |
Dmitry Shmidt | cd44645 | 2014-02-18 16:03:35 -0800 | [diff] [blame] | 1714 | else |
| 1715 | LOCAL_STATIC_LIBRARIES += libnl_2 |
| 1716 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1717 | endif |
| 1718 | LOCAL_CFLAGS := $(L_CFLAGS) |
| 1719 | LOCAL_SRC_FILES := $(OBJS) |
| 1720 | LOCAL_C_INCLUDES := $(INCLUDES) |
Samuel Tan | b798399 | 2015-08-11 09:59:20 -0700 | [diff] [blame] | 1721 | ifeq ($(DBUS), y) |
| 1722 | LOCAL_SHARED_LIBRARIES += libdbus |
| 1723 | endif |
Roshan Pius | 57ffbcf | 2016-09-27 09:12:46 -0700 | [diff] [blame] | 1724 | ifeq ($(WPA_SUPPLICANT_USE_HIDL), y) |
Roshan Pius | 7c0ebf2 | 2016-09-20 15:11:56 -0700 | [diff] [blame] | 1725 | LOCAL_SHARED_LIBRARIES += android.hardware.wifi.supplicant@1.0 |
Roshan Pius | 6ca7b54 | 2017-09-26 17:16:37 -0700 | [diff] [blame] | 1726 | LOCAL_SHARED_LIBRARIES += android.hardware.wifi.supplicant@1.1 |
Yifan Hong | 4313d26 | 2016-11-17 10:54:47 -0800 | [diff] [blame] | 1727 | LOCAL_SHARED_LIBRARIES += libhidlbase libhidltransport libhwbinder libutils |
Roshan Pius | 57ffbcf | 2016-09-27 09:12:46 -0700 | [diff] [blame] | 1728 | LOCAL_STATIC_LIBRARIES += libwpa_hidl |
Dmitry Shmidt | e466304 | 2016-04-04 10:07:49 -0700 | [diff] [blame] | 1729 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1730 | include $(BUILD_EXECUTABLE) |
| 1731 | |
| 1732 | ######################## |
| 1733 | # |
| 1734 | #include $(CLEAR_VARS) |
| 1735 | #LOCAL_MODULE := eapol_test |
| 1736 | #ifdef CONFIG_DRIVER_CUSTOM |
| 1737 | #LOCAL_STATIC_LIBRARIES := libCustomWifi |
| 1738 | #endif |
| 1739 | #LOCAL_SHARED_LIBRARIES := libc libcrypto libssl |
| 1740 | #LOCAL_CFLAGS := $(L_CFLAGS) |
| 1741 | #LOCAL_SRC_FILES := $(OBJS_t) |
| 1742 | #LOCAL_C_INCLUDES := $(INCLUDES) |
| 1743 | #include $(BUILD_EXECUTABLE) |
| 1744 | # |
| 1745 | ######################## |
| 1746 | # |
| 1747 | #local_target_dir := $(TARGET_OUT)/etc/wifi |
| 1748 | # |
| 1749 | #include $(CLEAR_VARS) |
| 1750 | #LOCAL_MODULE := wpa_supplicant.conf |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1751 | #LOCAL_MODULE_CLASS := ETC |
| 1752 | #LOCAL_MODULE_PATH := $(local_target_dir) |
| 1753 | #LOCAL_SRC_FILES := $(LOCAL_MODULE) |
| 1754 | #include $(BUILD_PREBUILT) |
| 1755 | # |
| 1756 | ######################## |
| 1757 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1758 | include $(CLEAR_VARS) |
| 1759 | LOCAL_MODULE = libwpa_client |
Roshan Pius | 7c9288c | 2017-02-23 08:27:38 -0800 | [diff] [blame] | 1760 | LOCAL_PROPRIETARY_MODULE := true |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1761 | LOCAL_CFLAGS = $(L_CFLAGS) |
| 1762 | LOCAL_SRC_FILES = src/common/wpa_ctrl.c src/utils/os_$(CONFIG_OS).c |
| 1763 | LOCAL_C_INCLUDES = $(INCLUDES) |
Ying Wang | e93dd11 | 2013-04-09 21:53:29 -0700 | [diff] [blame] | 1764 | LOCAL_SHARED_LIBRARIES := libcutils liblog |
Vijay Venkatraman | 1afec61 | 2016-12-06 11:09:03 -0800 | [diff] [blame] | 1765 | 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] | 1766 | include $(BUILD_SHARED_LIBRARY) |
Dmitry Shmidt | 7f2c753 | 2016-08-15 09:48:12 -0700 | [diff] [blame] | 1767 | |
Roshan Pius | 57ffbcf | 2016-09-27 09:12:46 -0700 | [diff] [blame] | 1768 | ifeq ($(WPA_SUPPLICANT_USE_HIDL), y) |
| 1769 | ### Hidl service library ### |
Dmitry Shmidt | 7f2c753 | 2016-08-15 09:48:12 -0700 | [diff] [blame] | 1770 | ######################## |
Dmitry Shmidt | 7f2c753 | 2016-08-15 09:48:12 -0700 | [diff] [blame] | 1771 | include $(CLEAR_VARS) |
Roshan Pius | 57ffbcf | 2016-09-27 09:12:46 -0700 | [diff] [blame] | 1772 | LOCAL_MODULE := libwpa_hidl |
Jiyong Park | a1d8ba2 | 2017-06-26 13:11:29 +0900 | [diff] [blame] | 1773 | LOCAL_VENDOR_MODULE := true |
Dmitry Shmidt | 7f2c753 | 2016-08-15 09:48:12 -0700 | [diff] [blame] | 1774 | LOCAL_CPPFLAGS := $(L_CPPFLAGS) |
| 1775 | LOCAL_CFLAGS := $(L_CFLAGS) |
| 1776 | LOCAL_C_INCLUDES := $(INCLUDES) |
Roshan Pius | 6ca7b54 | 2017-09-26 17:16:37 -0700 | [diff] [blame] | 1777 | HIDL_INTERFACE_VERSION = 1.1 |
Dmitry Shmidt | 7f2c753 | 2016-08-15 09:48:12 -0700 | [diff] [blame] | 1778 | LOCAL_SRC_FILES := \ |
Roshan Pius | edd820c | 2017-05-16 14:21:49 -0700 | [diff] [blame] | 1779 | hidl/$(HIDL_INTERFACE_VERSION)/hidl.cpp \ |
| 1780 | hidl/$(HIDL_INTERFACE_VERSION)/hidl_manager.cpp \ |
| 1781 | hidl/$(HIDL_INTERFACE_VERSION)/iface_config_utils.cpp \ |
| 1782 | hidl/$(HIDL_INTERFACE_VERSION)/p2p_iface.cpp \ |
| 1783 | hidl/$(HIDL_INTERFACE_VERSION)/p2p_network.cpp \ |
| 1784 | hidl/$(HIDL_INTERFACE_VERSION)/sta_iface.cpp \ |
| 1785 | hidl/$(HIDL_INTERFACE_VERSION)/sta_network.cpp \ |
| 1786 | hidl/$(HIDL_INTERFACE_VERSION)/supplicant.cpp |
Dmitry Shmidt | 7f2c753 | 2016-08-15 09:48:12 -0700 | [diff] [blame] | 1787 | LOCAL_SHARED_LIBRARIES := \ |
Roshan Pius | 6ca7b54 | 2017-09-26 17:16:37 -0700 | [diff] [blame] | 1788 | android.hardware.wifi.supplicant@1.0 \ |
| 1789 | android.hardware.wifi.supplicant@1.1 \ |
Yifan Hong | 4313d26 | 2016-11-17 10:54:47 -0800 | [diff] [blame] | 1790 | libhidlbase \ |
| 1791 | libhidltransport \ |
Jiyong Park | a1d8ba2 | 2017-06-26 13:11:29 +0900 | [diff] [blame] | 1792 | libutils \ |
| 1793 | liblog |
Roshan Pius | edd820c | 2017-05-16 14:21:49 -0700 | [diff] [blame] | 1794 | LOCAL_EXPORT_C_INCLUDE_DIRS := \ |
| 1795 | $(LOCAL_PATH)/hidl/$(HIDL_INTERFACE_VERSION) |
Dmitry Shmidt | 7f2c753 | 2016-08-15 09:48:12 -0700 | [diff] [blame] | 1796 | include $(BUILD_STATIC_LIBRARY) |
Roshan Pius | 57ffbcf | 2016-09-27 09:12:46 -0700 | [diff] [blame] | 1797 | endif # WPA_SUPPLICANT_USE_HIDL == y |