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