diff options
author | Dan Handley <dan.handley@arm.com> | 2015-03-27 17:44:35 +0000 |
---|---|---|
committer | Dan Handley <dan.handley@arm.com> | 2015-04-28 19:50:48 +0100 |
commit | c04d2606f6fb82aaf1fa341e61b834fff8f3db1c (patch) | |
tree | ac0e2cb844b2e7c2bdfb5ac7f15796289fd46bd2 /tools | |
parent | d3b638cb4ac581789737c1a4c86032b00707cb8c (diff) | |
download | arm-trusted-firmware-c04d2606f6fb82aaf1fa341e61b834fff8f3db1c.tar.gz |
Allow deeper platform port directory structure
Update the top level makefile to allow platform ports to exist in
subdirectories at any level instead of one level under `plat/`. The
makefile recursively searches for all files called `platform.mk` in
all subdirectories of `plat/`. The directory containing
`platform.mk` is the platform name. Platform names must be unique
across the codebase.
Replace usage of HELP_PLATFORMS in the Makefile with PLATFORMS since
these are both used to report the same information back to the user.
Update the TSP and cert_create tool makefiles in a similar way
to support a deeper platform port directory structure.
Also add PLAT_<plat_name> as a define passed through the top level
makefile to the source files, to allow build time variation in common
platform code.
Change-Id: I213420164808c5ddb99a26144e8e3f141a7417b7
Diffstat (limited to 'tools')
-rw-r--r-- | tools/cert_create/Makefile | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/cert_create/Makefile b/tools/cert_create/Makefile index f1aa79743..eac8cec80 100644 --- a/tools/cert_create/Makefile +++ b/tools/cert_create/Makefile @@ -47,7 +47,13 @@ CFLAGS := -Wall -std=c99 # Check the platform ifeq (${PLAT},none) - $(error Error: No platform defined. Use PLAT=<platform>.) + $(error "Error: Unknown platform. Please use PLAT=<platform name> to specify the platform") +endif +PLAT_MAKEFILE := platform.mk +PLAT_INCLUDE := $(shell find ../../plat/ -wholename '*/${PLAT}/${PLAT_MAKEFILE}' | \ + sed 's/${PLAT_MAKEFILE}/include/') +ifeq ($(PLAT_INCLUDE),) + $(error "Error: Invalid platform '${PLAT}'") endif ifeq (${DEBUG},1) @@ -63,7 +69,7 @@ endif # Make soft links and include from local directory otherwise wrong headers # could get pulled in from firmware tree. -INC_DIR := -I ./include -I ../../plat/${PLAT}/include +INC_DIR := -I ./include -I ${PLAT_INCLUDE} LIB_DIR := LIB := -lssl -lcrypto |