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