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