1 2WOLF_SSL_FLAGS = -DSINGLE_THREADED -DNO_WOLFSSL_CLIENT -DNO_WOLFSSL_SERVER -DOPENSSL_EXTRA -DNO_FILESYSTEM -DWOLFSSL_USER_SETTINGS -DTIME_OVERRIDES -DSTRING_USER -DCTYPE_USER 3 4# 5# Wolfcrypt has multiple unused functions, unfortunately the OPTEE build system can only turn off compiler flags for 6# files in the same directory as the sub.mk file. It is not possible to place sub.mk files in the git submodules without 7# creating a new fork of each submodule repo. To avoid spurious warnings these warnings are disabled here globally. 8# 9 10WOLF_WARNING_SUPPRESS = -Wno-unused-function 11 12cflags-y += $(WOLF_SSL_FLAGS) $(WOLF_WARNING_SUPPRESS) 13 14# 15# For the purposes of this command the current working directory is the makefile root (/fTPM) folder, 16# but the symlink will be created relative to THIS directory so the source requires an extra '../../'. 17# 18./lib/wolf/wolf_symlink: 19 @echo Checking symlink to the WolfSSL folder: $(abspath $(WOLF_ROOT)) 20 @if [ -L ./lib/wolf/wolf_symlink ] ; \ 21 then \ 22 echo Symlink already established ; \ 23 else \ 24 echo Establishing symlink. ; \ 25 ln -s ../../$(WOLF_ROOT) ./lib/wolf/wolf_symlink; \ 26 fi 27 28.PHONY: remove_wolf_symlink 29remove_wolf_symlink: 30 @if [ -e ./lib/wolf/wolf_symlink ] ; \ 31 then \ 32 unlink ./lib/wolf/wolf_symlink ; \ 33 echo Clearing symlink to the Wolf folder: $(abspath $(WOLF_ROOT)) ; \ 34 fi 35 36global-incdirs-y += wolf_symlink 37 38srcs-y += wolf_symlink/wolfcrypt/src/aes.c 39srcs-y += wolf_symlink/wolfcrypt/src/asn.c 40srcs-y += wolf_symlink/wolfcrypt/src/ecc.c 41srcs-y += wolf_symlink/wolfcrypt/src/integer.c 42srcs-y += wolf_symlink/wolfcrypt/src/memory.c 43srcs-y += wolf_symlink/wolfcrypt/src/sha.c 44srcs-y += wolf_symlink/wolfcrypt/src/sha256.c 45srcs-y += wolf_symlink/wolfcrypt/src/sha512.c 46srcs-y += wolf_symlink/wolfcrypt/src/tfm.c 47srcs-y += wolf_symlink/wolfcrypt/src/wolfmath.c 48srcs-y += wolf_symlink/wolfcrypt/src/des3.c 49srcs-y += wolf_symlink/wolfcrypt/src/random.c