Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 1 | BINALL=wpa_supplicant wpa_cli |
| 2 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 3 | ALL = $(BINALL) |
| 4 | ALL += systemd/wpa_supplicant.service |
| 5 | ALL += systemd/wpa_supplicant@.service |
| 6 | ALL += systemd/wpa_supplicant-nl80211@.service |
| 7 | ALL += systemd/wpa_supplicant-wired@.service |
| 8 | ALL += dbus/fi.w1.wpa_supplicant1.service |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 9 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 10 | EXTRA_TARGETS=dynamic_eap_methods |
| 11 | |
| 12 | CONFIG_FILE=.config |
| 13 | include ../src/build.rules |
| 14 | |
Sunil Ravi | 38ad1ed | 2023-01-17 23:58:31 +0000 | [diff] [blame] | 15 | ifdef CONFIG_BUILD_PASN_SO |
| 16 | # add the dependency this way to allow CONFIG_BUILD_PASN_SO |
| 17 | # being set in the config which is read by build.rules |
| 18 | _all: libpasn.so |
| 19 | endif |
| 20 | |
Sunil Ravi | a04bd25 | 2022-05-02 22:54:18 -0700 | [diff] [blame] | 21 | ifdef CONFIG_BUILD_WPA_CLIENT_SO |
| 22 | # add the dependency this way to allow CONFIG_BUILD_WPA_CLIENT_SO |
| 23 | # being set in the config which is read by build.rules |
| 24 | _all: libwpa_client.so |
| 25 | endif |
| 26 | |
| 27 | ifndef CONFIG_NO_WPA_PASSPHRASE |
| 28 | # add the dependency this way to allow CONFIG_NO_WPA_PASSPHRASE |
| 29 | # being set in the config which is read by build.rules |
| 30 | _all: wpa_passphrase |
| 31 | endif |
| 32 | |
Dmitry Shmidt | 014a3ff | 2015-12-28 13:27:49 -0800 | [diff] [blame] | 33 | ifdef LIBS |
| 34 | # If LIBS is set with some global build system defaults, clone those for |
| 35 | # LIBS_c and LIBS_p to cover wpa_passphrase and wpa_cli as well. |
| 36 | ifndef LIBS_c |
| 37 | LIBS_c := $(LIBS) |
| 38 | endif |
| 39 | ifndef LIBS_p |
| 40 | LIBS_p := $(LIBS) |
| 41 | endif |
| 42 | endif |
| 43 | |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 44 | export LIBDIR ?= /usr/local/lib |
| 45 | export INCDIR ?= /usr/local/include |
| 46 | export BINDIR ?= /usr/local/sbin |
Dmitry Shmidt | c55524a | 2011-07-07 11:18:38 -0700 | [diff] [blame] | 47 | PKG_CONFIG ?= pkg-config |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 48 | |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 49 | CFLAGS += $(EXTRA_CFLAGS) |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 50 | CFLAGS += -I$(abspath ../src) |
| 51 | CFLAGS += -I$(abspath ../src/utils) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 52 | |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 53 | ifndef CONFIG_NO_GITVER |
| 54 | # Add VERSION_STR postfix for builds from a git repository |
| 55 | ifeq ($(wildcard ../.git),../.git) |
| 56 | GITVER := $(shell git describe --dirty=+) |
| 57 | ifneq ($(GITVER),) |
| 58 | CFLAGS += -DGIT_VERSION_STR_POSTFIX=\"-$(GITVER)\" |
| 59 | endif |
| 60 | endif |
| 61 | endif |
| 62 | |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 63 | ifdef CONFIG_TESTING_OPTIONS |
| 64 | CFLAGS += -DCONFIG_TESTING_OPTIONS |
| 65 | CONFIG_WPS_TESTING=y |
| 66 | CONFIG_TDLS_TESTING=y |
Sunil Ravi | b0ac25f | 2024-07-12 01:42:03 +0000 | [diff] [blame] | 67 | NEED_AES_WRAP=y |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 68 | endif |
| 69 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 70 | mkconfig: |
| 71 | @if [ -f .config ]; then \ |
| 72 | echo '.config exists - did not replace it'; \ |
| 73 | exit 1; \ |
| 74 | fi |
| 75 | echo CONFIG_DRIVER_HOSTAP=y >> .config |
| 76 | echo CONFIG_DRIVER_WEXT=y >> .config |
| 77 | |
Dmitry Shmidt | c5ec7f5 | 2012-03-06 16:33:24 -0800 | [diff] [blame] | 78 | $(DESTDIR)$(BINDIR)/%: % |
| 79 | install -D $(<) $(@) |
| 80 | |
| 81 | install: $(addprefix $(DESTDIR)$(BINDIR)/,$(BINALL)) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 82 | $(MAKE) -C ../src install |
Sunil Ravi | a04bd25 | 2022-05-02 22:54:18 -0700 | [diff] [blame] | 83 | ifndef CONFIG_NO_WPA_PASSPHRASE |
| 84 | install -D wpa_passphrase $(DESTDIR)/$(BINDIR)/wpa_passphrase |
| 85 | endif |
Sunil Ravi | 38ad1ed | 2023-01-17 23:58:31 +0000 | [diff] [blame] | 86 | |
| 87 | ifdef CONFIG_BUILD_PASN_SO |
| 88 | install -m 0644 -D libpasn.so $(DESTDIR)/$(LIBDIR)/libpasn.so |
| 89 | endif |
| 90 | |
Dmitry Shmidt | b1e5210 | 2015-05-29 12:36:29 -0700 | [diff] [blame] | 91 | ifdef CONFIG_BUILD_WPA_CLIENT_SO |
| 92 | install -m 0644 -D libwpa_client.so $(DESTDIR)/$(LIBDIR)/libwpa_client.so |
| 93 | install -m 0644 -D ../src/common/wpa_ctrl.h $(DESTDIR)/$(INCDIR)/wpa_ctrl.h |
| 94 | endif |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 95 | if ls eap_*.so >/dev/null 2>&1; then \ |
| 96 | install -d $(DESTDIR)$(LIBDIR)/wpa_supplicant && \ |
| 97 | cp *.so $(DESTDIR)$(LIBDIR)/wpa_supplicant \ |
| 98 | ; fi |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 99 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 100 | ifdef CONFIG_FIPS |
| 101 | CONFIG_NO_RANDOM_POOL= |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 102 | endif |
| 103 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 104 | OBJS = config.o |
| 105 | OBJS += notify.o |
| 106 | OBJS += bss.o |
| 107 | OBJS += eap_register.o |
| 108 | OBJS += ../src/utils/common.o |
Hai Shalom | 6084025 | 2021-02-19 19:02:11 -0800 | [diff] [blame] | 109 | OBJS += ../src/utils/config.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 110 | OBJS += ../src/utils/wpa_debug.o |
| 111 | OBJS += ../src/utils/wpabuf.o |
Dmitry Shmidt | 2933359 | 2017-01-09 12:27:11 -0800 | [diff] [blame] | 112 | OBJS += ../src/utils/bitfield.o |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 113 | OBJS += ../src/utils/ip_addr.o |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 114 | OBJS += ../src/utils/crc32.o |
Sunil Ravi | 99c035e | 2024-07-12 01:42:03 +0000 | [diff] [blame] | 115 | OBJS += ../src/common/ptksa_cache.o |
| 116 | OBJS += ../src/rsn_supp/pmksa_cache.o |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 117 | OBJS += twt.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 118 | OBJS_p = wpa_passphrase.o |
| 119 | OBJS_p += ../src/utils/common.o |
| 120 | OBJS_p += ../src/utils/wpa_debug.o |
| 121 | OBJS_p += ../src/utils/wpabuf.o |
| 122 | OBJS_c = wpa_cli.o ../src/common/wpa_ctrl.o |
| 123 | OBJS_c += ../src/utils/wpa_debug.o |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 124 | OBJS_c += ../src/utils/common.o |
Dmitry Shmidt | 7f2c753 | 2016-08-15 09:48:12 -0700 | [diff] [blame] | 125 | OBJS_c += ../src/common/cli.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 126 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 127 | ifndef CONFIG_OS |
| 128 | ifdef CONFIG_NATIVE_WINDOWS |
| 129 | CONFIG_OS=win32 |
| 130 | else |
| 131 | CONFIG_OS=unix |
| 132 | endif |
| 133 | endif |
| 134 | |
| 135 | ifeq ($(CONFIG_OS), internal) |
| 136 | CFLAGS += -DOS_NO_C_LIB_DEFINES |
| 137 | endif |
| 138 | |
| 139 | OBJS += ../src/utils/os_$(CONFIG_OS).o |
| 140 | OBJS_p += ../src/utils/os_$(CONFIG_OS).o |
| 141 | OBJS_c += ../src/utils/os_$(CONFIG_OS).o |
| 142 | |
| 143 | ifdef CONFIG_WPA_TRACE |
| 144 | CFLAGS += -DWPA_TRACE |
| 145 | OBJS += ../src/utils/trace.o |
| 146 | OBJS_p += ../src/utils/trace.o |
| 147 | OBJS_c += ../src/utils/trace.o |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 148 | OBJS_priv += ../src/utils/trace.o |
Dmitry Shmidt | 7f65602 | 2015-02-25 14:36:37 -0800 | [diff] [blame] | 149 | LIBCTRL += ../src/utils/trace.o |
Dmitry Shmidt | b1e5210 | 2015-05-29 12:36:29 -0700 | [diff] [blame] | 150 | LIBCTRLSO += ../src/utils/trace.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 151 | LDFLAGS += -rdynamic |
| 152 | CFLAGS += -funwind-tables |
| 153 | ifdef CONFIG_WPA_TRACE_BFD |
Sunil Ravi | 876a49b | 2025-02-03 19:18:32 +0000 | [diff] [blame] | 154 | CFLAGS += -DPACKAGE="wpa_supplicant" -DWPA_TRACE_BFD -fno-inline -fno-optimize-sibling-calls |
Dmitry Shmidt | 13ca8d8 | 2014-02-20 10:18:40 -0800 | [diff] [blame] | 155 | LIBS += -lbfd -ldl -liberty -lz |
| 156 | LIBS_p += -lbfd -ldl -liberty -lz |
| 157 | LIBS_c += -lbfd -ldl -liberty -lz |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 158 | endif |
| 159 | endif |
| 160 | |
| 161 | ifndef CONFIG_ELOOP |
| 162 | CONFIG_ELOOP=eloop |
| 163 | endif |
| 164 | OBJS += ../src/utils/$(CONFIG_ELOOP).o |
| 165 | OBJS_c += ../src/utils/$(CONFIG_ELOOP).o |
| 166 | |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 167 | ifndef CONFIG_OSX |
Dmitry Shmidt | fa3fc4a | 2013-11-21 13:34:38 -0800 | [diff] [blame] | 168 | ifeq ($(CONFIG_ELOOP), eloop) |
| 169 | # Using glibc < 2.17 requires -lrt for clock_gettime() |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 170 | # OS X has an alternate implementation |
Dmitry Shmidt | fa3fc4a | 2013-11-21 13:34:38 -0800 | [diff] [blame] | 171 | LIBS += -lrt |
| 172 | LIBS_c += -lrt |
| 173 | LIBS_p += -lrt |
| 174 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 175 | endif |
Dmitry Shmidt | fa3fc4a | 2013-11-21 13:34:38 -0800 | [diff] [blame] | 176 | |
Dmitry Shmidt | c5ec7f5 | 2012-03-06 16:33:24 -0800 | [diff] [blame] | 177 | ifdef CONFIG_ELOOP_POLL |
| 178 | CFLAGS += -DCONFIG_ELOOP_POLL |
| 179 | endif |
| 180 | |
Dmitry Shmidt | 50b691d | 2014-05-21 14:01:45 -0700 | [diff] [blame] | 181 | ifdef CONFIG_ELOOP_EPOLL |
| 182 | CFLAGS += -DCONFIG_ELOOP_EPOLL |
| 183 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 184 | |
Dmitry Shmidt | b97e428 | 2016-02-08 10:16:07 -0800 | [diff] [blame] | 185 | ifdef CONFIG_ELOOP_KQUEUE |
| 186 | CFLAGS += -DCONFIG_ELOOP_KQUEUE |
| 187 | endif |
| 188 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 189 | ifdef CONFIG_EAPOL_TEST |
| 190 | CFLAGS += -Werror -DEAPOL_TEST |
| 191 | endif |
| 192 | |
Dmitry Shmidt | 01904cf | 2013-12-05 11:08:35 -0800 | [diff] [blame] | 193 | ifdef CONFIG_CODE_COVERAGE |
Sunil Ravi | b0ac25f | 2024-07-12 01:42:03 +0000 | [diff] [blame] | 194 | CFLAGS += -O0 -fprofile-arcs -ftest-coverage -U_FORTIFY_SOURCE |
Dmitry Shmidt | 01904cf | 2013-12-05 11:08:35 -0800 | [diff] [blame] | 195 | LIBS += -lgcov |
| 196 | LIBS_c += -lgcov |
| 197 | LIBS_p += -lgcov |
| 198 | endif |
| 199 | |
Dmitry Shmidt | c5ec7f5 | 2012-03-06 16:33:24 -0800 | [diff] [blame] | 200 | ifdef CONFIG_HT_OVERRIDES |
| 201 | CFLAGS += -DCONFIG_HT_OVERRIDES |
| 202 | endif |
| 203 | |
Dmitry Shmidt | 2f02319 | 2013-03-12 12:44:17 -0700 | [diff] [blame] | 204 | ifdef CONFIG_VHT_OVERRIDES |
| 205 | CFLAGS += -DCONFIG_VHT_OVERRIDES |
| 206 | endif |
| 207 | |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 208 | ifdef CONFIG_HE_OVERRIDES |
| 209 | CFLAGS += -DCONFIG_HE_OVERRIDES |
| 210 | endif |
| 211 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 212 | ifndef CONFIG_BACKEND |
| 213 | CONFIG_BACKEND=file |
| 214 | endif |
| 215 | |
| 216 | ifeq ($(CONFIG_BACKEND), file) |
| 217 | OBJS += config_file.o |
| 218 | ifndef CONFIG_NO_CONFIG_BLOBS |
| 219 | NEED_BASE64=y |
| 220 | endif |
| 221 | CFLAGS += -DCONFIG_BACKEND_FILE |
| 222 | endif |
| 223 | |
| 224 | ifeq ($(CONFIG_BACKEND), winreg) |
| 225 | OBJS += config_winreg.o |
| 226 | endif |
| 227 | |
| 228 | ifeq ($(CONFIG_BACKEND), none) |
| 229 | OBJS += config_none.o |
| 230 | endif |
| 231 | |
| 232 | ifdef CONFIG_NO_CONFIG_WRITE |
| 233 | CFLAGS += -DCONFIG_NO_CONFIG_WRITE |
| 234 | endif |
| 235 | |
| 236 | ifdef CONFIG_NO_CONFIG_BLOBS |
| 237 | CFLAGS += -DCONFIG_NO_CONFIG_BLOBS |
| 238 | endif |
| 239 | |
| 240 | ifdef CONFIG_NO_SCAN_PROCESSING |
| 241 | CFLAGS += -DCONFIG_NO_SCAN_PROCESSING |
| 242 | endif |
| 243 | |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 244 | ifdef CONFIG_SUITEB |
| 245 | CFLAGS += -DCONFIG_SUITEB |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 246 | endif |
| 247 | |
Dmitry Shmidt | 807291d | 2015-01-27 13:40:23 -0800 | [diff] [blame] | 248 | ifdef CONFIG_SUITEB192 |
| 249 | CFLAGS += -DCONFIG_SUITEB192 |
| 250 | NEED_SHA384=y |
| 251 | endif |
| 252 | |
Hai Shalom | 74f70d4 | 2019-02-11 14:42:39 -0800 | [diff] [blame] | 253 | ifdef CONFIG_OCV |
| 254 | CFLAGS += -DCONFIG_OCV |
| 255 | OBJS += ../src/common/ocv.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 256 | endif |
| 257 | |
| 258 | ifdef CONFIG_IEEE80211R |
| 259 | CFLAGS += -DCONFIG_IEEE80211R |
| 260 | OBJS += ../src/rsn_supp/wpa_ft.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 261 | endif |
| 262 | |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 263 | ifdef CONFIG_MESH |
| 264 | NEED_80211_COMMON=y |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 265 | NEED_AES_SIV=y |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 266 | CONFIG_SAE=y |
| 267 | CONFIG_AP=y |
| 268 | CFLAGS += -DCONFIG_MESH |
| 269 | OBJS += mesh.o |
| 270 | OBJS += mesh_mpm.o |
| 271 | OBJS += mesh_rsn.o |
| 272 | endif |
| 273 | |
Dmitry Shmidt | d5e4923 | 2012-12-03 15:08:10 -0800 | [diff] [blame] | 274 | ifdef CONFIG_SAE |
| 275 | CFLAGS += -DCONFIG_SAE |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 276 | OBJS += ../src/common/sae.o |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 277 | ifdef CONFIG_SAE_PK |
| 278 | CFLAGS += -DCONFIG_SAE_PK |
Sunil | 8cd6f4d | 2022-06-28 18:40:46 +0000 | [diff] [blame] | 279 | NEED_AES_SIV=y |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 280 | OBJS += ../src/common/sae_pk.o |
| 281 | endif |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 282 | NEED_ECC=y |
| 283 | NEED_DH_GROUPS=y |
Hai Shalom | b755a2a | 2020-04-23 21:49:02 -0700 | [diff] [blame] | 284 | NEED_HMAC_SHA256_KDF=y |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 285 | NEED_DRAGONFLY=y |
Ahmed ElArabawy | 0ff61c5 | 2019-12-26 12:38:39 -0800 | [diff] [blame] | 286 | ifdef CONFIG_TESTING_OPTIONS |
| 287 | NEED_DH_GROUPS_ALL=y |
| 288 | endif |
Dmitry Shmidt | d5e4923 | 2012-12-03 15:08:10 -0800 | [diff] [blame] | 289 | endif |
| 290 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 291 | ifdef CONFIG_DPP |
| 292 | CFLAGS += -DCONFIG_DPP |
| 293 | OBJS += ../src/common/dpp.o |
Hai Shalom | 4fbc08f | 2020-05-18 12:37:00 -0700 | [diff] [blame] | 294 | OBJS += ../src/common/dpp_auth.o |
| 295 | OBJS += ../src/common/dpp_backup.o |
| 296 | OBJS += ../src/common/dpp_crypto.o |
| 297 | OBJS += ../src/common/dpp_pkex.o |
| 298 | OBJS += ../src/common/dpp_reconfig.o |
| 299 | OBJS += ../src/common/dpp_tcp.o |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 300 | OBJS += dpp_supplicant.o |
| 301 | NEED_AES_SIV=y |
| 302 | NEED_HMAC_SHA256_KDF=y |
| 303 | NEED_HMAC_SHA384_KDF=y |
| 304 | NEED_HMAC_SHA512_KDF=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 305 | NEED_SHA384=y |
| 306 | NEED_SHA512=y |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 307 | NEED_ECC=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 308 | NEED_JSON=y |
| 309 | NEED_GAS_SERVER=y |
| 310 | NEED_BASE64=y |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 311 | NEED_ASN1=y |
Hai Shalom | 021b0b5 | 2019-04-10 11:17:58 -0700 | [diff] [blame] | 312 | ifdef CONFIG_DPP2 |
| 313 | CFLAGS += -DCONFIG_DPP2 |
| 314 | endif |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 315 | ifdef CONFIG_DPP3 |
| 316 | CFLAGS += -DCONFIG_DPP3 |
| 317 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 318 | endif |
| 319 | |
Sunil Ravi | b0ac25f | 2024-07-12 01:42:03 +0000 | [diff] [blame] | 320 | ifdef CONFIG_NAN_USD |
| 321 | OBJS += ../src/common/nan_de.o |
| 322 | OBJS += nan_usd.o |
Sunil Ravi | 79e6c4f | 2025-01-04 00:47:06 +0000 | [diff] [blame] | 323 | NEED_OFFCHANNEL=y |
Sunil Ravi | b0ac25f | 2024-07-12 01:42:03 +0000 | [diff] [blame] | 324 | CFLAGS += -DCONFIG_NAN_USD |
| 325 | endif |
| 326 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 327 | ifdef CONFIG_OWE |
| 328 | CFLAGS += -DCONFIG_OWE |
| 329 | NEED_ECC=y |
| 330 | NEED_HMAC_SHA256_KDF=y |
| 331 | NEED_HMAC_SHA384_KDF=y |
| 332 | NEED_HMAC_SHA512_KDF=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 333 | NEED_SHA384=y |
| 334 | NEED_SHA512=y |
| 335 | endif |
| 336 | |
Jimmy Chen | caaac07 | 2019-09-16 16:36:06 +0800 | [diff] [blame] | 337 | ifdef CONFIG_WAPI_INTERFACE |
| 338 | L_CFLAGS += -DCONFIG_WAPI_INTERFACE |
| 339 | endif |
| 340 | |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 341 | ifdef CONFIG_FILS |
| 342 | CFLAGS += -DCONFIG_FILS |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 343 | NEED_SHA384=y |
| 344 | NEED_AES_SIV=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 345 | ifdef CONFIG_FILS_SK_PFS |
| 346 | CFLAGS += -DCONFIG_FILS_SK_PFS |
| 347 | NEED_ECC=y |
| 348 | endif |
| 349 | endif |
| 350 | |
| 351 | ifdef CONFIG_MBO |
| 352 | CONFIG_WNM=y |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 353 | endif |
| 354 | |
Sunil Ravi | b0ac25f | 2024-07-12 01:42:03 +0000 | [diff] [blame] | 355 | ifdef CONFIG_BGSCAN_SIMPLE |
| 356 | CONFIG_WNM=y |
| 357 | endif |
| 358 | |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 359 | ifdef CONFIG_WNM |
| 360 | CFLAGS += -DCONFIG_WNM |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 361 | OBJS += wnm_sta.o |
| 362 | endif |
| 363 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 364 | ifdef CONFIG_TDLS |
| 365 | CFLAGS += -DCONFIG_TDLS |
| 366 | OBJS += ../src/rsn_supp/tdls.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 367 | endif |
| 368 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 369 | ifdef CONFIG_TDLS_TESTING |
| 370 | CFLAGS += -DCONFIG_TDLS_TESTING |
| 371 | endif |
| 372 | |
Dmitry Shmidt | 2933359 | 2017-01-09 12:27:11 -0800 | [diff] [blame] | 373 | ifdef CONFIG_PMKSA_CACHE_EXTERNAL |
| 374 | CFLAGS += -DCONFIG_PMKSA_CACHE_EXTERNAL |
| 375 | endif |
| 376 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 377 | ifndef CONFIG_NO_WPA |
| 378 | OBJS += ../src/rsn_supp/wpa.o |
| 379 | OBJS += ../src/rsn_supp/preauth.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 380 | OBJS += ../src/rsn_supp/wpa_ie.o |
| 381 | OBJS += ../src/common/wpa_common.o |
| 382 | NEED_AES=y |
| 383 | NEED_SHA1=y |
| 384 | NEED_MD5=y |
| 385 | NEED_RC4=y |
| 386 | else |
Dmitry Shmidt | 34af306 | 2013-07-11 10:46:32 -0700 | [diff] [blame] | 387 | CFLAGS += -DCONFIG_NO_WPA |
Dmitry Shmidt | d7ff03d | 2015-12-04 14:49:35 -0800 | [diff] [blame] | 388 | ifeq ($(CONFIG_TLS), internal) |
| 389 | NEED_SHA1=y |
| 390 | NEED_MD5=y |
| 391 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 392 | endif |
| 393 | |
| 394 | ifdef CONFIG_IBSS_RSN |
| 395 | NEED_RSN_AUTHENTICATOR=y |
| 396 | CFLAGS += -DCONFIG_IBSS_RSN |
Dmitry Shmidt | e466304 | 2016-04-04 10:07:49 -0700 | [diff] [blame] | 397 | CFLAGS += -DCONFIG_NO_VLAN |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 398 | OBJS += ibss_rsn.o |
| 399 | endif |
| 400 | |
Dmitry Shmidt | e466304 | 2016-04-04 10:07:49 -0700 | [diff] [blame] | 401 | ifdef CONFIG_MATCH_IFACE |
| 402 | CFLAGS += -DCONFIG_MATCH_IFACE |
| 403 | endif |
| 404 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 405 | ifdef CONFIG_P2P |
| 406 | OBJS += p2p_supplicant.o |
Dmitry Shmidt | f73259c | 2015-03-17 11:00:54 -0700 | [diff] [blame] | 407 | OBJS += p2p_supplicant_sd.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 408 | OBJS += ../src/p2p/p2p.o |
| 409 | OBJS += ../src/p2p/p2p_utils.o |
| 410 | OBJS += ../src/p2p/p2p_parse.o |
| 411 | OBJS += ../src/p2p/p2p_build.o |
| 412 | OBJS += ../src/p2p/p2p_go_neg.o |
| 413 | OBJS += ../src/p2p/p2p_sd.o |
| 414 | OBJS += ../src/p2p/p2p_pd.o |
| 415 | OBJS += ../src/p2p/p2p_invitation.o |
| 416 | OBJS += ../src/p2p/p2p_dev_disc.o |
| 417 | OBJS += ../src/p2p/p2p_group.o |
| 418 | OBJS += ../src/ap/p2p_hostapd.o |
| 419 | CFLAGS += -DCONFIG_P2P |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 420 | NEED_GAS=y |
| 421 | NEED_OFFCHANNEL=y |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 422 | CONFIG_WPS=y |
| 423 | CONFIG_AP=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 424 | ifdef CONFIG_P2P_STRICT |
| 425 | CFLAGS += -DCONFIG_P2P_STRICT |
| 426 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 427 | ifdef CONFIG_WIFI_DISPLAY |
| 428 | CFLAGS += -DCONFIG_WIFI_DISPLAY |
| 429 | OBJS += wifi_display.o |
| 430 | endif |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 431 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 432 | |
Hai Shalom | 6084025 | 2021-02-19 19:02:11 -0800 | [diff] [blame] | 433 | ifdef CONFIG_PASN |
| 434 | CFLAGS += -DCONFIG_PASN |
| 435 | CFLAGS += -DCONFIG_PTKSA_CACHE |
| 436 | NEED_HMAC_SHA256_KDF=y |
| 437 | NEED_HMAC_SHA384_KDF=y |
| 438 | NEED_SHA256=y |
| 439 | NEED_SHA384=y |
Sunil Ravi | 38ad1ed | 2023-01-17 23:58:31 +0000 | [diff] [blame] | 440 | OBJS += ../src/pasn/pasn_initiator.o |
Sunil Ravi | 99c035e | 2024-07-12 01:42:03 +0000 | [diff] [blame] | 441 | OBJS += ../src/pasn/pasn_common.o |
Hai Shalom | 6084025 | 2021-02-19 19:02:11 -0800 | [diff] [blame] | 442 | OBJS += pasn_supplicant.o |
| 443 | endif |
| 444 | |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 445 | ifdef CONFIG_HS20 |
| 446 | OBJS += hs20_supplicant.o |
| 447 | CFLAGS += -DCONFIG_HS20 |
| 448 | CONFIG_INTERWORKING=y |
| 449 | endif |
| 450 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 451 | ifdef CONFIG_INTERWORKING |
| 452 | OBJS += interworking.o |
| 453 | CFLAGS += -DCONFIG_INTERWORKING |
| 454 | NEED_GAS=y |
| 455 | endif |
| 456 | |
Dmitry Shmidt | 912c6ec | 2015-03-30 13:16:51 -0700 | [diff] [blame] | 457 | ifdef CONFIG_NO_ROAMING |
| 458 | CFLAGS += -DCONFIG_NO_ROAMING |
| 459 | endif |
| 460 | |
Sunil Ravi | 2a14cf1 | 2023-11-21 00:54:38 +0000 | [diff] [blame] | 461 | ifdef CONFIG_OPENSC_ENGINE_PATH |
| 462 | CFLAGS += -DCONFIG_OPENSC_ENGINE_PATH=\"$(CONFIG_OPENSC_ENGINE_PATH)\" |
| 463 | endif |
| 464 | |
| 465 | ifdef CONFIG_NO_OPENSC_ENGINE_PATH |
| 466 | CFLAGS += -DCONFIG_OPENSC_ENGINE_PATH=NULL |
| 467 | endif |
| 468 | |
| 469 | ifdef CONFIG_PKCS11_ENGINE_PATH |
| 470 | CFLAGS += -DCONFIG_PKCS11_ENGINE_PATH=\"$(CONFIG_PKCS11_ENGINE_PATH)\" |
| 471 | endif |
| 472 | |
| 473 | ifdef CONFIG_NO_PKCS11_ENGINE_PATH |
| 474 | CFLAGS += -DCONFIG_PKCS11_ENGINE_PATH=NULL |
| 475 | endif |
| 476 | |
| 477 | ifdef CONFIG_PKCS11_MODULE_PATH |
| 478 | CFLAGS += -DCONFIG_PKCS11_MODULE_PATH=\"$(CONFIG_PKCS11_MODULE_PATH)\" |
| 479 | endif |
| 480 | |
| 481 | ifdef CONFIG_NO_PKCS11_MODULE_PATH |
| 482 | CFLAGS += -DCONFIG_PKCS11_MODULE_PATH=NULL |
| 483 | endif |
| 484 | |
| 485 | ifdef CONFIG_NO_LOAD_DYNAMIC_EAP |
| 486 | CFLAGS += -DCONFIG_NO_LOAD_DYNAMIC_EAP |
| 487 | endif |
| 488 | |
Sunil Ravi | b0ac25f | 2024-07-12 01:42:03 +0000 | [diff] [blame] | 489 | ifdef CONFIG_NO_RRM |
| 490 | CFLAGS += -DCONFIG_NO_RRM |
| 491 | else |
| 492 | OBJS += rrm.o |
| 493 | ifdef CONFIG_AP |
| 494 | OBJS += ../src/ap/rrm.o |
| 495 | endif |
| 496 | OBJS += op_classes.o |
| 497 | endif |
| 498 | |
| 499 | ifdef CONFIG_NO_WMM_AC |
| 500 | CFLAGS += -DCONFIG_NO_WMM_AC |
| 501 | else |
| 502 | OBJS += wmm_ac.o |
| 503 | endif |
| 504 | |
| 505 | ifdef CONFIG_NO_ROBUST_AV |
| 506 | CFLAGS += -DCONFIG_NO_ROBUST_AV |
| 507 | else |
| 508 | OBJS += robust_av.o |
| 509 | endif |
| 510 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 511 | include ../src/drivers/drivers.mak |
| 512 | ifdef CONFIG_AP |
| 513 | OBJS_d += $(DRV_BOTH_OBJS) |
| 514 | CFLAGS += $(DRV_BOTH_CFLAGS) |
| 515 | LDFLAGS += $(DRV_BOTH_LDFLAGS) |
| 516 | LIBS += $(DRV_BOTH_LIBS) |
| 517 | else |
| 518 | NEED_AP_MLME= |
| 519 | OBJS_d += $(DRV_WPA_OBJS) |
| 520 | CFLAGS += $(DRV_WPA_CFLAGS) |
| 521 | LDFLAGS += $(DRV_WPA_LDFLAGS) |
| 522 | LIBS += $(DRV_WPA_LIBS) |
| 523 | endif |
| 524 | |
| 525 | ifndef CONFIG_L2_PACKET |
| 526 | CONFIG_L2_PACKET=linux |
| 527 | endif |
| 528 | |
| 529 | OBJS_l2 += ../src/l2_packet/l2_packet_$(CONFIG_L2_PACKET).o |
| 530 | |
| 531 | ifeq ($(CONFIG_L2_PACKET), pcap) |
| 532 | ifdef CONFIG_WINPCAP |
| 533 | CFLAGS += -DCONFIG_WINPCAP |
| 534 | LIBS += -lwpcap -lpacket |
| 535 | LIBS_w += -lwpcap |
| 536 | else |
| 537 | LIBS += -ldnet -lpcap |
| 538 | endif |
| 539 | endif |
| 540 | |
| 541 | ifeq ($(CONFIG_L2_PACKET), winpcap) |
| 542 | LIBS += -lwpcap -lpacket |
| 543 | LIBS_w += -lwpcap |
| 544 | endif |
| 545 | |
| 546 | ifeq ($(CONFIG_L2_PACKET), freebsd) |
| 547 | LIBS += -lpcap |
| 548 | endif |
| 549 | |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 550 | ifdef CONFIG_ERP |
| 551 | CFLAGS += -DCONFIG_ERP |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 552 | NEED_HMAC_SHA256_KDF=y |
| 553 | endif |
| 554 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 555 | ifdef CONFIG_EAP_TLS |
| 556 | # EAP-TLS |
| 557 | ifeq ($(CONFIG_EAP_TLS), dyn) |
| 558 | CFLAGS += -DEAP_TLS_DYNAMIC |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 559 | EAPDYN += eap_tls.so |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 560 | else |
| 561 | CFLAGS += -DEAP_TLS |
| 562 | OBJS += ../src/eap_peer/eap_tls.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 563 | endif |
| 564 | TLS_FUNCS=y |
| 565 | CONFIG_IEEE8021X_EAPOL=y |
Sunil Ravi | a04bd25 | 2022-05-02 22:54:18 -0700 | [diff] [blame] | 566 | ifdef CONFIG_EAP_TLSV1_3 |
| 567 | CFLAGS += -DEAP_TLSV1_3 |
| 568 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 569 | endif |
| 570 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 571 | ifdef CONFIG_EAP_UNAUTH_TLS |
| 572 | # EAP-UNAUTH-TLS |
| 573 | CFLAGS += -DEAP_UNAUTH_TLS |
Dmitry Shmidt | dda10c2 | 2015-03-24 16:05:01 -0700 | [diff] [blame] | 574 | ifndef CONFIG_EAP_TLS |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 575 | OBJS += ../src/eap_peer/eap_tls.o |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 576 | TLS_FUNCS=y |
| 577 | endif |
| 578 | CONFIG_IEEE8021X_EAPOL=y |
| 579 | endif |
| 580 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 581 | ifdef CONFIG_EAP_PEAP |
| 582 | # EAP-PEAP |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 583 | SRC_EAP_PEAP = ../src/eap_peer/eap_peap.c ../src/eap_common/eap_peap_common.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 584 | ifeq ($(CONFIG_EAP_PEAP), dyn) |
| 585 | CFLAGS += -DEAP_PEAP_DYNAMIC |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 586 | EAPDYN += eap_peap.so |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 587 | else |
| 588 | CFLAGS += -DEAP_PEAP |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 589 | OBJS += $(patsubst %.c, %.o, $(SRC_EAP_PEAP)) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 590 | endif |
| 591 | TLS_FUNCS=y |
| 592 | CONFIG_IEEE8021X_EAPOL=y |
| 593 | endif |
| 594 | |
| 595 | ifdef CONFIG_EAP_TTLS |
| 596 | # EAP-TTLS |
| 597 | ifeq ($(CONFIG_EAP_TTLS), dyn) |
| 598 | CFLAGS += -DEAP_TTLS_DYNAMIC |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 599 | EAPDYN += eap_ttls.so |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 600 | else |
| 601 | CFLAGS += -DEAP_TTLS |
| 602 | OBJS += ../src/eap_peer/eap_ttls.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 603 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 604 | TLS_FUNCS=y |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 605 | ifndef CONFIG_FIPS |
| 606 | MS_FUNCS=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 607 | CHAP=y |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 608 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 609 | CONFIG_IEEE8021X_EAPOL=y |
| 610 | endif |
| 611 | |
| 612 | ifdef CONFIG_EAP_MD5 |
| 613 | # EAP-MD5 |
| 614 | ifeq ($(CONFIG_EAP_MD5), dyn) |
| 615 | CFLAGS += -DEAP_MD5_DYNAMIC |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 616 | EAPDYN += eap_md5.so |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 617 | else |
| 618 | CFLAGS += -DEAP_MD5 |
| 619 | OBJS += ../src/eap_peer/eap_md5.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 620 | endif |
| 621 | CHAP=y |
| 622 | CONFIG_IEEE8021X_EAPOL=y |
| 623 | endif |
| 624 | |
| 625 | # backwards compatibility for old spelling |
| 626 | ifdef CONFIG_MSCHAPV2 |
| 627 | ifndef CONFIG_EAP_MSCHAPV2 |
| 628 | CONFIG_EAP_MSCHAPV2=y |
| 629 | endif |
| 630 | endif |
| 631 | |
| 632 | ifdef CONFIG_EAP_MSCHAPV2 |
| 633 | # EAP-MSCHAPv2 |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 634 | SRC_EAP_MSCHAPV2 = ../src/eap_peer/eap_mschapv2.c ../src/eap_peer/mschapv2.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 635 | ifeq ($(CONFIG_EAP_MSCHAPV2), dyn) |
| 636 | CFLAGS += -DEAP_MSCHAPv2_DYNAMIC |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 637 | EAPDYN += eap_mschapv2.so |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 638 | else |
| 639 | CFLAGS += -DEAP_MSCHAPv2 |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 640 | OBJS += $(patsubst %.c, %.o, $(SRC_EAP_MSCHAPV2)) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 641 | endif |
| 642 | MS_FUNCS=y |
| 643 | CONFIG_IEEE8021X_EAPOL=y |
| 644 | endif |
| 645 | |
| 646 | ifdef CONFIG_EAP_GTC |
| 647 | # EAP-GTC |
| 648 | ifeq ($(CONFIG_EAP_GTC), dyn) |
| 649 | CFLAGS += -DEAP_GTC_DYNAMIC |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 650 | EAPDYN += eap_gtc.so |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 651 | else |
| 652 | CFLAGS += -DEAP_GTC |
| 653 | OBJS += ../src/eap_peer/eap_gtc.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 654 | endif |
| 655 | CONFIG_IEEE8021X_EAPOL=y |
| 656 | endif |
| 657 | |
| 658 | ifdef CONFIG_EAP_OTP |
| 659 | # EAP-OTP |
| 660 | ifeq ($(CONFIG_EAP_OTP), dyn) |
| 661 | CFLAGS += -DEAP_OTP_DYNAMIC |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 662 | EAPDYN += eap_otp.so |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 663 | else |
| 664 | CFLAGS += -DEAP_OTP |
| 665 | OBJS += ../src/eap_peer/eap_otp.o |
| 666 | endif |
| 667 | CONFIG_IEEE8021X_EAPOL=y |
| 668 | endif |
| 669 | |
| 670 | ifdef CONFIG_EAP_SIM |
| 671 | # EAP-SIM |
| 672 | ifeq ($(CONFIG_EAP_SIM), dyn) |
| 673 | CFLAGS += -DEAP_SIM_DYNAMIC |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 674 | EAPDYN += eap_sim.so |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 675 | else |
| 676 | CFLAGS += -DEAP_SIM |
| 677 | OBJS += ../src/eap_peer/eap_sim.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 678 | endif |
| 679 | CONFIG_IEEE8021X_EAPOL=y |
| 680 | CONFIG_EAP_SIM_COMMON=y |
| 681 | NEED_AES_CBC=y |
| 682 | endif |
| 683 | |
| 684 | ifdef CONFIG_EAP_LEAP |
| 685 | # EAP-LEAP |
| 686 | ifeq ($(CONFIG_EAP_LEAP), dyn) |
| 687 | CFLAGS += -DEAP_LEAP_DYNAMIC |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 688 | EAPDYN += eap_leap.so |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 689 | else |
| 690 | CFLAGS += -DEAP_LEAP |
| 691 | OBJS += ../src/eap_peer/eap_leap.o |
| 692 | endif |
| 693 | MS_FUNCS=y |
| 694 | CONFIG_IEEE8021X_EAPOL=y |
| 695 | endif |
| 696 | |
| 697 | ifdef CONFIG_EAP_PSK |
| 698 | # EAP-PSK |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 699 | SRC_EAP_PSK = ../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] | 700 | ifeq ($(CONFIG_EAP_PSK), dyn) |
| 701 | CFLAGS += -DEAP_PSK_DYNAMIC |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 702 | EAPDYN += eap_psk.so |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 703 | else |
| 704 | CFLAGS += -DEAP_PSK |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 705 | OBJS += $(patsubst %.c, %.o, $(SRC_EAP_PSK)) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 706 | endif |
| 707 | CONFIG_IEEE8021X_EAPOL=y |
| 708 | NEED_AES=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 709 | NEED_AES_ENCBLOCK=y |
| 710 | NEED_AES_EAX=y |
| 711 | endif |
| 712 | |
| 713 | ifdef CONFIG_EAP_AKA |
| 714 | # EAP-AKA |
| 715 | ifeq ($(CONFIG_EAP_AKA), dyn) |
| 716 | CFLAGS += -DEAP_AKA_DYNAMIC |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 717 | EAPDYN += eap_aka.so |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 718 | else |
| 719 | CFLAGS += -DEAP_AKA |
| 720 | OBJS += ../src/eap_peer/eap_aka.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 721 | endif |
| 722 | CONFIG_IEEE8021X_EAPOL=y |
| 723 | CONFIG_EAP_SIM_COMMON=y |
| 724 | NEED_AES_CBC=y |
| 725 | endif |
| 726 | |
Dmitry Shmidt | f862328 | 2013-02-20 14:34:59 -0800 | [diff] [blame] | 727 | ifdef CONFIG_EAP_PROXY |
| 728 | CFLAGS += -DCONFIG_EAP_PROXY |
| 729 | OBJS += ../src/eap_peer/eap_proxy_$(CONFIG_EAP_PROXY).o |
Dmitry Shmidt | 61593f0 | 2014-04-21 16:27:35 -0700 | [diff] [blame] | 730 | include eap_proxy_$(CONFIG_EAP_PROXY).mak |
Dmitry Shmidt | f862328 | 2013-02-20 14:34:59 -0800 | [diff] [blame] | 731 | CONFIG_IEEE8021X_EAPOL=y |
| 732 | endif |
| 733 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 734 | ifdef CONFIG_EAP_AKA_PRIME |
| 735 | # EAP-AKA' |
| 736 | ifeq ($(CONFIG_EAP_AKA_PRIME), dyn) |
| 737 | CFLAGS += -DEAP_AKA_PRIME_DYNAMIC |
| 738 | else |
| 739 | CFLAGS += -DEAP_AKA_PRIME |
| 740 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 741 | endif |
| 742 | |
| 743 | ifdef CONFIG_EAP_SIM_COMMON |
| 744 | OBJS += ../src/eap_common/eap_sim_common.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 745 | NEED_AES=y |
| 746 | NEED_FIPS186_2_PRF=y |
| 747 | endif |
| 748 | |
| 749 | ifdef CONFIG_EAP_FAST |
| 750 | # EAP-FAST |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 751 | SRC_EAP_FAST = ../src/eap_peer/eap_fast.c ../src/eap_peer/eap_fast_pac.c |
| 752 | SRC_EAP_FAST += ../src/eap_common/eap_fast_common.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 753 | ifeq ($(CONFIG_EAP_FAST), dyn) |
| 754 | CFLAGS += -DEAP_FAST_DYNAMIC |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 755 | EAPDYN += eap_fast.so |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 756 | else |
| 757 | CFLAGS += -DEAP_FAST |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 758 | OBJS += $(patsubst %.c, %.o, $(SRC_EAP_FAST)) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 759 | endif |
| 760 | TLS_FUNCS=y |
| 761 | CONFIG_IEEE8021X_EAPOL=y |
| 762 | NEED_T_PRF=y |
| 763 | endif |
| 764 | |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 765 | ifdef CONFIG_EAP_TEAP |
| 766 | # EAP-TEAP |
Sunil Ravi | 79e6c4f | 2025-01-04 00:47:06 +0000 | [diff] [blame] | 767 | SRC_EAP_TEAP = ../src/eap_peer/eap_teap.c |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 768 | SRC_EAP_TEAP += ../src/eap_common/eap_teap_common.c |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 769 | ifeq ($(CONFIG_EAP_TEAP), dyn) |
| 770 | CFLAGS += -DEAP_TEAP_DYNAMIC |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 771 | EAPDYN += eap_teap.so |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 772 | else |
| 773 | CFLAGS += -DEAP_TEAP |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 774 | OBJS += $(patsubst %.c, %.o, $(SRC_EAP_TEAP)) |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 775 | endif |
| 776 | TLS_FUNCS=y |
| 777 | CONFIG_IEEE8021X_EAPOL=y |
| 778 | NEED_T_PRF=y |
| 779 | NEED_SHA384=y |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 780 | NEED_TLS_PRF_SHA256=y |
| 781 | NEED_TLS_PRF_SHA384=y |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 782 | endif |
| 783 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 784 | ifdef CONFIG_EAP_PAX |
| 785 | # EAP-PAX |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 786 | SRC_EAP_PAX = ../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] | 787 | ifeq ($(CONFIG_EAP_PAX), dyn) |
| 788 | CFLAGS += -DEAP_PAX_DYNAMIC |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 789 | EAPDYN += eap_pax.so |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 790 | else |
| 791 | CFLAGS += -DEAP_PAX |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 792 | OBJS += $(patsubst %.c, %.o, $(SRC_EAP_PAX)) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 793 | endif |
| 794 | CONFIG_IEEE8021X_EAPOL=y |
| 795 | endif |
| 796 | |
| 797 | ifdef CONFIG_EAP_SAKE |
| 798 | # EAP-SAKE |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 799 | SRC_EAP_SAKE = ../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] | 800 | ifeq ($(CONFIG_EAP_SAKE), dyn) |
| 801 | CFLAGS += -DEAP_SAKE_DYNAMIC |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 802 | EAPDYN += eap_sake.so |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 803 | else |
| 804 | CFLAGS += -DEAP_SAKE |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 805 | OBJS += $(patsubst %.c, %.o, $(SRC_EAP_SAKE)) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 806 | endif |
| 807 | CONFIG_IEEE8021X_EAPOL=y |
| 808 | endif |
| 809 | |
| 810 | ifdef CONFIG_EAP_GPSK |
| 811 | # EAP-GPSK |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 812 | SRC_EAP_GPSK = ../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] | 813 | ifeq ($(CONFIG_EAP_GPSK), dyn) |
| 814 | CFLAGS += -DEAP_GPSK_DYNAMIC |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 815 | EAPDYN += eap_gpsk.so |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 816 | else |
| 817 | CFLAGS += -DEAP_GPSK |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 818 | OBJS += $(patsubst %.c, %.o, $(SRC_EAP_GPSK)) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 819 | endif |
| 820 | CONFIG_IEEE8021X_EAPOL=y |
| 821 | ifdef CONFIG_EAP_GPSK_SHA256 |
| 822 | CFLAGS += -DEAP_GPSK_SHA256 |
| 823 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 824 | endif |
| 825 | |
| 826 | ifdef CONFIG_EAP_PWD |
| 827 | CFLAGS += -DEAP_PWD |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 828 | ifeq ($(CONFIG_TLS), wolfssl) |
| 829 | CFLAGS += -DCONFIG_ECC |
| 830 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 831 | OBJS += ../src/eap_peer/eap_pwd.o ../src/eap_common/eap_pwd_common.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 832 | CONFIG_IEEE8021X_EAPOL=y |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 833 | NEED_ECC=y |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 834 | NEED_DRAGONFLY=y |
Sunil Ravi | 876a49b | 2025-02-03 19:18:32 +0000 | [diff] [blame] | 835 | ifndef CONFIG_FIPS |
Sunil Ravi | a04bd25 | 2022-05-02 22:54:18 -0700 | [diff] [blame] | 836 | MS_FUNCS=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 837 | endif |
Sunil Ravi | 876a49b | 2025-02-03 19:18:32 +0000 | [diff] [blame] | 838 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 839 | |
Dmitry Shmidt | 34af306 | 2013-07-11 10:46:32 -0700 | [diff] [blame] | 840 | ifdef CONFIG_EAP_EKE |
| 841 | # EAP-EKE |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 842 | SRC_EAP_EKE = ../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] | 843 | ifeq ($(CONFIG_EAP_EKE), dyn) |
| 844 | CFLAGS += -DEAP_EKE_DYNAMIC |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 845 | EAPDYN += eap_eke.so |
Dmitry Shmidt | 34af306 | 2013-07-11 10:46:32 -0700 | [diff] [blame] | 846 | else |
| 847 | CFLAGS += -DEAP_EKE |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 848 | OBJS += $(patsubst %.c, %.o, $(SRC_EAP_EKE)) |
Dmitry Shmidt | 34af306 | 2013-07-11 10:46:32 -0700 | [diff] [blame] | 849 | endif |
| 850 | CONFIG_IEEE8021X_EAPOL=y |
| 851 | NEED_DH_GROUPS=y |
| 852 | NEED_DH_GROUPS_ALL=y |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 853 | NEED_AES_CBC=y |
Dmitry Shmidt | 34af306 | 2013-07-11 10:46:32 -0700 | [diff] [blame] | 854 | endif |
| 855 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 856 | ifdef CONFIG_WPS |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 857 | # EAP-WSC |
| 858 | CFLAGS += -DCONFIG_WPS -DEAP_WSC |
| 859 | OBJS += wps_supplicant.o |
| 860 | OBJS += ../src/utils/uuid.o |
| 861 | OBJS += ../src/eap_peer/eap_wsc.o ../src/eap_common/eap_wsc_common.o |
| 862 | OBJS += ../src/wps/wps.o |
| 863 | OBJS += ../src/wps/wps_common.o |
| 864 | OBJS += ../src/wps/wps_attr_parse.o |
| 865 | OBJS += ../src/wps/wps_attr_build.o |
| 866 | OBJS += ../src/wps/wps_attr_process.o |
| 867 | OBJS += ../src/wps/wps_dev_attr.o |
| 868 | OBJS += ../src/wps/wps_enrollee.o |
| 869 | OBJS += ../src/wps/wps_registrar.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 870 | CONFIG_IEEE8021X_EAPOL=y |
| 871 | NEED_DH_GROUPS=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 872 | NEED_BASE64=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 873 | NEED_AES_CBC=y |
| 874 | NEED_MODEXP=y |
| 875 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 876 | ifdef CONFIG_WPS_NFC |
| 877 | CFLAGS += -DCONFIG_WPS_NFC |
| 878 | OBJS += ../src/wps/ndef.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 879 | NEED_WPS_OOB=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 880 | endif |
| 881 | |
| 882 | ifdef NEED_WPS_OOB |
| 883 | CFLAGS += -DCONFIG_WPS_OOB |
| 884 | endif |
| 885 | |
| 886 | ifdef CONFIG_WPS_ER |
| 887 | CONFIG_WPS_UPNP=y |
| 888 | CFLAGS += -DCONFIG_WPS_ER |
| 889 | OBJS += ../src/wps/wps_er.o |
| 890 | OBJS += ../src/wps/wps_er_ssdp.o |
| 891 | endif |
| 892 | |
| 893 | ifdef CONFIG_WPS_UPNP |
| 894 | CFLAGS += -DCONFIG_WPS_UPNP |
| 895 | OBJS += ../src/wps/wps_upnp.o |
| 896 | OBJS += ../src/wps/wps_upnp_ssdp.o |
| 897 | OBJS += ../src/wps/wps_upnp_web.o |
| 898 | OBJS += ../src/wps/wps_upnp_event.o |
| 899 | OBJS += ../src/wps/wps_upnp_ap.o |
| 900 | OBJS += ../src/wps/upnp_xml.o |
| 901 | OBJS += ../src/wps/httpread.o |
| 902 | OBJS += ../src/wps/http_client.o |
| 903 | OBJS += ../src/wps/http_server.o |
| 904 | endif |
| 905 | |
| 906 | ifdef CONFIG_WPS_STRICT |
| 907 | CFLAGS += -DCONFIG_WPS_STRICT |
| 908 | OBJS += ../src/wps/wps_validate.o |
| 909 | endif |
| 910 | |
| 911 | ifdef CONFIG_WPS_TESTING |
| 912 | CFLAGS += -DCONFIG_WPS_TESTING |
| 913 | endif |
| 914 | |
| 915 | ifdef CONFIG_WPS_REG_DISABLE_OPEN |
| 916 | CFLAGS += -DCONFIG_WPS_REG_DISABLE_OPEN |
| 917 | endif |
| 918 | |
| 919 | endif |
| 920 | |
| 921 | ifdef CONFIG_EAP_IKEV2 |
| 922 | # EAP-IKEv2 |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 923 | SRC_EAP_IKEV2 = ../src/eap_peer/eap_ikev2.c |
| 924 | SRC_EAP_IKEV2 += ../src/eap_peer/ikev2.c |
| 925 | SRC_EAP_IKEV2 += ../src/eap_common/eap_ikev2_common.c |
| 926 | SRC_EAP_IKEV2 += ../src/eap_common/ikev2_common.c |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 927 | ifeq ($(CONFIG_EAP_IKEV2), dyn) |
| 928 | CFLAGS += -DEAP_IKEV2_DYNAMIC |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 929 | EAPDYN += eap_ikev2.so |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 930 | else |
| 931 | CFLAGS += -DEAP_IKEV2 |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 932 | OBJS += $(patsubst %.c, %.o, $(SRC_EAP_IKEV2)) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 933 | endif |
| 934 | CONFIG_IEEE8021X_EAPOL=y |
| 935 | NEED_DH_GROUPS=y |
| 936 | NEED_DH_GROUPS_ALL=y |
| 937 | NEED_MODEXP=y |
| 938 | NEED_CIPHER=y |
| 939 | endif |
| 940 | |
| 941 | ifdef CONFIG_EAP_VENDOR_TEST |
| 942 | ifeq ($(CONFIG_EAP_VENDOR_TEST), dyn) |
| 943 | CFLAGS += -DEAP_VENDOR_TEST_DYNAMIC |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 944 | EAPDYN += eap_vendor_test.so |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 945 | else |
| 946 | CFLAGS += -DEAP_VENDOR_TEST |
| 947 | OBJS += ../src/eap_peer/eap_vendor_test.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 948 | endif |
| 949 | CONFIG_IEEE8021X_EAPOL=y |
| 950 | endif |
| 951 | |
| 952 | ifdef CONFIG_EAP_TNC |
| 953 | # EAP-TNC |
| 954 | CFLAGS += -DEAP_TNC |
| 955 | OBJS += ../src/eap_peer/eap_tnc.o |
| 956 | OBJS += ../src/eap_peer/tncc.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 957 | NEED_BASE64=y |
| 958 | ifndef CONFIG_NATIVE_WINDOWS |
| 959 | ifndef CONFIG_DRIVER_BSD |
| 960 | LIBS += -ldl |
| 961 | endif |
| 962 | endif |
| 963 | endif |
| 964 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 965 | ifdef CONFIG_MACSEC |
| 966 | CFLAGS += -DCONFIG_MACSEC |
| 967 | CONFIG_IEEE8021X_EAPOL=y |
| 968 | NEED_AES_ENCBLOCK=y |
| 969 | NEED_AES_UNWRAP=y |
| 970 | NEED_AES_WRAP=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 971 | OBJS += wpas_kay.o |
| 972 | OBJS += ../src/pae/ieee802_1x_cp.o |
| 973 | OBJS += ../src/pae/ieee802_1x_kay.o |
| 974 | OBJS += ../src/pae/ieee802_1x_key.o |
| 975 | OBJS += ../src/pae/ieee802_1x_secy_ops.o |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 976 | ifdef CONFIG_AP |
| 977 | OBJS += ../src/ap/wpa_auth_kay.o |
| 978 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 979 | endif |
| 980 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 981 | ifdef CONFIG_IEEE8021X_EAPOL |
| 982 | # IEEE 802.1X/EAPOL state machines (e.g., for RADIUS authentication) |
| 983 | CFLAGS += -DIEEE8021X_EAPOL |
| 984 | OBJS += ../src/eapol_supp/eapol_supp_sm.o |
| 985 | OBJS += ../src/eap_peer/eap.o ../src/eap_peer/eap_methods.o |
| 986 | NEED_EAP_COMMON=y |
| 987 | ifdef CONFIG_DYNAMIC_EAP_METHODS |
| 988 | CFLAGS += -DCONFIG_DYNAMIC_EAP_METHODS |
| 989 | LIBS += -ldl -rdynamic |
| 990 | endif |
| 991 | endif |
| 992 | |
| 993 | ifdef CONFIG_AP |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 994 | NEED_EAP_COMMON=y |
| 995 | NEED_RSN_AUTHENTICATOR=y |
| 996 | CFLAGS += -DCONFIG_AP |
| 997 | OBJS += ap.o |
| 998 | CFLAGS += -DCONFIG_NO_RADIUS |
| 999 | CFLAGS += -DCONFIG_NO_ACCOUNTING |
| 1000 | CFLAGS += -DCONFIG_NO_VLAN |
| 1001 | OBJS += ../src/ap/hostapd.o |
| 1002 | OBJS += ../src/ap/wpa_auth_glue.o |
| 1003 | OBJS += ../src/ap/utils.o |
| 1004 | OBJS += ../src/ap/authsrv.o |
| 1005 | OBJS += ../src/ap/ap_config.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1006 | OBJS += ../src/ap/sta_info.o |
| 1007 | OBJS += ../src/ap/tkip_countermeasures.o |
| 1008 | OBJS += ../src/ap/ap_mlme.o |
| 1009 | OBJS += ../src/ap/ieee802_1x.o |
| 1010 | OBJS += ../src/eapol_auth/eapol_auth_sm.o |
| 1011 | OBJS += ../src/ap/ieee802_11_auth.o |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1012 | OBJS += ../src/ap/ieee802_11_shared.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1013 | OBJS += ../src/ap/drv_callbacks.o |
| 1014 | OBJS += ../src/ap/ap_drv_ops.o |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1015 | OBJS += ../src/ap/beacon.o |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 1016 | OBJS += ../src/ap/bss_load.o |
Dmitry Shmidt | d5e4923 | 2012-12-03 15:08:10 -0800 | [diff] [blame] | 1017 | OBJS += ../src/ap/eap_user_db.o |
Dmitry Shmidt | 849734c | 2016-05-27 09:59:01 -0700 | [diff] [blame] | 1018 | OBJS += ../src/ap/neighbor_db.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1019 | OBJS += ../src/ap/ieee802_11_ht.o |
Dmitry Shmidt | 68d0e3e | 2013-10-28 17:59:21 -0700 | [diff] [blame] | 1020 | ifdef CONFIG_IEEE80211AC |
| 1021 | OBJS += ../src/ap/ieee802_11_vht.o |
| 1022 | endif |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 1023 | ifdef CONFIG_IEEE80211AX |
| 1024 | OBJS += ../src/ap/ieee802_11_he.o |
| 1025 | endif |
Sunil Ravi | a04bd25 | 2022-05-02 22:54:18 -0700 | [diff] [blame] | 1026 | ifdef CONFIG_IEEE80211BE |
| 1027 | OBJS += ../src/ap/ieee802_11_eht.o |
| 1028 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1029 | ifdef CONFIG_WNM_AP |
| 1030 | CFLAGS += -DCONFIG_WNM_AP |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 1031 | OBJS += ../src/ap/wnm_ap.o |
| 1032 | endif |
Dmitry Shmidt | 57c2d39 | 2016-02-23 13:40:19 -0800 | [diff] [blame] | 1033 | ifdef CONFIG_MBO |
| 1034 | OBJS += ../src/ap/mbo_ap.o |
| 1035 | endif |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 1036 | ifdef CONFIG_FILS |
| 1037 | OBJS += ../src/ap/fils_hlp.o |
| 1038 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1039 | ifdef CONFIG_CTRL_IFACE |
| 1040 | OBJS += ../src/ap/ctrl_iface_ap.o |
| 1041 | endif |
| 1042 | |
| 1043 | CFLAGS += -DEAP_SERVER -DEAP_SERVER_IDENTITY |
| 1044 | OBJS += ../src/eap_server/eap_server.o |
| 1045 | OBJS += ../src/eap_server/eap_server_identity.o |
| 1046 | OBJS += ../src/eap_server/eap_server_methods.o |
| 1047 | |
Dmitry Shmidt | 68d0e3e | 2013-10-28 17:59:21 -0700 | [diff] [blame] | 1048 | ifdef CONFIG_IEEE80211AC |
| 1049 | CFLAGS += -DCONFIG_IEEE80211AC |
| 1050 | endif |
Sunil Ravi | a04bd25 | 2022-05-02 22:54:18 -0700 | [diff] [blame] | 1051 | ifdef CONFIG_IEEE80211BE |
| 1052 | CONFIG_IEEE80211AX=y |
| 1053 | CFLAGS += -DCONFIG_IEEE80211BE |
| 1054 | endif |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 1055 | ifdef CONFIG_IEEE80211AX |
| 1056 | CFLAGS += -DCONFIG_IEEE80211AX |
| 1057 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1058 | |
| 1059 | ifdef NEED_AP_MLME |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1060 | OBJS += ../src/ap/wmm.o |
| 1061 | OBJS += ../src/ap/ap_list.o |
Sunil Ravi | 38ad1ed | 2023-01-17 23:58:31 +0000 | [diff] [blame] | 1062 | OBJS += ../src/ap/comeback_token.o |
| 1063 | OBJS += ../src/pasn/pasn_responder.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1064 | OBJS += ../src/ap/ieee802_11.o |
| 1065 | OBJS += ../src/ap/hw_features.o |
Dmitry Shmidt | 051af73 | 2013-10-22 13:52:46 -0700 | [diff] [blame] | 1066 | OBJS += ../src/ap/dfs.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1067 | CFLAGS += -DNEED_AP_MLME |
| 1068 | endif |
| 1069 | ifdef CONFIG_WPS |
| 1070 | CFLAGS += -DEAP_SERVER_WSC |
| 1071 | OBJS += ../src/ap/wps_hostapd.o |
| 1072 | OBJS += ../src/eap_server/eap_server_wsc.o |
| 1073 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1074 | ifdef CONFIG_DPP |
| 1075 | OBJS += ../src/ap/dpp_hostapd.o |
| 1076 | OBJS += ../src/ap/gas_query_ap.o |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 1077 | NEED_AP_GAS_SERV=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1078 | endif |
Sunil Ravi | b0ac25f | 2024-07-12 01:42:03 +0000 | [diff] [blame] | 1079 | ifdef CONFIG_NAN_USD |
| 1080 | OBJS += ../src/ap/nan_usd_ap.o |
| 1081 | endif |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 1082 | ifdef CONFIG_INTERWORKING |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 1083 | NEED_AP_GAS_SERV=y |
| 1084 | endif |
| 1085 | ifdef NEED_AP_GAS_SERV |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 1086 | OBJS += ../src/ap/gas_serv.o |
| 1087 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1088 | ifdef CONFIG_HS20 |
| 1089 | OBJS += ../src/ap/hs20.o |
| 1090 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1091 | endif |
| 1092 | |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 1093 | ifdef CONFIG_MBO |
| 1094 | OBJS += mbo.o |
| 1095 | CFLAGS += -DCONFIG_MBO |
Sunil Ravi | b0ac25f | 2024-07-12 01:42:03 +0000 | [diff] [blame] | 1096 | NEED_GAS=y |
Dmitry Shmidt | 9839ecd | 2016-11-07 11:05:47 -0800 | [diff] [blame] | 1097 | endif |
| 1098 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1099 | ifdef NEED_RSN_AUTHENTICATOR |
| 1100 | CFLAGS += -DCONFIG_NO_RADIUS |
| 1101 | NEED_AES_WRAP=y |
| 1102 | OBJS += ../src/ap/wpa_auth.o |
| 1103 | OBJS += ../src/ap/wpa_auth_ie.o |
| 1104 | OBJS += ../src/ap/pmksa_cache_auth.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1105 | endif |
| 1106 | |
Dmitry Shmidt | 014a3ff | 2015-12-28 13:27:49 -0800 | [diff] [blame] | 1107 | ifdef CONFIG_ACS |
| 1108 | CFLAGS += -DCONFIG_ACS |
| 1109 | OBJS += ../src/ap/acs.o |
| 1110 | LIBS += -lm |
| 1111 | endif |
| 1112 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1113 | ifdef CONFIG_PCSC |
| 1114 | # PC/SC interface for smartcards (USIM, GSM SIM) |
Sunil Ravi | b0ac25f | 2024-07-12 01:42:03 +0000 | [diff] [blame] | 1115 | CFLAGS += -DPCSC_FUNCS |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1116 | OBJS += ../src/utils/pcsc_funcs.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1117 | ifdef CONFIG_NATIVE_WINDOWS |
| 1118 | #Once MinGW gets support for WinScard, -lwinscard could be used instead of the |
| 1119 | #dynamic symbol loading that is now used in pcsc_funcs.c |
| 1120 | #LIBS += -lwinscard |
Sunil Ravi | b0ac25f | 2024-07-12 01:42:03 +0000 | [diff] [blame] | 1121 | CFLAGS += -I/usr/include/PCSC |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1122 | else |
Dmitry Shmidt | 7f2c753 | 2016-08-15 09:48:12 -0700 | [diff] [blame] | 1123 | ifdef CONFIG_OSX |
| 1124 | LIBS += -framework PCSC |
Sunil Ravi | b0ac25f | 2024-07-12 01:42:03 +0000 | [diff] [blame] | 1125 | CFLAGS += -I/usr/include/PCSC |
Dmitry Shmidt | 7f2c753 | 2016-08-15 09:48:12 -0700 | [diff] [blame] | 1126 | else |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 1127 | LIBS += $(shell $(PKG_CONFIG) --libs libpcsclite) |
Sunil Ravi | b0ac25f | 2024-07-12 01:42:03 +0000 | [diff] [blame] | 1128 | CFLAGS += $(shell $(PKG_CONFIG) --cflags libpcsclite) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1129 | endif |
| 1130 | endif |
Dmitry Shmidt | 7f2c753 | 2016-08-15 09:48:12 -0700 | [diff] [blame] | 1131 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1132 | |
| 1133 | ifdef CONFIG_SIM_SIMULATOR |
| 1134 | CFLAGS += -DCONFIG_SIM_SIMULATOR |
| 1135 | NEED_MILENAGE=y |
| 1136 | endif |
| 1137 | |
| 1138 | ifdef CONFIG_USIM_SIMULATOR |
| 1139 | CFLAGS += -DCONFIG_USIM_SIMULATOR |
| 1140 | NEED_MILENAGE=y |
| 1141 | endif |
| 1142 | |
| 1143 | ifdef NEED_MILENAGE |
| 1144 | OBJS += ../src/crypto/milenage.o |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1145 | NEED_AES_ENCBLOCK=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1146 | endif |
| 1147 | |
| 1148 | ifdef CONFIG_PKCS12 |
| 1149 | CFLAGS += -DPKCS12_FUNCS |
| 1150 | endif |
| 1151 | |
| 1152 | ifdef CONFIG_SMARTCARD |
| 1153 | CFLAGS += -DCONFIG_SMARTCARD |
| 1154 | endif |
| 1155 | |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 1156 | ifdef NEED_DRAGONFLY |
| 1157 | OBJS += ../src/common/dragonfly.o |
| 1158 | endif |
| 1159 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1160 | ifdef MS_FUNCS |
| 1161 | OBJS += ../src/crypto/ms_funcs.o |
| 1162 | NEED_DES=y |
| 1163 | NEED_MD4=y |
| 1164 | endif |
| 1165 | |
| 1166 | ifdef CHAP |
| 1167 | OBJS += ../src/eap_common/chap.o |
| 1168 | endif |
| 1169 | |
| 1170 | ifdef TLS_FUNCS |
| 1171 | NEED_DES=y |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 1172 | # Shared TLS functions (needed for EAP_TLS, EAP_PEAP, EAP_TTLS, EAP_FAST, and |
| 1173 | # EAP_TEAP) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1174 | OBJS += ../src/eap_peer/eap_tls_common.o |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1175 | ifndef CONFIG_FIPS |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1176 | NEED_TLS_PRF=y |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 1177 | NEED_SHA1=y |
| 1178 | NEED_MD5=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1179 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1180 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1181 | |
| 1182 | ifndef CONFIG_TLS |
| 1183 | CONFIG_TLS=openssl |
| 1184 | endif |
| 1185 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1186 | ifdef CONFIG_TLSV11 |
| 1187 | CFLAGS += -DCONFIG_TLSV11 |
| 1188 | endif |
| 1189 | |
| 1190 | ifdef CONFIG_TLSV12 |
| 1191 | CFLAGS += -DCONFIG_TLSV12 |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1192 | endif |
| 1193 | |
Sunil Ravi | 99c035e | 2024-07-12 01:42:03 +0000 | [diff] [blame] | 1194 | ifdef CONFIG_RADIUS_TLS |
| 1195 | TLS_FUNCS=y |
| 1196 | endif |
| 1197 | |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1198 | ifeq ($(CONFIG_TLS), wolfssl) |
Sunil Ravi | 876a49b | 2025-02-03 19:18:32 +0000 | [diff] [blame] | 1199 | CFLAGS += -DCRYPTO_RSA_OAEP_SHA256 |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1200 | ifdef TLS_FUNCS |
Hai Shalom | 4fbc08f | 2020-05-18 12:37:00 -0700 | [diff] [blame] | 1201 | CFLAGS += -DWOLFSSL_DER_LOAD |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1202 | OBJS += ../src/crypto/tls_wolfssl.o |
| 1203 | endif |
| 1204 | OBJS += ../src/crypto/crypto_wolfssl.o |
| 1205 | OBJS_p += ../src/crypto/crypto_wolfssl.o |
| 1206 | ifdef NEED_FIPS186_2_PRF |
| 1207 | OBJS += ../src/crypto/fips_prf_wolfssl.o |
| 1208 | endif |
| 1209 | NEED_TLS_PRF_SHA256=y |
| 1210 | LIBS += -lwolfssl -lm |
| 1211 | LIBS_p += -lwolfssl -lm |
| 1212 | endif |
| 1213 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1214 | ifeq ($(CONFIG_TLS), openssl) |
Sunil Ravi | a04bd25 | 2022-05-02 22:54:18 -0700 | [diff] [blame] | 1215 | CFLAGS += -DCRYPTO_RSA_OAEP_SHA256 |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1216 | ifdef TLS_FUNCS |
| 1217 | CFLAGS += -DEAP_TLS_OPENSSL |
| 1218 | OBJS += ../src/crypto/tls_openssl.o |
Dmitry Shmidt | d7ff03d | 2015-12-04 14:49:35 -0800 | [diff] [blame] | 1219 | OBJS += ../src/crypto/tls_openssl_ocsp.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1220 | LIBS += -lssl |
| 1221 | endif |
| 1222 | OBJS += ../src/crypto/crypto_openssl.o |
| 1223 | OBJS_p += ../src/crypto/crypto_openssl.o |
Dmitry Shmidt | 1d755d0 | 2015-04-28 10:34:29 -0700 | [diff] [blame] | 1224 | OBJS_priv += ../src/crypto/crypto_openssl.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1225 | ifdef NEED_FIPS186_2_PRF |
| 1226 | OBJS += ../src/crypto/fips_prf_openssl.o |
| 1227 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1228 | NEED_TLS_PRF_SHA256=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1229 | LIBS += -lcrypto |
| 1230 | LIBS_p += -lcrypto |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1231 | ifdef CONFIG_TLS_ADD_DL |
| 1232 | LIBS += -ldl |
| 1233 | LIBS_p += -ldl |
| 1234 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1235 | ifndef CONFIG_TLS_DEFAULT_CIPHERS |
| 1236 | CONFIG_TLS_DEFAULT_CIPHERS = "DEFAULT:!EXP:!LOW" |
| 1237 | endif |
| 1238 | CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONFIG_TLS_DEFAULT_CIPHERS)\" |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1239 | endif |
| 1240 | |
| 1241 | ifeq ($(CONFIG_TLS), gnutls) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1242 | ifndef CONFIG_CRYPTO |
| 1243 | # default to libgcrypt |
| 1244 | CONFIG_CRYPTO=gnutls |
| 1245 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1246 | ifdef TLS_FUNCS |
| 1247 | OBJS += ../src/crypto/tls_gnutls.o |
| 1248 | LIBS += -lgnutls -lgpg-error |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1249 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1250 | OBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o |
| 1251 | OBJS_p += ../src/crypto/crypto_$(CONFIG_CRYPTO).o |
| 1252 | OBJS_priv += ../src/crypto/crypto_$(CONFIG_CRYPTO).o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1253 | ifdef NEED_FIPS186_2_PRF |
Dmitry Shmidt | 9866086 | 2014-03-11 17:26:21 -0700 | [diff] [blame] | 1254 | OBJS += ../src/crypto/fips_prf_internal.o |
| 1255 | SHA1OBJS += ../src/crypto/sha1-internal.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1256 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1257 | ifeq ($(CONFIG_CRYPTO), gnutls) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1258 | LIBS += -lgcrypt |
| 1259 | LIBS_p += -lgcrypt |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1260 | CONFIG_INTERNAL_RC4=y |
| 1261 | CONFIG_INTERNAL_DH_GROUP5=y |
| 1262 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1263 | ifeq ($(CONFIG_CRYPTO), nettle) |
| 1264 | LIBS += -lnettle -lgmp |
| 1265 | LIBS_p += -lnettle -lgmp |
| 1266 | CONFIG_INTERNAL_RC4=y |
| 1267 | CONFIG_INTERNAL_DH_GROUP5=y |
| 1268 | endif |
| 1269 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1270 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1271 | ifeq ($(CONFIG_TLS), internal) |
| 1272 | ifndef CONFIG_CRYPTO |
| 1273 | CONFIG_CRYPTO=internal |
| 1274 | endif |
| 1275 | ifdef TLS_FUNCS |
| 1276 | OBJS += ../src/crypto/crypto_internal-rsa.o |
| 1277 | OBJS += ../src/crypto/tls_internal.o |
| 1278 | OBJS += ../src/tls/tlsv1_common.o |
| 1279 | OBJS += ../src/tls/tlsv1_record.o |
| 1280 | OBJS += ../src/tls/tlsv1_cred.o |
| 1281 | OBJS += ../src/tls/tlsv1_client.o |
| 1282 | OBJS += ../src/tls/tlsv1_client_write.o |
| 1283 | OBJS += ../src/tls/tlsv1_client_read.o |
Dmitry Shmidt | 55840ad | 2015-12-14 12:45:46 -0800 | [diff] [blame] | 1284 | OBJS += ../src/tls/tlsv1_client_ocsp.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1285 | OBJS += ../src/tls/rsa.o |
| 1286 | OBJS += ../src/tls/x509v3.o |
| 1287 | OBJS += ../src/tls/pkcs1.o |
| 1288 | OBJS += ../src/tls/pkcs5.o |
| 1289 | OBJS += ../src/tls/pkcs8.o |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 1290 | NEED_ASN1=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1291 | NEED_BASE64=y |
| 1292 | NEED_TLS_PRF=y |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1293 | ifdef CONFIG_TLSV12 |
| 1294 | NEED_TLS_PRF_SHA256=y |
| 1295 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1296 | NEED_MODEXP=y |
| 1297 | NEED_CIPHER=y |
| 1298 | CFLAGS += -DCONFIG_TLS_INTERNAL_CLIENT |
| 1299 | endif |
| 1300 | ifdef NEED_CIPHER |
| 1301 | NEED_DES=y |
| 1302 | OBJS += ../src/crypto/crypto_internal-cipher.o |
| 1303 | endif |
| 1304 | ifdef NEED_MODEXP |
| 1305 | OBJS += ../src/crypto/crypto_internal-modexp.o |
| 1306 | OBJS += ../src/tls/bignum.o |
| 1307 | endif |
| 1308 | ifeq ($(CONFIG_CRYPTO), libtomcrypt) |
| 1309 | OBJS += ../src/crypto/crypto_libtomcrypt.o |
| 1310 | OBJS_p += ../src/crypto/crypto_libtomcrypt.o |
| 1311 | LIBS += -ltomcrypt -ltfm |
| 1312 | LIBS_p += -ltomcrypt -ltfm |
| 1313 | CONFIG_INTERNAL_SHA256=y |
| 1314 | CONFIG_INTERNAL_RC4=y |
| 1315 | CONFIG_INTERNAL_DH_GROUP5=y |
| 1316 | endif |
| 1317 | ifeq ($(CONFIG_CRYPTO), internal) |
| 1318 | OBJS += ../src/crypto/crypto_internal.o |
| 1319 | OBJS_p += ../src/crypto/crypto_internal.o |
| 1320 | NEED_AES_ENC=y |
| 1321 | CFLAGS += -DCONFIG_CRYPTO_INTERNAL |
| 1322 | ifdef CONFIG_INTERNAL_LIBTOMMATH |
| 1323 | CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH |
| 1324 | ifdef CONFIG_INTERNAL_LIBTOMMATH_FAST |
| 1325 | CFLAGS += -DLTM_FAST |
| 1326 | endif |
| 1327 | else |
| 1328 | LIBS += -ltommath |
| 1329 | LIBS_p += -ltommath |
| 1330 | endif |
| 1331 | CONFIG_INTERNAL_AES=y |
| 1332 | CONFIG_INTERNAL_DES=y |
| 1333 | CONFIG_INTERNAL_SHA1=y |
| 1334 | CONFIG_INTERNAL_MD4=y |
| 1335 | CONFIG_INTERNAL_MD5=y |
| 1336 | CONFIG_INTERNAL_SHA256=y |
Dmitry Shmidt | d7ff03d | 2015-12-04 14:49:35 -0800 | [diff] [blame] | 1337 | CONFIG_INTERNAL_SHA384=y |
| 1338 | CONFIG_INTERNAL_SHA512=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1339 | CONFIG_INTERNAL_RC4=y |
| 1340 | CONFIG_INTERNAL_DH_GROUP5=y |
| 1341 | endif |
| 1342 | ifeq ($(CONFIG_CRYPTO), cryptoapi) |
| 1343 | OBJS += ../src/crypto/crypto_cryptoapi.o |
| 1344 | OBJS_p += ../src/crypto/crypto_cryptoapi.o |
| 1345 | CFLAGS += -DCONFIG_CRYPTO_CRYPTOAPI |
| 1346 | CONFIG_INTERNAL_SHA256=y |
| 1347 | CONFIG_INTERNAL_RC4=y |
| 1348 | endif |
| 1349 | endif |
| 1350 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1351 | ifeq ($(CONFIG_TLS), linux) |
| 1352 | OBJS += ../src/crypto/crypto_linux.o |
| 1353 | OBJS_p += ../src/crypto/crypto_linux.o |
| 1354 | ifdef TLS_FUNCS |
| 1355 | OBJS += ../src/crypto/crypto_internal-rsa.o |
| 1356 | OBJS += ../src/crypto/tls_internal.o |
| 1357 | OBJS += ../src/tls/tlsv1_common.o |
| 1358 | OBJS += ../src/tls/tlsv1_record.o |
| 1359 | OBJS += ../src/tls/tlsv1_cred.o |
| 1360 | OBJS += ../src/tls/tlsv1_client.o |
| 1361 | OBJS += ../src/tls/tlsv1_client_write.o |
| 1362 | OBJS += ../src/tls/tlsv1_client_read.o |
| 1363 | OBJS += ../src/tls/tlsv1_client_ocsp.o |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1364 | OBJS += ../src/tls/rsa.o |
| 1365 | OBJS += ../src/tls/x509v3.o |
| 1366 | OBJS += ../src/tls/pkcs1.o |
| 1367 | OBJS += ../src/tls/pkcs5.o |
| 1368 | OBJS += ../src/tls/pkcs8.o |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 1369 | NEED_ASN1=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1370 | NEED_BASE64=y |
| 1371 | NEED_TLS_PRF=y |
| 1372 | ifdef CONFIG_TLSV12 |
| 1373 | NEED_TLS_PRF_SHA256=y |
| 1374 | endif |
| 1375 | NEED_MODEXP=y |
| 1376 | NEED_CIPHER=y |
| 1377 | CFLAGS += -DCONFIG_TLS_INTERNAL_CLIENT |
| 1378 | endif |
| 1379 | ifdef NEED_MODEXP |
| 1380 | OBJS += ../src/crypto/crypto_internal-modexp.o |
| 1381 | OBJS += ../src/tls/bignum.o |
| 1382 | CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH |
| 1383 | CFLAGS += -DLTM_FAST |
| 1384 | endif |
| 1385 | CONFIG_INTERNAL_DH_GROUP5=y |
| 1386 | ifdef NEED_FIPS186_2_PRF |
| 1387 | OBJS += ../src/crypto/fips_prf_internal.o |
| 1388 | OBJS += ../src/crypto/sha1-internal.o |
| 1389 | endif |
| 1390 | endif |
| 1391 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1392 | ifeq ($(CONFIG_TLS), none) |
| 1393 | ifdef TLS_FUNCS |
| 1394 | OBJS += ../src/crypto/tls_none.o |
| 1395 | CFLAGS += -DEAP_TLS_NONE |
| 1396 | CONFIG_INTERNAL_AES=y |
| 1397 | CONFIG_INTERNAL_SHA1=y |
| 1398 | CONFIG_INTERNAL_MD5=y |
| 1399 | endif |
| 1400 | OBJS += ../src/crypto/crypto_none.o |
| 1401 | OBJS_p += ../src/crypto/crypto_none.o |
| 1402 | CONFIG_INTERNAL_SHA256=y |
| 1403 | CONFIG_INTERNAL_RC4=y |
| 1404 | endif |
| 1405 | |
| 1406 | ifdef TLS_FUNCS |
| 1407 | ifdef CONFIG_SMARTCARD |
| 1408 | ifndef CONFIG_NATIVE_WINDOWS |
| 1409 | ifneq ($(CONFIG_L2_PACKET), freebsd) |
| 1410 | LIBS += -ldl |
| 1411 | endif |
| 1412 | endif |
| 1413 | endif |
| 1414 | endif |
| 1415 | |
| 1416 | ifndef TLS_FUNCS |
| 1417 | OBJS += ../src/crypto/tls_none.o |
| 1418 | ifeq ($(CONFIG_TLS), internal) |
| 1419 | CONFIG_INTERNAL_AES=y |
| 1420 | CONFIG_INTERNAL_SHA1=y |
| 1421 | CONFIG_INTERNAL_MD5=y |
| 1422 | CONFIG_INTERNAL_RC4=y |
| 1423 | endif |
| 1424 | endif |
| 1425 | |
| 1426 | AESOBJS = # none so far (see below) |
| 1427 | ifdef CONFIG_INTERNAL_AES |
| 1428 | AESOBJS += ../src/crypto/aes-internal.o ../src/crypto/aes-internal-dec.o |
| 1429 | endif |
| 1430 | |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 1431 | ifneq ($(CONFIG_TLS), openssl) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1432 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1433 | NEED_INTERNAL_AES_WRAP=y |
| 1434 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1435 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1436 | ifdef CONFIG_OPENSSL_INTERNAL_AES_WRAP |
| 1437 | # Seems to be needed at least with BoringSSL |
| 1438 | NEED_INTERNAL_AES_WRAP=y |
| 1439 | CFLAGS += -DCONFIG_OPENSSL_INTERNAL_AES_WRAP |
| 1440 | endif |
| 1441 | ifdef CONFIG_FIPS |
| 1442 | # Have to use internal AES key wrap routines to use OpenSSL EVP since the |
| 1443 | # OpenSSL AES_wrap_key()/AES_unwrap_key() API is not available in FIPS mode. |
| 1444 | NEED_INTERNAL_AES_WRAP=y |
| 1445 | endif |
| 1446 | |
| 1447 | ifdef NEED_INTERNAL_AES_WRAP |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1448 | ifneq ($(CONFIG_TLS), linux) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1449 | AESOBJS += ../src/crypto/aes-unwrap.o |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 1450 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1451 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1452 | ifdef NEED_AES_EAX |
| 1453 | AESOBJS += ../src/crypto/aes-eax.o |
| 1454 | NEED_AES_CTR=y |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1455 | endif |
| 1456 | ifdef NEED_AES_SIV |
| 1457 | AESOBJS += ../src/crypto/aes-siv.o |
| 1458 | NEED_AES_CTR=y |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1459 | endif |
| 1460 | ifdef NEED_AES_CTR |
| 1461 | AESOBJS += ../src/crypto/aes-ctr.o |
| 1462 | endif |
| 1463 | ifdef NEED_AES_ENCBLOCK |
| 1464 | AESOBJS += ../src/crypto/aes-encblock.o |
| 1465 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1466 | NEED_AES_ENC=y |
Sunil Ravi | a04bd25 | 2022-05-02 22:54:18 -0700 | [diff] [blame] | 1467 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1468 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1469 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1470 | AESOBJS += ../src/crypto/aes-omac1.o |
| 1471 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1472 | endif |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 1473 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1474 | ifdef NEED_AES_WRAP |
| 1475 | NEED_AES_ENC=y |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1476 | ifdef NEED_INTERNAL_AES_WRAP |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1477 | AESOBJS += ../src/crypto/aes-wrap.o |
| 1478 | endif |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 1479 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1480 | ifdef NEED_AES_CBC |
| 1481 | NEED_AES_ENC=y |
Dmitry Shmidt | 912c6ec | 2015-03-30 13:16:51 -0700 | [diff] [blame] | 1482 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1483 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1484 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1485 | AESOBJS += ../src/crypto/aes-cbc.o |
| 1486 | endif |
Dmitry Shmidt | 912c6ec | 2015-03-30 13:16:51 -0700 | [diff] [blame] | 1487 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1488 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1489 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1490 | ifdef NEED_AES_ENC |
| 1491 | ifdef CONFIG_INTERNAL_AES |
| 1492 | AESOBJS += ../src/crypto/aes-internal-enc.o |
| 1493 | endif |
| 1494 | endif |
| 1495 | ifdef NEED_AES |
| 1496 | OBJS += $(AESOBJS) |
| 1497 | endif |
| 1498 | |
| 1499 | ifdef NEED_SHA1 |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1500 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1501 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1502 | ifneq ($(CONFIG_TLS), gnutls) |
| 1503 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1504 | SHA1OBJS += ../src/crypto/sha1.o |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1505 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1506 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1507 | endif |
| 1508 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1509 | SHA1OBJS += ../src/crypto/sha1-prf.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1510 | ifdef CONFIG_INTERNAL_SHA1 |
| 1511 | SHA1OBJS += ../src/crypto/sha1-internal.o |
| 1512 | ifdef NEED_FIPS186_2_PRF |
| 1513 | SHA1OBJS += ../src/crypto/fips_prf_internal.o |
| 1514 | endif |
| 1515 | endif |
Jouni Malinen | 75ecf52 | 2011-06-27 15:19:46 -0700 | [diff] [blame] | 1516 | ifdef CONFIG_NO_WPA_PASSPHRASE |
| 1517 | CFLAGS += -DCONFIG_NO_PBKDF2 |
| 1518 | else |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1519 | ifneq ($(CONFIG_TLS), openssl) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1520 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1521 | SHA1OBJS += ../src/crypto/sha1-pbkdf2.o |
| 1522 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1523 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1524 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1525 | ifdef NEED_T_PRF |
| 1526 | SHA1OBJS += ../src/crypto/sha1-tprf.o |
| 1527 | endif |
| 1528 | ifdef NEED_TLS_PRF |
| 1529 | SHA1OBJS += ../src/crypto/sha1-tlsprf.o |
| 1530 | endif |
| 1531 | endif |
| 1532 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1533 | ifndef CONFIG_FIPS |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 1534 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1535 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1536 | ifneq ($(CONFIG_TLS), gnutls) |
| 1537 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1538 | MD5OBJS += ../src/crypto/md5.o |
| 1539 | endif |
Dmitry Shmidt | 216983b | 2015-02-06 10:50:36 -0800 | [diff] [blame] | 1540 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1541 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1542 | endif |
| 1543 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1544 | ifdef NEED_MD5 |
| 1545 | ifdef CONFIG_INTERNAL_MD5 |
| 1546 | MD5OBJS += ../src/crypto/md5-internal.o |
| 1547 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1548 | OBJS += $(MD5OBJS) |
| 1549 | OBJS_p += $(MD5OBJS) |
Dmitry Shmidt | 1d755d0 | 2015-04-28 10:34:29 -0700 | [diff] [blame] | 1550 | OBJS_priv += $(MD5OBJS) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1551 | endif |
| 1552 | |
| 1553 | ifdef NEED_MD4 |
| 1554 | ifdef CONFIG_INTERNAL_MD4 |
| 1555 | OBJS += ../src/crypto/md4-internal.o |
| 1556 | endif |
| 1557 | endif |
| 1558 | |
| 1559 | DESOBJS = # none needed when not internal |
| 1560 | ifdef NEED_DES |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1561 | ifndef CONFIG_FIPS |
| 1562 | CFLAGS += -DCONFIG_DES |
| 1563 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1564 | ifdef CONFIG_INTERNAL_DES |
| 1565 | DESOBJS += ../src/crypto/des-internal.o |
| 1566 | endif |
| 1567 | endif |
| 1568 | |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1569 | ifdef CONFIG_NO_RC4 |
| 1570 | CFLAGS += -DCONFIG_NO_RC4 |
| 1571 | endif |
| 1572 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1573 | ifdef NEED_RC4 |
| 1574 | ifdef CONFIG_INTERNAL_RC4 |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1575 | ifndef CONFIG_NO_RC4 |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1576 | OBJS += ../src/crypto/rc4.o |
| 1577 | endif |
| 1578 | endif |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1579 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1580 | |
Sunil Ravi | a04bd25 | 2022-05-02 22:54:18 -0700 | [diff] [blame] | 1581 | ifdef CONFIG_SAE |
| 1582 | ifdef NEED_SHA384 |
| 1583 | # Need to add HMAC-SHA384 KDF as well, if SHA384 was enabled. |
| 1584 | NEED_HMAC_SHA384_KDF=y |
| 1585 | endif |
| 1586 | ifdef NEED_SHA512 |
| 1587 | # Need to add HMAC-SHA512 KDF as well, if SHA512 was enabled. |
| 1588 | NEED_HMAC_SHA512_KDF=y |
| 1589 | endif |
| 1590 | endif |
| 1591 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1592 | SHA256OBJS = # none by default |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1593 | CFLAGS += -DCONFIG_SHA256 |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1594 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1595 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1596 | ifneq ($(CONFIG_TLS), gnutls) |
| 1597 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1598 | SHA256OBJS += ../src/crypto/sha256.o |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1599 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1600 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1601 | endif |
| 1602 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1603 | SHA256OBJS += ../src/crypto/sha256-prf.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1604 | ifdef CONFIG_INTERNAL_SHA256 |
| 1605 | SHA256OBJS += ../src/crypto/sha256-internal.o |
| 1606 | endif |
Dmitry Shmidt | d7ff03d | 2015-12-04 14:49:35 -0800 | [diff] [blame] | 1607 | ifdef CONFIG_INTERNAL_SHA384 |
| 1608 | CFLAGS += -DCONFIG_INTERNAL_SHA384 |
| 1609 | SHA256OBJS += ../src/crypto/sha384-internal.o |
| 1610 | endif |
| 1611 | ifdef CONFIG_INTERNAL_SHA512 |
| 1612 | CFLAGS += -DCONFIG_INTERNAL_SHA512 |
| 1613 | SHA256OBJS += ../src/crypto/sha512-internal.o |
| 1614 | endif |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1615 | ifdef NEED_TLS_PRF_SHA256 |
| 1616 | SHA256OBJS += ../src/crypto/sha256-tlsprf.o |
| 1617 | endif |
Hai Shalom | c356592 | 2019-10-28 11:58:20 -0700 | [diff] [blame] | 1618 | ifdef NEED_TLS_PRF_SHA384 |
| 1619 | SHA256OBJS += ../src/crypto/sha384-tlsprf.o |
| 1620 | endif |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 1621 | ifdef NEED_HMAC_SHA256_KDF |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1622 | CFLAGS += -DCONFIG_HMAC_SHA256_KDF |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 1623 | OBJS += ../src/crypto/sha256-kdf.o |
| 1624 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1625 | ifdef NEED_HMAC_SHA384_KDF |
| 1626 | CFLAGS += -DCONFIG_HMAC_SHA384_KDF |
| 1627 | OBJS += ../src/crypto/sha384-kdf.o |
| 1628 | endif |
| 1629 | ifdef NEED_HMAC_SHA512_KDF |
| 1630 | CFLAGS += -DCONFIG_HMAC_SHA512_KDF |
| 1631 | OBJS += ../src/crypto/sha512-kdf.o |
| 1632 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1633 | OBJS += $(SHA256OBJS) |
Dmitry Shmidt | 807291d | 2015-01-27 13:40:23 -0800 | [diff] [blame] | 1634 | ifdef NEED_SHA384 |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 1635 | ifneq ($(CONFIG_TLS), openssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1636 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1637 | ifneq ($(CONFIG_TLS), gnutls) |
| 1638 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | ebd93af | 2017-02-21 13:40:44 -0800 | [diff] [blame] | 1639 | OBJS += ../src/crypto/sha384.o |
| 1640 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1641 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1642 | endif |
| 1643 | endif |
Dmitry Shmidt | 807291d | 2015-01-27 13:40:23 -0800 | [diff] [blame] | 1644 | CFLAGS += -DCONFIG_SHA384 |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1645 | OBJS += ../src/crypto/sha384-prf.o |
Dmitry Shmidt | 807291d | 2015-01-27 13:40:23 -0800 | [diff] [blame] | 1646 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1647 | ifdef NEED_SHA512 |
| 1648 | ifneq ($(CONFIG_TLS), openssl) |
| 1649 | ifneq ($(CONFIG_TLS), linux) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1650 | ifneq ($(CONFIG_TLS), gnutls) |
| 1651 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1652 | OBJS += ../src/crypto/sha512.o |
| 1653 | endif |
| 1654 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1655 | endif |
| 1656 | endif |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1657 | CFLAGS += -DCONFIG_SHA512 |
| 1658 | OBJS += ../src/crypto/sha512-prf.o |
| 1659 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1660 | |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 1661 | ifdef NEED_ASN1 |
| 1662 | OBJS += ../src/tls/asn1.o |
| 1663 | endif |
| 1664 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1665 | ifdef NEED_DH_GROUPS |
| 1666 | OBJS += ../src/crypto/dh_groups.o |
| 1667 | endif |
| 1668 | ifdef NEED_DH_GROUPS_ALL |
| 1669 | CFLAGS += -DALL_DH_GROUPS |
| 1670 | endif |
| 1671 | ifdef CONFIG_INTERNAL_DH_GROUP5 |
| 1672 | ifdef NEED_DH_GROUPS |
| 1673 | OBJS += ../src/crypto/dh_group5.o |
| 1674 | endif |
| 1675 | endif |
| 1676 | |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 1677 | ifdef NEED_ECC |
| 1678 | CFLAGS += -DCONFIG_ECC |
| 1679 | endif |
| 1680 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1681 | ifdef CONFIG_NO_RANDOM_POOL |
| 1682 | CFLAGS += -DCONFIG_NO_RANDOM_POOL |
| 1683 | else |
Hai Shalom | 74f70d4 | 2019-02-11 14:42:39 -0800 | [diff] [blame] | 1684 | ifdef CONFIG_GETRANDOM |
| 1685 | CFLAGS += -DCONFIG_GETRANDOM |
| 1686 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1687 | OBJS += ../src/crypto/random.o |
| 1688 | endif |
| 1689 | |
| 1690 | ifdef CONFIG_CTRL_IFACE |
| 1691 | ifeq ($(CONFIG_CTRL_IFACE), y) |
| 1692 | ifdef CONFIG_NATIVE_WINDOWS |
| 1693 | CONFIG_CTRL_IFACE=named_pipe |
| 1694 | else |
| 1695 | CONFIG_CTRL_IFACE=unix |
| 1696 | endif |
| 1697 | endif |
| 1698 | CFLAGS += -DCONFIG_CTRL_IFACE |
| 1699 | ifeq ($(CONFIG_CTRL_IFACE), unix) |
| 1700 | CFLAGS += -DCONFIG_CTRL_IFACE_UNIX |
Dmitry Shmidt | 31a29cc | 2016-03-09 15:58:17 -0800 | [diff] [blame] | 1701 | OBJS += ../src/common/ctrl_iface_common.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1702 | endif |
| 1703 | ifeq ($(CONFIG_CTRL_IFACE), udp) |
| 1704 | CFLAGS += -DCONFIG_CTRL_IFACE_UDP |
| 1705 | endif |
Dmitry Shmidt | f21452a | 2014-02-26 10:55:25 -0800 | [diff] [blame] | 1706 | ifeq ($(CONFIG_CTRL_IFACE), udp6) |
| 1707 | CONFIG_CTRL_IFACE=udp |
| 1708 | CFLAGS += -DCONFIG_CTRL_IFACE_UDP |
| 1709 | CFLAGS += -DCONFIG_CTRL_IFACE_UDP_IPV6 |
| 1710 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1711 | ifeq ($(CONFIG_CTRL_IFACE), named_pipe) |
| 1712 | CFLAGS += -DCONFIG_CTRL_IFACE_NAMED_PIPE |
| 1713 | endif |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1714 | ifeq ($(CONFIG_CTRL_IFACE), udp-remote) |
| 1715 | CONFIG_CTRL_IFACE=udp |
| 1716 | CFLAGS += -DCONFIG_CTRL_IFACE_UDP |
| 1717 | CFLAGS += -DCONFIG_CTRL_IFACE_UDP_REMOTE |
| 1718 | endif |
Dmitry Shmidt | f21452a | 2014-02-26 10:55:25 -0800 | [diff] [blame] | 1719 | ifeq ($(CONFIG_CTRL_IFACE), udp6-remote) |
| 1720 | CONFIG_CTRL_IFACE=udp |
| 1721 | CFLAGS += -DCONFIG_CTRL_IFACE_UDP |
| 1722 | CFLAGS += -DCONFIG_CTRL_IFACE_UDP_REMOTE |
| 1723 | CFLAGS += -DCONFIG_CTRL_IFACE_UDP_IPV6 |
| 1724 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1725 | OBJS += ctrl_iface.o ctrl_iface_$(CONFIG_CTRL_IFACE).o |
| 1726 | endif |
| 1727 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1728 | ifdef CONFIG_CTRL_IFACE_DBUS_NEW |
Hai Shalom | 021b0b5 | 2019-04-10 11:17:58 -0700 | [diff] [blame] | 1729 | CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_NEW |
| 1730 | OBJS += dbus/dbus_dict_helpers.o |
| 1731 | OBJS += dbus/dbus_new_helpers.o |
| 1732 | OBJS += dbus/dbus_new.o dbus/dbus_new_handlers.o |
| 1733 | OBJS += dbus/dbus_common.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1734 | ifdef CONFIG_WPS |
Hai Shalom | 021b0b5 | 2019-04-10 11:17:58 -0700 | [diff] [blame] | 1735 | OBJS += dbus/dbus_new_handlers_wps.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1736 | endif |
Jouni Malinen | 75ecf52 | 2011-06-27 15:19:46 -0700 | [diff] [blame] | 1737 | ifdef CONFIG_P2P |
Hai Shalom | 021b0b5 | 2019-04-10 11:17:58 -0700 | [diff] [blame] | 1738 | OBJS += dbus/dbus_new_handlers_p2p.o |
Jouni Malinen | 75ecf52 | 2011-06-27 15:19:46 -0700 | [diff] [blame] | 1739 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1740 | ifndef DBUS_LIBS |
Dmitry Shmidt | c55524a | 2011-07-07 11:18:38 -0700 | [diff] [blame] | 1741 | DBUS_LIBS := $(shell $(PKG_CONFIG) --libs dbus-1) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1742 | endif |
| 1743 | ifndef DBUS_INCLUDE |
Dmitry Shmidt | c55524a | 2011-07-07 11:18:38 -0700 | [diff] [blame] | 1744 | DBUS_INCLUDE := $(shell $(PKG_CONFIG) --cflags dbus-1) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1745 | endif |
| 1746 | ifdef CONFIG_CTRL_IFACE_DBUS_INTRO |
Hai Shalom | 021b0b5 | 2019-04-10 11:17:58 -0700 | [diff] [blame] | 1747 | OBJS += dbus/dbus_new_introspect.o |
| 1748 | CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_INTRO |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1749 | endif |
Hai Shalom | 021b0b5 | 2019-04-10 11:17:58 -0700 | [diff] [blame] | 1750 | CFLAGS += $(DBUS_INCLUDE) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1751 | LIBS += $(DBUS_LIBS) |
Hai Shalom | 021b0b5 | 2019-04-10 11:17:58 -0700 | [diff] [blame] | 1752 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1753 | |
| 1754 | ifdef CONFIG_READLINE |
| 1755 | OBJS_c += ../src/utils/edit_readline.o |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1756 | LIBS_c += -lreadline -lncurses |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1757 | else |
| 1758 | ifdef CONFIG_WPA_CLI_EDIT |
| 1759 | OBJS_c += ../src/utils/edit.o |
| 1760 | else |
| 1761 | OBJS_c += ../src/utils/edit_simple.o |
| 1762 | endif |
| 1763 | endif |
| 1764 | |
| 1765 | ifdef CONFIG_NATIVE_WINDOWS |
| 1766 | CFLAGS += -DCONFIG_NATIVE_WINDOWS |
| 1767 | LIBS += -lws2_32 -lgdi32 -lcrypt32 |
| 1768 | LIBS_c += -lws2_32 |
| 1769 | LIBS_p += -lws2_32 -lgdi32 |
| 1770 | ifeq ($(CONFIG_CRYPTO), cryptoapi) |
| 1771 | LIBS_p += -lcrypt32 |
| 1772 | endif |
| 1773 | endif |
| 1774 | |
| 1775 | ifdef CONFIG_NO_STDOUT_DEBUG |
| 1776 | CFLAGS += -DCONFIG_NO_STDOUT_DEBUG |
| 1777 | ifndef CONFIG_CTRL_IFACE |
| 1778 | CFLAGS += -DCONFIG_NO_WPA_MSG |
| 1779 | endif |
| 1780 | endif |
| 1781 | |
| 1782 | ifdef CONFIG_IPV6 |
| 1783 | # for eapol_test only |
| 1784 | CFLAGS += -DCONFIG_IPV6 |
| 1785 | endif |
| 1786 | |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1787 | ifdef CONFIG_NO_LINUX_PACKET_SOCKET_WAR |
| 1788 | CFLAGS += -DCONFIG_NO_LINUX_PACKET_SOCKET_WAR |
| 1789 | endif |
| 1790 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1791 | ifdef NEED_BASE64 |
| 1792 | OBJS += ../src/utils/base64.o |
| 1793 | endif |
| 1794 | |
| 1795 | ifdef NEED_SME |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1796 | OBJS += sme.o |
| 1797 | CFLAGS += -DCONFIG_SME |
| 1798 | endif |
| 1799 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1800 | OBJS += ../src/common/ieee802_11_common.o |
Dmitry Shmidt | ff787d5 | 2015-01-12 13:01:47 -0800 | [diff] [blame] | 1801 | OBJS += ../src/common/hw_features_common.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1802 | |
| 1803 | ifdef NEED_EAP_COMMON |
| 1804 | OBJS += ../src/eap_common/eap_common.o |
| 1805 | endif |
| 1806 | |
| 1807 | ifndef CONFIG_MAIN |
| 1808 | CONFIG_MAIN=main |
| 1809 | endif |
| 1810 | |
| 1811 | ifdef CONFIG_DEBUG_SYSLOG |
| 1812 | CFLAGS += -DCONFIG_DEBUG_SYSLOG |
| 1813 | ifdef CONFIG_DEBUG_SYSLOG_FACILITY |
| 1814 | CFLAGS += -DLOG_HOSTAPD="$(CONFIG_DEBUG_SYSLOG_FACILITY)" |
| 1815 | endif |
| 1816 | endif |
| 1817 | |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 1818 | ifdef CONFIG_DEBUG_LINUX_TRACING |
| 1819 | CFLAGS += -DCONFIG_DEBUG_LINUX_TRACING |
| 1820 | endif |
| 1821 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1822 | ifdef CONFIG_DEBUG_FILE |
| 1823 | CFLAGS += -DCONFIG_DEBUG_FILE |
| 1824 | endif |
| 1825 | |
| 1826 | ifdef CONFIG_DELAYED_MIC_ERROR_REPORT |
| 1827 | CFLAGS += -DCONFIG_DELAYED_MIC_ERROR_REPORT |
| 1828 | endif |
| 1829 | |
| 1830 | ifdef CONFIG_FIPS |
| 1831 | CFLAGS += -DCONFIG_FIPS |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1832 | ifneq ($(CONFIG_TLS), openssl) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1833 | ifneq ($(CONFIG_TLS), wolfssl) |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1834 | $(error CONFIG_FIPS=y requires CONFIG_TLS=openssl) |
| 1835 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1836 | endif |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 1837 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1838 | |
| 1839 | OBJS += $(SHA1OBJS) $(DESOBJS) |
| 1840 | |
| 1841 | OBJS_p += $(SHA1OBJS) |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1842 | OBJS_p += $(SHA256OBJS) |
Dmitry Shmidt | 1d755d0 | 2015-04-28 10:34:29 -0700 | [diff] [blame] | 1843 | OBJS_priv += $(SHA1OBJS) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1844 | |
| 1845 | ifdef CONFIG_BGSCAN_SIMPLE |
| 1846 | CFLAGS += -DCONFIG_BGSCAN_SIMPLE |
| 1847 | OBJS += bgscan_simple.o |
| 1848 | NEED_BGSCAN=y |
| 1849 | endif |
| 1850 | |
| 1851 | ifdef CONFIG_BGSCAN_LEARN |
| 1852 | CFLAGS += -DCONFIG_BGSCAN_LEARN |
| 1853 | OBJS += bgscan_learn.o |
| 1854 | NEED_BGSCAN=y |
| 1855 | endif |
| 1856 | |
| 1857 | ifdef NEED_BGSCAN |
| 1858 | CFLAGS += -DCONFIG_BGSCAN |
| 1859 | OBJS += bgscan.o |
| 1860 | endif |
| 1861 | |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 1862 | ifdef CONFIG_AUTOSCAN_EXPONENTIAL |
| 1863 | CFLAGS += -DCONFIG_AUTOSCAN_EXPONENTIAL |
| 1864 | OBJS += autoscan_exponential.o |
| 1865 | NEED_AUTOSCAN=y |
| 1866 | endif |
| 1867 | |
| 1868 | ifdef CONFIG_AUTOSCAN_PERIODIC |
| 1869 | CFLAGS += -DCONFIG_AUTOSCAN_PERIODIC |
| 1870 | OBJS += autoscan_periodic.o |
| 1871 | NEED_AUTOSCAN=y |
| 1872 | endif |
| 1873 | |
| 1874 | ifdef NEED_AUTOSCAN |
| 1875 | CFLAGS += -DCONFIG_AUTOSCAN |
| 1876 | OBJS += autoscan.o |
| 1877 | endif |
| 1878 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1879 | ifdef CONFIG_EXT_PASSWORD_TEST |
| 1880 | OBJS += ../src/utils/ext_password_test.o |
| 1881 | CFLAGS += -DCONFIG_EXT_PASSWORD_TEST |
| 1882 | NEED_EXT_PASSWORD=y |
| 1883 | endif |
| 1884 | |
Hai Shalom | 6084025 | 2021-02-19 19:02:11 -0800 | [diff] [blame] | 1885 | ifdef CONFIG_EXT_PASSWORD_FILE |
| 1886 | OBJS += ../src/utils/ext_password_file.o |
| 1887 | CFLAGS += -DCONFIG_EXT_PASSWORD_FILE |
| 1888 | NEED_EXT_PASSWORD=y |
| 1889 | endif |
| 1890 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 1891 | ifdef NEED_EXT_PASSWORD |
| 1892 | OBJS += ../src/utils/ext_password.o |
| 1893 | CFLAGS += -DCONFIG_EXT_PASSWORD |
| 1894 | endif |
| 1895 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1896 | ifdef NEED_GAS_SERVER |
| 1897 | OBJS += ../src/common/gas_server.o |
| 1898 | CFLAGS += -DCONFIG_GAS_SERVER |
| 1899 | NEED_GAS=y |
| 1900 | endif |
| 1901 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1902 | ifdef NEED_GAS |
| 1903 | OBJS += ../src/common/gas.o |
| 1904 | OBJS += gas_query.o |
| 1905 | CFLAGS += -DCONFIG_GAS |
| 1906 | NEED_OFFCHANNEL=y |
| 1907 | endif |
| 1908 | |
| 1909 | ifdef NEED_OFFCHANNEL |
| 1910 | OBJS += offchannel.o |
| 1911 | CFLAGS += -DCONFIG_OFFCHANNEL |
| 1912 | endif |
| 1913 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1914 | ifdef NEED_JSON |
| 1915 | OBJS += ../src/utils/json.o |
| 1916 | CFLAGS += -DCONFIG_JSON |
| 1917 | endif |
| 1918 | |
Dmitry Shmidt | 7175743 | 2014-06-02 13:50:35 -0700 | [diff] [blame] | 1919 | ifdef CONFIG_MODULE_TESTS |
| 1920 | CFLAGS += -DCONFIG_MODULE_TESTS |
| 1921 | OBJS += wpas_module_tests.o |
| 1922 | OBJS += ../src/utils/utils_module_tests.o |
| 1923 | OBJS += ../src/common/common_module_tests.o |
Dmitry Shmidt | ff787d5 | 2015-01-12 13:01:47 -0800 | [diff] [blame] | 1924 | OBJS += ../src/crypto/crypto_module_tests.o |
Dmitry Shmidt | 7175743 | 2014-06-02 13:50:35 -0700 | [diff] [blame] | 1925 | ifdef CONFIG_WPS |
| 1926 | OBJS += ../src/wps/wps_module_tests.o |
| 1927 | endif |
| 1928 | endif |
| 1929 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1930 | OBJS += ../src/drivers/driver_common.o |
Dmitry Shmidt | a54fa5f | 2013-01-15 13:53:35 -0800 | [diff] [blame] | 1931 | OBJS_priv += ../src/drivers/driver_common.o |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1932 | |
Hai Shalom | 6084025 | 2021-02-19 19:02:11 -0800 | [diff] [blame] | 1933 | OBJS += wpa_supplicant.o events.o bssid_ignore.o wpas_glue.o scan.o |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1934 | OBJS_t := $(OBJS) $(OBJS_l2) eapol_test.o |
| 1935 | OBJS_t += ../src/radius/radius_client.o |
| 1936 | OBJS_t += ../src/radius/radius.o |
Sunil Ravi | 99c035e | 2024-07-12 01:42:03 +0000 | [diff] [blame] | 1937 | ifdef CONFIG_RADIUS_TLS |
| 1938 | CFLAGS += -DCONFIG_RADIUS_TLS |
| 1939 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1940 | OBJS_t2 := $(OBJS) $(OBJS_l2) preauth_test.o |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 1941 | |
| 1942 | OBJS_nfc := $(OBJS) $(OBJS_l2) nfc_pw_token.o |
| 1943 | OBJS_nfc += $(OBJS_d) ../src/drivers/drivers.o |
| 1944 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1945 | OBJS += $(CONFIG_MAIN).o |
| 1946 | |
| 1947 | ifdef CONFIG_PRIVSEP |
| 1948 | OBJS_priv += $(OBJS_d) ../src/drivers/drivers.o |
| 1949 | OBJS_priv += $(OBJS_l2) |
| 1950 | OBJS_priv += ../src/utils/os_$(CONFIG_OS).o |
| 1951 | OBJS_priv += ../src/utils/$(CONFIG_ELOOP).o |
| 1952 | OBJS_priv += ../src/utils/common.o |
| 1953 | OBJS_priv += ../src/utils/wpa_debug.o |
| 1954 | OBJS_priv += ../src/utils/wpabuf.o |
| 1955 | OBJS_priv += wpa_priv.o |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1956 | ifdef CONFIG_DRIVER_NL80211 |
| 1957 | OBJS_priv += ../src/common/ieee802_11_common.o |
| 1958 | endif |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1959 | OBJS += ../src/l2_packet/l2_packet_privsep.o |
| 1960 | OBJS += ../src/drivers/driver_privsep.o |
| 1961 | EXTRA_progs += wpa_priv |
| 1962 | else |
| 1963 | OBJS += $(OBJS_d) ../src/drivers/drivers.o |
| 1964 | OBJS += $(OBJS_l2) |
| 1965 | endif |
| 1966 | |
| 1967 | ifdef CONFIG_NDIS_EVENTS_INTEGRATED |
| 1968 | CFLAGS += -DCONFIG_NDIS_EVENTS_INTEGRATED |
| 1969 | OBJS += ../src/drivers/ndis_events.o |
| 1970 | EXTRALIBS += -loleaut32 -lole32 -luuid |
| 1971 | ifdef PLATFORMSDKLIB |
| 1972 | EXTRALIBS += $(PLATFORMSDKLIB)/WbemUuid.Lib |
| 1973 | else |
| 1974 | EXTRALIBS += WbemUuid.Lib |
| 1975 | endif |
| 1976 | endif |
| 1977 | |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1978 | ifdef CONFIG_FST |
| 1979 | CFLAGS += -DCONFIG_FST |
| 1980 | ifdef CONFIG_FST_TEST |
| 1981 | CFLAGS += -DCONFIG_FST_TEST |
| 1982 | endif |
| 1983 | FST_OBJS += ../src/fst/fst.o |
| 1984 | FST_OBJS += ../src/fst/fst_session.o |
| 1985 | FST_OBJS += ../src/fst/fst_iface.o |
| 1986 | FST_OBJS += ../src/fst/fst_group.o |
| 1987 | FST_OBJS += ../src/fst/fst_ctrl_aux.o |
| 1988 | ifdef CONFIG_CTRL_IFACE |
| 1989 | FST_OBJS += ../src/fst/fst_ctrl_iface.o |
| 1990 | endif |
| 1991 | OBJS += $(FST_OBJS) |
| 1992 | OBJS_t += $(FST_OBJS) |
| 1993 | OBJS_t2 += $(FST_OBJS) |
Dmitry Shmidt | e466304 | 2016-04-04 10:07:49 -0700 | [diff] [blame] | 1994 | OBJS_nfc += $(FST_OBJS) |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 1995 | endif |
| 1996 | |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 1997 | ifdef CONFIG_WEP |
| 1998 | CFLAGS += -DCONFIG_WEP |
| 1999 | endif |
| 2000 | |
Hai Shalom | b755a2a | 2020-04-23 21:49:02 -0700 | [diff] [blame] | 2001 | ifdef CONFIG_NO_TKIP |
| 2002 | CFLAGS += -DCONFIG_NO_TKIP |
| 2003 | endif |
| 2004 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 2005 | dynamic_eap_methods: $(EAPDYN) |
| 2006 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 2007 | _OBJS_VAR := OBJS_priv |
| 2008 | include ../src/objs.mk |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 2009 | wpa_priv: $(BCHECK) $(OBJS_priv) |
| 2010 | $(Q)$(LDO) $(LDFLAGS) -o wpa_priv $(OBJS_priv) $(LIBS) |
| 2011 | @$(E) " LD " $@ |
| 2012 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 2013 | _OBJS_VAR := OBJS |
| 2014 | include ../src/objs.mk |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 2015 | wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 2016 | $(Q)$(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS) |
| 2017 | @$(E) " LD " $@ |
| 2018 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 2019 | _OBJS_VAR := OBJS_t |
| 2020 | include ../src/objs.mk |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 2021 | eapol_test: $(OBJS_t) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 2022 | $(Q)$(LDO) $(LDFLAGS) -o eapol_test $(OBJS_t) $(LIBS) |
| 2023 | @$(E) " LD " $@ |
| 2024 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 2025 | _OBJS_VAR := OBJS_t2 |
| 2026 | include ../src/objs.mk |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 2027 | preauth_test: $(OBJS_t2) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 2028 | $(Q)$(LDO) $(LDFLAGS) -o preauth_test $(OBJS_t2) $(LIBS) |
| 2029 | @$(E) " LD " $@ |
| 2030 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 2031 | _OBJS_VAR := OBJS_p |
| 2032 | include ../src/objs.mk |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 2033 | wpa_passphrase: $(OBJS_p) |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 2034 | $(Q)$(LDO) $(LDFLAGS) -o wpa_passphrase $(OBJS_p) $(LIBS_p) $(LIBS) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 2035 | @$(E) " LD " $@ |
| 2036 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 2037 | _OBJS_VAR := OBJS_c |
| 2038 | include ../src/objs.mk |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 2039 | wpa_cli: $(OBJS_c) |
| 2040 | $(Q)$(LDO) $(LDFLAGS) -o wpa_cli $(OBJS_c) $(LIBS_c) |
| 2041 | @$(E) " LD " $@ |
| 2042 | |
Dmitry Shmidt | 7f65602 | 2015-02-25 14:36:37 -0800 | [diff] [blame] | 2043 | LIBCTRL += ../src/common/wpa_ctrl.o |
| 2044 | LIBCTRL += ../src/utils/os_$(CONFIG_OS).o |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 2045 | LIBCTRL += ../src/utils/common.o |
Dmitry Shmidt | 7f65602 | 2015-02-25 14:36:37 -0800 | [diff] [blame] | 2046 | LIBCTRL += ../src/utils/wpa_debug.o |
Dmitry Shmidt | b1e5210 | 2015-05-29 12:36:29 -0700 | [diff] [blame] | 2047 | LIBCTRLSO += ../src/common/wpa_ctrl.c |
| 2048 | LIBCTRLSO += ../src/utils/os_$(CONFIG_OS).c |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 2049 | LIBCTRLSO += ../src/utils/common.c |
Dmitry Shmidt | b1e5210 | 2015-05-29 12:36:29 -0700 | [diff] [blame] | 2050 | LIBCTRLSO += ../src/utils/wpa_debug.c |
Dmitry Shmidt | 7f65602 | 2015-02-25 14:36:37 -0800 | [diff] [blame] | 2051 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 2052 | _OBJS_VAR := LIBCTRL |
| 2053 | include ../src/objs.mk |
Dmitry Shmidt | b1e5210 | 2015-05-29 12:36:29 -0700 | [diff] [blame] | 2054 | libwpa_client.a: $(LIBCTRL) |
Dmitry Shmidt | 7f65602 | 2015-02-25 14:36:37 -0800 | [diff] [blame] | 2055 | $(Q)rm -f $@ |
| 2056 | $(Q)$(AR) crs $@ $? |
| 2057 | @$(E) " AR " $@ |
| 2058 | |
Dmitry Shmidt | b1e5210 | 2015-05-29 12:36:29 -0700 | [diff] [blame] | 2059 | libwpa_client.so: $(LIBCTRLSO) |
| 2060 | @$(E) " CC $@ ($^)" |
| 2061 | $(Q)$(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -fPIC $^ |
| 2062 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 2063 | OBJS_wpatest := libwpa_test.o |
| 2064 | _OBJS_VAR := OBJS_wpatest |
| 2065 | include ../src/objs.mk |
| 2066 | libwpa_test1: $(OBJS_wpatest) libwpa_client.a |
| 2067 | $(Q)$(LDO) $(LDFLAGS) -o libwpa_test1 $(OBJS_wpatest) libwpa_client.a $(LIBS_c) |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 2068 | @$(E) " LD " $@ |
| 2069 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 2070 | libwpa_test2: $(OBJS_wpatest) libwpa_client.so |
| 2071 | $(Q)$(LDO) $(LDFLAGS) -o libwpa_test2 $(OBJS_wpatest) -L. -lwpa_client $(LIBS_c) |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 2072 | @$(E) " LD " $@ |
| 2073 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 2074 | _OBJS_VAR := OBJS_nfc |
| 2075 | include ../src/objs.mk |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 2076 | nfc_pw_token: $(OBJS_nfc) |
| 2077 | $(Q)$(LDO) $(LDFLAGS) -o nfc_pw_token $(OBJS_nfc) $(LIBS) |
| 2078 | @$(E) " LD " $@ |
| 2079 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 2080 | win_if_list: win_if_list.c |
| 2081 | $(Q)$(LDO) $(LDFLAGS) -o $@ win_if_list.c $(CFLAGS) $(LIBS_w) |
| 2082 | @$(E) " LD " $@ |
| 2083 | |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 2084 | eap_psk.so: $(SRC_EAP_PSK) |
| 2085 | $(Q)$(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \ |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 2086 | -Deap_peer_psk_register=eap_peer_method_dynamic_init |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 2087 | @$(E) " CC/LD " $@ |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 2088 | |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 2089 | eap_pax.so: $(SRC_EAP_PAX) |
| 2090 | $(Q)$(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \ |
| 2091 | -D$(@F:eap_%.so=eap_peer_%)_register=eap_peer_method_dynamic_init |
| 2092 | @$(E) " CC/LD " $@ |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 2093 | |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 2094 | eap_peap.so: $(SRC_EAP_PEAP) |
| 2095 | $(Q)$(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \ |
| 2096 | -D$(@F:eap_%.so=eap_peer_%)_register=eap_peer_method_dynamic_init |
| 2097 | @$(E) " CC/LD " $@ |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 2098 | |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 2099 | eap_sake.so: $(SRC_EAP_SAKE) |
| 2100 | $(Q)$(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \ |
| 2101 | -D$(@F:eap_%.so=eap_peer_%)_register=eap_peer_method_dynamic_init |
| 2102 | @$(E) " CC/LD " $@ |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 2103 | |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 2104 | eap_ikev2.so: $(SRC_EAP_IKEV2) |
| 2105 | $(Q)$(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \ |
| 2106 | -D$(@F:eap_%.so=eap_peer_%)_register=eap_peer_method_dynamic_init |
| 2107 | @$(E) " CC/LD " $@ |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 2108 | |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 2109 | eap_eke.so: $(SRC_EAP_EKE) |
| 2110 | $(Q)$(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \ |
| 2111 | -D$(@F:eap_%.so=eap_peer_%)_register=eap_peer_method_dynamic_init |
| 2112 | @$(E) " CC/LD " $@ |
Dmitry Shmidt | 34af306 | 2013-07-11 10:46:32 -0700 | [diff] [blame] | 2113 | |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 2114 | eap_mschapv2.so: $(SRC_EAP_MSCHAPV2) |
| 2115 | $(Q)$(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \ |
| 2116 | -D$(@F:eap_%.so=eap_peer_%)_register=eap_peer_method_dynamic_init |
| 2117 | @$(E) " CC/LD " $@ |
| 2118 | |
| 2119 | eap_fast.so: $(SRC_EAP_FAST) |
| 2120 | $(Q)$(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \ |
| 2121 | -D$(@F:eap_%.so=eap_peer_%)_register=eap_peer_method_dynamic_init |
| 2122 | @$(E) " CC/LD " $@ |
| 2123 | |
| 2124 | eap_teap.so: $(SRC_EAP_TEAP) |
| 2125 | $(Q)$(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \ |
| 2126 | -D$(@F:eap_%.so=eap_peer_%)_register=eap_peer_method_dynamic_init |
| 2127 | @$(E) " CC/LD " $@ |
| 2128 | |
| 2129 | eap_gpsk.so: $(SRC_EAP_GPSK) |
| 2130 | $(Q)$(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \ |
| 2131 | -D$(@F:eap_%.so=eap_peer_%)_register=eap_peer_method_dynamic_init |
| 2132 | @$(E) " CC/LD " $@ |
| 2133 | |
| 2134 | %.so: ../src/eap_peer/%.c |
| 2135 | $(Q)$(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $< \ |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 2136 | -D$(*F:eap_%=eap_peer_%)_register=eap_peer_method_dynamic_init |
Hai Shalom | a20dcd7 | 2022-02-04 13:43:00 -0800 | [diff] [blame] | 2137 | @$(E) " CC/LD " $@ |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 2138 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 2139 | %.service: %.service.in |
Hai Shalom | 021b0b5 | 2019-04-10 11:17:58 -0700 | [diff] [blame] | 2140 | $(Q)sed -e 's|\@BINDIR\@|$(BINDIR)|g' $< >$@ |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 2141 | @$(E) " sed" $< |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 2142 | |
Dmitry Shmidt | c5ec7f5 | 2012-03-06 16:33:24 -0800 | [diff] [blame] | 2143 | %@.service: %.service.arg.in |
Hai Shalom | 021b0b5 | 2019-04-10 11:17:58 -0700 | [diff] [blame] | 2144 | $(Q)sed -e 's|\@BINDIR\@|$(BINDIR)|g' $< >$@ |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 2145 | @$(E) " sed" $< |
Dmitry Shmidt | c5ec7f5 | 2012-03-06 16:33:24 -0800 | [diff] [blame] | 2146 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 2147 | wpa_supplicant.exe: wpa_supplicant |
| 2148 | mv -f $< $@ |
| 2149 | wpa_cli.exe: wpa_cli |
| 2150 | mv -f $< $@ |
| 2151 | wpa_passphrase.exe: wpa_passphrase |
| 2152 | mv -f $< $@ |
| 2153 | win_if_list.exe: win_if_list |
| 2154 | mv -f $< $@ |
| 2155 | eapol_test.exe: eapol_test |
| 2156 | mv -f $< $@ |
| 2157 | |
| 2158 | WINALL=wpa_supplicant.exe wpa_cli.exe wpa_passphrase.exe win_if_list.exe |
| 2159 | |
| 2160 | windows-bin: $(WINALL) |
| 2161 | $(STRIP) $(WINALL) |
| 2162 | |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 2163 | wpa_gui: |
| 2164 | @echo "wpa_gui has been removed - see wpa_gui-qt4 for replacement" |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 2165 | |
| 2166 | wpa_gui-qt4/Makefile: |
Dmitry Shmidt | 1d755d0 | 2015-04-28 10:34:29 -0700 | [diff] [blame] | 2167 | qmake -o wpa_gui-qt4/Makefile wpa_gui-qt4/wpa_gui.pro |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 2168 | |
| 2169 | wpa_gui-qt4/lang/wpa_gui_de.qm: wpa_gui-qt4/lang/wpa_gui_de.ts |
| 2170 | lrelease wpa_gui-qt4/wpa_gui.pro |
| 2171 | |
| 2172 | wpa_gui-qt4: wpa_gui-qt4/Makefile wpa_gui-qt4/lang/wpa_gui_de.qm |
| 2173 | $(MAKE) -C wpa_gui-qt4 |
| 2174 | |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 2175 | FIPSDIR=/usr/local/ssl/fips-2.0 |
| 2176 | FIPSLD=$(FIPSDIR)/bin/fipsld |
| 2177 | fips: |
| 2178 | $(MAKE) CC=$(FIPSLD) FIPSLD_CC="$(CC)" |
| 2179 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 2180 | .PHONY: lcov-html |
| 2181 | lcov-html: $(call BUILDOBJ,wpa_supplicant.gcda) |
| 2182 | lcov -c -d $(BUILDDIR) > lcov.info |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 2183 | genhtml lcov.info --output-directory lcov-html |
| 2184 | |
Sunil Ravi | 38ad1ed | 2023-01-17 23:58:31 +0000 | [diff] [blame] | 2185 | PASN_CFLAGS := $(CFLAGS) |
| 2186 | PASN_CFLAGS += -DCONFIG_PASN |
| 2187 | |
| 2188 | LIBPASNSO := ../src/utils/$(CONFIG_ELOOP).c |
| 2189 | LIBPASNSO += ../src/utils/wpa_debug.c |
| 2190 | LIBPASNSO += ../src/utils/wpabuf.c |
| 2191 | LIBPASNSO += ../src/utils/os_$(CONFIG_OS).c |
| 2192 | LIBPASNSO += ../src/utils/config.c |
| 2193 | LIBPASNSO += ../src/utils/common.c |
| 2194 | |
| 2195 | ifdef NEED_BASE64 |
| 2196 | LIBPASNSO += ../src/utils/base64.c |
| 2197 | endif |
| 2198 | |
| 2199 | ifdef CONFIG_WPA_TRACE |
| 2200 | LIBPASNSO += ../src/utils/trace.c |
| 2201 | endif |
| 2202 | |
| 2203 | ifdef CONFIG_EXT_PASSWORD_FILE |
| 2204 | LIBPASNSO += ../src/utils/ext_password_file.c |
| 2205 | endif |
| 2206 | |
| 2207 | ifdef CONFIG_EXT_PASSWORD_TEST |
| 2208 | LIBPASNSO += ../src/utils/ext_password_test.c |
| 2209 | endif |
| 2210 | |
| 2211 | ifdef NEED_EXT_PASSWORD |
| 2212 | LIBPASNSO += ../src/utils/ext_password.c |
| 2213 | endif |
| 2214 | |
| 2215 | ifdef CONFIG_SAE |
| 2216 | LIBPASNSO += ../src/common/sae.c |
| 2217 | endif |
| 2218 | |
| 2219 | ifdef CONFIG_SAE_PK |
| 2220 | LIBPASNSO += ../src/common/sae_pk.c |
| 2221 | endif |
| 2222 | |
| 2223 | ifndef CONFIG_NO_WPA |
| 2224 | LIBPASNSO += ../src/common/wpa_common.c |
| 2225 | endif |
| 2226 | |
| 2227 | LIBPASNSO += ../src/common/ieee802_11_common.c |
| 2228 | |
| 2229 | ifdef NEED_DRAGONFLY |
| 2230 | LIBPASNSO += ../src/common/dragonfly.c |
| 2231 | endif |
| 2232 | |
| 2233 | LIBPASNSO += ../src/common/ptksa_cache.c |
Sunil Ravi | 99c035e | 2024-07-12 01:42:03 +0000 | [diff] [blame] | 2234 | LIBPASNSO += ../src/rsn_supp/pmksa_cache.c |
Sunil Ravi | 38ad1ed | 2023-01-17 23:58:31 +0000 | [diff] [blame] | 2235 | |
| 2236 | ifndef CONFIG_NO_WPA |
Sunil Ravi | 38ad1ed | 2023-01-17 23:58:31 +0000 | [diff] [blame] | 2237 | LIBPASNSO += ../src/rsn_supp/wpa_ie.c |
| 2238 | endif |
| 2239 | |
| 2240 | LIBPASNSO += ../src/ap/comeback_token.c |
| 2241 | LIBPASNSO += ../src/ap/pmksa_cache_auth.c |
| 2242 | |
| 2243 | ifdef NEED_EAP_COMMON |
| 2244 | LIBPASNSO += ../src/eap_common/eap_common.c |
| 2245 | endif |
| 2246 | |
| 2247 | ifdef CHAP |
| 2248 | LIBPASNSO += ../src/eap_common/chap.c |
| 2249 | endif |
| 2250 | |
| 2251 | ifdef CONFIG_IEEE8021X_EAPOL |
| 2252 | LIBPASNSO += ../src/eap_peer/eap.c |
| 2253 | LIBPASNSO += ../src/eap_peer/eap_methods.c |
| 2254 | LIBPASNSO += ../src/eapol_supp/eapol_supp_sm.c |
| 2255 | endif |
| 2256 | |
| 2257 | ifeq ($(CONFIG_TLS), wolfssl) |
| 2258 | LIBPASNSO += ../src/crypto/crypto_wolfssl.c |
| 2259 | ifdef TLS_FUNCS |
| 2260 | LIBPASNSO += ../src/crypto/tls_wolfssl.c |
| 2261 | NEED_TLS_PRF_SHA256=y |
| 2262 | LIBPASNSO += -lwolfssl -lm |
| 2263 | endif |
| 2264 | endif |
| 2265 | |
| 2266 | ifeq ($(CONFIG_TLS), openssl) |
| 2267 | LIBPASNSO += ../src/crypto/crypto_openssl.c |
| 2268 | ifdef TLS_FUNCS |
| 2269 | LIBPASNSO += ../src/crypto/tls_openssl.c |
| 2270 | LIBPASNSO += -lssl -lcrypto |
| 2271 | NEED_TLS_PRF_SHA256=y |
| 2272 | endif |
| 2273 | endif |
| 2274 | |
| 2275 | ifeq ($(CONFIG_TLS), gnutls) |
| 2276 | LIBPASNSO += ../src/crypto/crypto_$(CONFIG_CRYPTO).c |
| 2277 | ifdef TLS_FUNCS |
| 2278 | LIBPASNSO += ../src/crypto/tls_gnutls.c |
| 2279 | LIBPASNSO += -lgnutls -lgpg-error |
| 2280 | LIBPASNSO += -lgcrypt |
| 2281 | endif |
| 2282 | endif |
| 2283 | |
| 2284 | ifdef NEED_TLS_PRF_SHA256 |
| 2285 | LIBPASNSO += ../src/crypto/sha256-tlsprf.c |
| 2286 | endif |
| 2287 | |
| 2288 | ifdef NEED_SHA512 |
| 2289 | LIBPASNSO += ../src/crypto/sha512-prf.c |
| 2290 | endif |
| 2291 | |
| 2292 | ifdef NEED_SHA384 |
| 2293 | LIBPASNSO += ../src/crypto/sha384-prf.c |
| 2294 | endif |
| 2295 | |
| 2296 | LIBPASNSO += ../src/crypto/sha256-prf.c |
| 2297 | |
| 2298 | ifdef NEED_HMAC_SHA512_KDF |
| 2299 | LIBPASNSO += ../src/crypto/sha512-kdf.c |
| 2300 | endif |
| 2301 | |
| 2302 | ifdef NEED_HMAC_SHA384_KDF |
| 2303 | LIBPASNSO += ../src/crypto/sha384-kdf.c |
| 2304 | endif |
| 2305 | |
| 2306 | ifdef NEED_HMAC_SHA256_KDF |
| 2307 | LIBPASNSO += ../src/crypto/sha256-kdf.c |
| 2308 | endif |
| 2309 | |
| 2310 | ifdef NEED_DH_GROUPS |
| 2311 | LIBPASNSO += ../src/crypto/dh_groups.c |
| 2312 | endif |
| 2313 | |
| 2314 | ifdef NEED_AES_SIV |
| 2315 | LIBPASNSO += ../src/crypto/aes-siv.c |
| 2316 | endif |
| 2317 | |
| 2318 | ifdef NEED_AES_CTR |
| 2319 | LIBPASNSO += ../src/crypto/aes-ctr.c |
| 2320 | endif |
| 2321 | |
| 2322 | ifdef NEED_SHA1 |
| 2323 | LIBPASNSO += ../src/crypto/sha1-prf.c |
| 2324 | ifdef NEED_TLS_PRF |
| 2325 | LIBPASNSO += ../src/crypto/sha1-tlsprf.c |
| 2326 | endif |
| 2327 | endif |
| 2328 | |
| 2329 | LIBPASNSO += ../src/pasn/pasn_initiator.c |
| 2330 | LIBPASNSO += ../src/pasn/pasn_responder.c |
Sunil Ravi | 99c035e | 2024-07-12 01:42:03 +0000 | [diff] [blame] | 2331 | LIBPASNSO += ../src/pasn/pasn_common.c |
Sunil Ravi | 38ad1ed | 2023-01-17 23:58:31 +0000 | [diff] [blame] | 2332 | |
| 2333 | libpasn.so: $(LIBPASNSO) |
| 2334 | @$(E) " CC $@ ($^)" |
| 2335 | $(Q)$(CC) $(LDFLAGS) -o $@ $(PASN_CFLAGS) -shared -fPIC -lcrypto $^ |
| 2336 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 2337 | clean: common-clean |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 2338 | $(MAKE) -C ../src clean |
| 2339 | $(MAKE) -C dbus clean |
Dmitry Shmidt | 01904cf | 2013-12-05 11:08:35 -0800 | [diff] [blame] | 2340 | rm -f core *~ *.o *.d *.gcno *.gcda *.gcov |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 2341 | rm -f eap_*.so $(WINALL) eapol_test preauth_test |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 2342 | rm -f wpa_priv |
Dmitry Shmidt | 0494959 | 2012-07-19 12:16:46 -0700 | [diff] [blame] | 2343 | rm -f nfc_pw_token |
Dmitry Shmidt | fb79edc | 2014-01-10 10:45:54 -0800 | [diff] [blame] | 2344 | rm -f lcov.info |
| 2345 | rm -rf lcov-html |
Dmitry Shmidt | b1e5210 | 2015-05-29 12:36:29 -0700 | [diff] [blame] | 2346 | rm -f libwpa_client.a |
Sunil Ravi | 38ad1ed | 2023-01-17 23:58:31 +0000 | [diff] [blame] | 2347 | rm -f libpasn.so |
Dmitry Shmidt | b1e5210 | 2015-05-29 12:36:29 -0700 | [diff] [blame] | 2348 | rm -f libwpa_client.so |
Dmitry Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame] | 2349 | rm -f libwpa_test1 libwpa_test2 |
Sunil Ravi | a04bd25 | 2022-05-02 22:54:18 -0700 | [diff] [blame] | 2350 | rm -f wpa_passphrase |