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