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