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