diff options
Diffstat (limited to 'tools/cert_create/Makefile')
-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 f1aa797..eac8cec 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 |