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