Skip to content

Commit 8ebca51

Browse files
Merge pull request Mbed-TLS#275 from gilles-peskine-arm/mldsa-pqcp-add-driver-framework-return-of-the-psasim
psasim: Read include paths from the TF-PSA-Crypto makefile
2 parents 421f7a2 + c5c6dda commit 8ebca51

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

‎psasim/Makefile‎

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
ifeq ($(wildcard ../../tf-psa-crypto),)
2+
TF_PSA_CRYPTO_PATH ?= ../..
3+
MBEDTLS_PATH ?= ../../..
4+
else
5+
MBEDTLS_PATH ?= ../..
6+
TF_PSA_CRYPTO_PATH ?= ../../tf-psa-crypto
7+
endif
8+
9+
include $(TF_PSA_CRYPTO_PATH)/scripts/crypto-common.make
10+
111
CFLAGS += -Wall -Werror -std=c99 -D_XOPEN_SOURCE=1 -D_POSIX_C_SOURCE=200809L
212

313
ifeq ($(DEBUG),1)
@@ -7,10 +17,8 @@ endif
717
CLIENT_LIBS := -Lclient_libs -lpsaclient -lmbedtls -lmbedx509 -lmbedcrypto
818
SERVER_LIBS := -Lserver_libs -lmbedcrypto
919

10-
MBEDTLS_ROOT_PATH = ../..
11-
COMMON_INCLUDE := -I./include -I$(MBEDTLS_ROOT_PATH)/include \
12-
-I$(MBEDTLS_ROOT_PATH)/tf-psa-crypto/include \
13-
-I$(MBEDTLS_ROOT_PATH)/tf-psa-crypto/drivers/builtin/include
20+
COMMON_INCLUDE := -I./include -I$(MBEDTLS_PATH)/include \
21+
$(TF_PSA_CRYPTO_LIBRARY_PUBLIC_INCLUDE)
1422

1523
GENERATED_H_FILES = include/psa_manifest/manifest.h \
1624
include/psa_manifest/pid.h \
@@ -66,9 +74,9 @@ $(PARTITION_SERVER_BOOTSTRAP) $(GENERATED_H_FILES): src/manifest.json src/server
6674
# If not using all.sh then the user must do it manually.
6775
client_libs: client_libs/libpsaclient
6876
client_libs server_libs:
69-
$(MAKE) -C $(MBEDTLS_ROOT_PATH)/library CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" libmbedcrypto.a libmbedx509.a libmbedtls.a
77+
$(MAKE) -C $(MBEDTLS_PATH)/library CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" libmbedcrypto.a libmbedx509.a libmbedtls.a
7078
mkdir -p $@
71-
cp $(MBEDTLS_ROOT_PATH)/library/libmbed*.a $@/
79+
cp $(MBEDTLS_PATH)/library/libmbed*.a $@/
7280

7381
clean_server_intermediate_files:
7482
rm -f $(PARTITION_SERVER_BOOTSTRAP)

0 commit comments

Comments
 (0)