Various minor changes on optee examples
Prefix test applications for the examples with 'optee_example_'.
Gitignore the generate test applications.
Few extra minor changes as make verbosity and source coding style.
STR_TRACE_USER_TA is deprecated.
Update README.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
diff --git a/Makefile b/Makefile
index 4d29a41..9fb6b46 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,9 @@
-export V?=0
+export V ?= 0
OUTPUT_DIR := $(CURDIR)/out
-EXAMPLE_LIST := hello_world random
+
+EXAMPLE_LIST := hello_world
+EXAMPLE_LIST += random
.PHONY: all
all: examples prepare-for-rootfs
@@ -10,27 +12,28 @@
clean: examples-clean prepare-for-rootfs-clean
examples:
- for example in $(EXAMPLE_LIST); do \
+ @for example in $(EXAMPLE_LIST); do \
$(MAKE) -C $$example CROSS_COMPILE="$(HOST_CROSS_COMPILE)"; \
done
examples-clean:
- for example in $(EXAMPLE_LIST); do \
+ @for example in $(EXAMPLE_LIST); do \
$(MAKE) -C $$example clean; \
done
prepare-for-rootfs: examples
- echo "Copying example CA and TA binaries to $(OUTPUT_DIR)..."
+ @echo "Copying example CA and TA binaries to $(OUTPUT_DIR)..."
@mkdir -p $(OUTPUT_DIR)
@mkdir -p $(OUTPUT_DIR)/ta
@mkdir -p $(OUTPUT_DIR)/ca
@for example in $(EXAMPLE_LIST); do \
- if [ -e $$example/host/optee_$$example ]; then \
- cp -p $$example/host/optee_$$example $(OUTPUT_DIR)/ca/; \
+ if [ -e $$example/host/optee_example_$$example ]; then \
+ cp -p $$example/host/optee_example_$$example $(OUTPUT_DIR)/ca/; \
fi; \
cp -pr $$example/ta/*.ta $(OUTPUT_DIR)/ta/; \
done
prepare-for-rootfs-clean:
- rm -rf $(OUTPUT_DIR)/ta/*
- rm -rf $(OUTPUT_DIR)/ca/*
+ @rm -rf $(OUTPUT_DIR)/ta
+ @rm -rf $(OUTPUT_DIR)/ca
+ @rmdir --ignore-fail-on-non-empty $(OUTPUT_DIR) || test ! -e $(OUTPUT_DIR)