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