|
@ -1,5 +1,5 @@ |
|
|
#
|
|
|
#
|
|
|
# Copyright (c) 2015-2022, ARM Limited and Contributors. All rights reserved.
|
|
|
# Copyright (c) 2015-2022, Arm Limited and Contributors. All rights reserved.
|
|
|
#
|
|
|
#
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
#
|
|
|
#
|
|
@ -9,12 +9,12 @@ V ?= 0 |
|
|
DEBUG := 0 |
|
|
DEBUG := 0 |
|
|
CRTTOOL ?= cert_create${BIN_EXT} |
|
|
CRTTOOL ?= cert_create${BIN_EXT} |
|
|
BINARY := $(notdir ${CRTTOOL}) |
|
|
BINARY := $(notdir ${CRTTOOL}) |
|
|
OPENSSL_DIR := /usr |
|
|
|
|
|
COT := tbbr |
|
|
COT := tbbr |
|
|
|
|
|
|
|
|
MAKE_HELPERS_DIRECTORY := ../../make_helpers/ |
|
|
MAKE_HELPERS_DIRECTORY := ../../make_helpers/ |
|
|
include ${MAKE_HELPERS_DIRECTORY}build_macros.mk |
|
|
include ${MAKE_HELPERS_DIRECTORY}build_macros.mk |
|
|
include ${MAKE_HELPERS_DIRECTORY}build_env.mk |
|
|
include ${MAKE_HELPERS_DIRECTORY}build_env.mk |
|
|
|
|
|
include ${MAKE_HELPERS_DIRECTORY}defaults.mk |
|
|
|
|
|
|
|
|
ifneq (${PLAT},none) |
|
|
ifneq (${PLAT},none) |
|
|
TF_PLATFORM_ROOT := ../../plat/ |
|
|
TF_PLATFORM_ROOT := ../../plat/ |
|
@ -45,6 +45,10 @@ ifneq (,$(wildcard ${PLAT_CERT_CREATE_HELPER_MK})) |
|
|
include ${PLAT_CERT_CREATE_HELPER_MK} |
|
|
include ${PLAT_CERT_CREATE_HELPER_MK} |
|
|
endif |
|
|
endif |
|
|
|
|
|
|
|
|
|
|
|
# Select OpenSSL version flag according to the OpenSSL build selected
|
|
|
|
|
|
# from setting the OPENSSL_DIR path.
|
|
|
|
|
|
$(eval $(call SELECT_OPENSSL_API_VERSION)) |
|
|
|
|
|
|
|
|
HOSTCCFLAGS := -Wall -std=c99 |
|
|
HOSTCCFLAGS := -Wall -std=c99 |
|
|
|
|
|
|
|
|
ifeq (${DEBUG},1) |
|
|
ifeq (${DEBUG},1) |
|
@ -60,6 +64,9 @@ else |
|
|
endif |
|
|
endif |
|
|
|
|
|
|
|
|
HOSTCCFLAGS += ${DEFINES} |
|
|
HOSTCCFLAGS += ${DEFINES} |
|
|
|
|
|
# USING_OPENSSL3 flag will be added to the HOSTCCFLAGS variable with the proper
|
|
|
|
|
|
# computed value.
|
|
|
|
|
|
HOSTCCFLAGS += -DUSING_OPENSSL3=$(USING_OPENSSL3) |
|
|
|
|
|
|
|
|
# Make soft links and include from local directory otherwise wrong headers
|
|
|
# Make soft links and include from local directory otherwise wrong headers
|
|
|
# could get pulled in from firmware tree.
|
|
|
# could get pulled in from firmware tree.
|
|
@ -76,11 +83,11 @@ LIB := -lssl -lcrypto |
|
|
|
|
|
|
|
|
HOSTCC ?= gcc |
|
|
HOSTCC ?= gcc |
|
|
|
|
|
|
|
|
.PHONY: all clean realclean |
|
|
.PHONY: all clean realclean --openssl |
|
|
|
|
|
|
|
|
all: ${BINARY} |
|
|
all: ${BINARY} |
|
|
|
|
|
|
|
|
${BINARY}: ${OBJECTS} Makefile |
|
|
${BINARY}: --openssl ${OBJECTS} Makefile |
|
|
@echo " HOSTLD $@" |
|
|
@echo " HOSTLD $@" |
|
|
@echo 'const char build_msg[] = "Built : "__TIME__", "__DATE__; \
|
|
|
@echo 'const char build_msg[] = "Built : "__TIME__", "__DATE__; \
|
|
|
const char platform_msg[] = "${PLAT_MSG}";' | \
|
|
|
const char platform_msg[] = "${PLAT_MSG}";' | \
|
|
@ -91,6 +98,11 @@ ${BINARY}: ${OBJECTS} Makefile |
|
|
@echo " HOSTCC $<" |
|
|
@echo " HOSTCC $<" |
|
|
${Q}${HOSTCC} -c ${HOSTCCFLAGS} ${INC_DIR} $< -o $@ |
|
|
${Q}${HOSTCC} -c ${HOSTCCFLAGS} ${INC_DIR} $< -o $@ |
|
|
|
|
|
|
|
|
|
|
|
--openssl: |
|
|
|
|
|
ifeq ($(DEBUG),1) |
|
|
|
|
|
@echo "Selected OpenSSL version: ${OPENSSL_CURRENT_VER}" |
|
|
|
|
|
endif |
|
|
|
|
|
|
|
|
clean: |
|
|
clean: |
|
|
$(call SHELL_DELETE_ALL, src/build_msg.o ${OBJECTS}) |
|
|
$(call SHELL_DELETE_ALL, src/build_msg.o ${OBJECTS}) |
|
|
|
|
|
|
|
|