mirror of
https://github.com/wolfSSL/wolfssl
synced 2026-05-24 10:18:22 +00:00
82 lines
3.3 KiB
Text
82 lines
3.3 KiB
Text
# vim:ft=automake
|
|
# All paths should be given relative to the root
|
|
|
|
if BUILD_WOLFCRYPT_TESTS
|
|
if !BUILD_KERNEL_MODULE
|
|
|
|
noinst_PROGRAMS+= wolfcrypt/test/testwolfcrypt
|
|
if BUILD_CRYPTONLY
|
|
check_PROGRAMS+= wolfcrypt/test/testwolfcrypt
|
|
endif
|
|
noinst_PROGRAMS+= wolfcrypt/test/testwolfcrypt
|
|
wolfcrypt_test_testwolfcrypt_SOURCES = wolfcrypt/test/test.c
|
|
wolfcrypt_test_testwolfcrypt_LDADD = src/libwolfssl@LIBSUFFIX@.la $(LIB_STATIC_ADD)
|
|
wolfcrypt_test_testwolfcrypt_DEPENDENCIES = src/libwolfssl@LIBSUFFIX@.la
|
|
if BUILD_SWDEV
|
|
wolfcrypt_test_testwolfcrypt_SOURCES += tests/swdev/swdev_loader.c
|
|
wolfcrypt_test_testwolfcrypt_LDADD += $(top_builddir)/tests/swdev/build/swdev.o $(LIBM)
|
|
wolfcrypt_test_testwolfcrypt_DEPENDENCIES += $(top_builddir)/tests/swdev/build/swdev.o
|
|
endif
|
|
noinst_HEADERS += wolfcrypt/test/test.h wolfcrypt/test/test_paths.h.in
|
|
endif
|
|
endif
|
|
|
|
if BUILD_SWDEV
|
|
# delegates to tests/swdev/Makefile
|
|
$(top_builddir)/tests/swdev/build/swdev.o: $(top_builddir)/wolfssl/options.h FORCE
|
|
@test "$(abs_top_srcdir)" = "$(abs_top_builddir)" || { \
|
|
echo "error: --enable-swdev currently supports in-tree builds only"; \
|
|
exit 1; \
|
|
}
|
|
$(MAKE) -C $(top_srcdir)/tests/swdev \
|
|
SRCDIR=$(abs_top_srcdir)/tests/swdev \
|
|
WOLFROOT=$(abs_top_srcdir) \
|
|
$(if $(CC),CC='$(CC)') \
|
|
$(if $(CCAS),CCAS='$(CCAS)') \
|
|
$(if $(LD),LD='$(LD)') \
|
|
$(if $(OBJCOPY),OBJCOPY='$(OBJCOPY)') \
|
|
PARENT_SRCS='$(filter wolfcrypt/src/%.c src/%.c,$(src_libwolfssl_la_SOURCES))' \
|
|
PARENT_ASM_SRCS='$(filter %.S,$(src_libwolfssl_la_SOURCES))' \
|
|
PARENT_CPPFLAGS='$(CPPFLAGS) $(filter-out -DBUILDING_WOLFSSL,$(DEFS))' \
|
|
PARENT_BUILD_CFLAGS='$(filter-out -include ./.build_params -DBUILDING_WOLFSSL,$(AM_CFLAGS))' \
|
|
PARENT_CFLAGS='$(CFLAGS)' \
|
|
PARENT_BUILD_CCASFLAGS='$(filter-out -DBUILDING_WOLFSSL,$(AM_CCASFLAGS))' \
|
|
PARENT_CCASFLAGS='$(CCASFLAGS)' \
|
|
BUILDDIR=$(abs_top_builddir)/tests/swdev/build
|
|
|
|
FORCE:
|
|
|
|
CLEANFILES += $(top_builddir)/tests/swdev/build/swdev.o \
|
|
$(top_builddir)/tests/swdev/build/swdev.partial.o
|
|
|
|
# Use mostlyclean-local rather than clean-local to avoid colliding with
|
|
# doc/include.am's clean-local (automake allows only one definition per
|
|
# Makefile). make clean triggers mostlyclean, so coverage is equivalent.
|
|
mostlyclean-local:
|
|
rm -rf $(top_builddir)/tests/swdev/build
|
|
endif
|
|
|
|
if BUILD_WOLFCRYPT_TESTS_LIBS
|
|
lib_LTLIBRARIES += wolfcrypt/test/libwolfcrypttest.la
|
|
wolfcrypt_test_libwolfcrypttest_la_SOURCES = wolfcrypt/test/test.c
|
|
wolfcrypt_test_libwolfcrypttest_la_CPPFLAGS = -DNO_MAIN_DRIVER
|
|
wolfcrypt_test_libwolfcrypttest_la_LIBADD = src/libwolfssl@LIBSUFFIX@.la
|
|
wolfcrypt_test_libwolfcrypttest_la_DEPENDENCIES = src/libwolfssl@LIBSUFFIX@.la
|
|
endif
|
|
|
|
EXTRA_DIST += tests/swdev/swdev.c \
|
|
tests/swdev/swdev.h \
|
|
tests/swdev/swdev_loader.c \
|
|
tests/swdev/swdev_loader.h \
|
|
tests/swdev/user_settings.h \
|
|
tests/swdev/Makefile \
|
|
tests/swdev/README.md
|
|
|
|
EXTRA_DIST += wolfcrypt/test/test.sln
|
|
EXTRA_DIST += wolfcrypt/test/test.vcproj
|
|
EXTRA_DIST += wolfcrypt/test/test-VS2022.sln
|
|
EXTRA_DIST += wolfcrypt/test/test-VS2022.vcxproj
|
|
EXTRA_DIST += wolfcrypt/test/test-VS2022.vcxproj.user
|
|
|
|
EXTRA_DIST += wolfcrypt/test/README.md
|
|
DISTCLEANFILES+= wolfcrypt/test/.libs/testwolfcrypt
|