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