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