From 8a31d083cab50742733b5eb9138e0680b96e7c50 Mon Sep 17 00:00:00 2001 From: Jerome Forissier Date: Wed, 17 Apr 2024 17:09:06 +0200 Subject: [PATCH] ta: also build GP TAs when GP_PACKAGE is set Add the GlobalPlatform Test Suite TAs to the build when GP_PACKAGE is set. This happens in the OP-TEE build environment [1], which still handles the package extraction step as well as the final installation of the TAs into the staging directory. Link: https://github.com/OP-TEE/build/blob/4.2.0/br-ext/package/optee_test_ext/optee_test_ext.mk [1] Signed-off-by: Jerome Forissier Acked-by: Jens Wiklander --- ta/Makefile.gmake | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ta/Makefile.gmake b/ta/Makefile.gmake index 9b84448a9..8f3f802f4 100644 --- a/ta/Makefile.gmake +++ b/ta/Makefile.gmake @@ -62,6 +62,20 @@ $(eval $(foreach dir,$(TA_DIRS),$(call add-ta-target,$(dir)))) ta-os_test: ta-os_test_lib ta-os_test_lib_dl +ifneq (,$(GP_PACKAGE)) +define add-gp-ta-target +.PHONY: gp-ta-$(1) +gp-ta-$(1): + $(MAKE) -C $(1) + +ta: gp-ta-$(1) + +endef + +$(eval $(foreach f,$(dir $(wildcard ../host/xtest/gp-suite/TTAs_Internal_API_1_1_1/*/*/code_files/Makefile \ + ../host/xtest/gp-suite/TTAs_Internal_API_1_1_1/*/*/*/code_files/Makefile)),$(call add-gp-ta-target,$(f)))) +endif + # remove build directories including ta// directories. # Note: $(out-dir) may be a relative path. RMDIR := rmdir --ignore-fail-on-non-empty