Skip to content

Commit 193d3d4

Browse files
committed
Fix more build issues in CI
1 parent 8e5aec2 commit 193d3d4

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

tools/unit-tests/Makefile

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,20 @@ endif
99
WOLFBOOT_LIB_WOLFSSL?=../../lib/wolfssl
1010
WOLFBOOT_LIB_WOLFPKCS11?=../../lib/wolfPKCS11
1111
WOLFBOOT_LIB_WOLFPSA?=../../lib/wolfPSA
12+
WOLFBOOT_LIB_WOLFTPM?=../../lib/wolfTPM
13+
14+
ifeq ($(wildcard $(WOLFBOOT_LIB_WOLFPSA)),)
15+
WOLFBOOT_LIB_WOLFPSA=../../../external-libs/wolfPSA
16+
endif
17+
ifeq ($(wildcard $(WOLFBOOT_LIB_WOLFTPM)),)
18+
WOLFBOOT_LIB_WOLFTPM=../../../external-libs/wolfTPM
19+
endif
1220

1321
# Convert to absolute paths for standalone usage
1422
WOLFBOOT_LIB_WOLFSSL:=$(abspath $(WOLFBOOT_LIB_WOLFSSL))
1523
WOLFBOOT_LIB_WOLFPKCS11:=$(abspath $(WOLFBOOT_LIB_WOLFPKCS11))
1624
WOLFBOOT_LIB_WOLFPSA:=$(abspath $(WOLFBOOT_LIB_WOLFPSA))
25+
WOLFBOOT_LIB_WOLFTPM:=$(abspath $(WOLFBOOT_LIB_WOLFTPM))
1726

1827
CFLAGS=-I. -I../../src -I../../include -I$(WOLFBOOT_LIB_WOLFSSL)
1928
CFLAGS+=-g -ggdb
@@ -110,8 +119,9 @@ unit-qspi-flash: ../../include/target.h unit-qspi-flash.c
110119
gcc -o $@ $^ $(CFLAGS) $(LDFLAGS)
111120

112121
unit-tpm-rsa-exp: ../../include/target.h unit-tpm-rsa-exp.c
113-
gcc -o $@ $^ $(CFLAGS) -I../../lib/wolfTPM -DWOLFBOOT_TPM \
114-
-DWOLFBOOT_TPM_VERIFY -DWOLFBOOT_SIGN_RSA2048 -DWOLFBOOT_HASH_SHA256 \
122+
gcc -o $@ $^ $(CFLAGS) -I$(WOLFBOOT_LIB_WOLFTPM) -DWOLFBOOT_TPM \
123+
-DWOLFTPM_USER_SETTINGS -DWOLFBOOT_TPM_VERIFY -DWOLFBOOT_SIGN_RSA2048 \
124+
-DWOLFBOOT_HASH_SHA256 \
115125
-ffunction-sections -fdata-sections $(LDFLAGS) -Wl,--gc-sections
116126

117127
unit-string: ../../include/target.h unit-string.c

0 commit comments

Comments
 (0)