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