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