mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-18 02:24:18 +00:00

This change migrates the values of `CC`, `CPP`, `AS` and other toolchain variables to the new `$(toolchain)-$(tool)` variables, which were introduced by the toolchain refactor patch. These variables should be equivalent to the values that they're replacing. Change-Id: I644fe4ce82ef1894bed129ddb4b6ab94fb04985d Signed-off-by: Chris Kay <chris.kay@arm.com>
51 lines
1,017 B
Makefile
51 lines
1,017 B
Makefile
#
|
|
# Copyright (C) 2018 Marvell International Ltd.
|
|
#
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
# https://spdx.org/licenses
|
|
|
|
toolchains := host
|
|
|
|
include ../../../make_helpers/toolchain.mk
|
|
|
|
PROJECT = doimage
|
|
OBJECTS = doimage.o
|
|
|
|
HOSTCCFLAGS = -Wall -Werror
|
|
ifeq (${DEBUG},1)
|
|
HOSTCCFLAGS += -g -O0 -DDEBUG
|
|
else
|
|
HOSTCCFLAGS += -O2
|
|
endif
|
|
|
|
ifeq (${MARVELL_SECURE_BOOT},1)
|
|
DOIMAGE_CC_FLAGS := -DCONFIG_MVEBU_SECURE_BOOT
|
|
DOIMAGE_LD_FLAGS := -lconfig -lmbedtls -lmbedcrypto -lmbedx509
|
|
endif
|
|
|
|
HOSTCCFLAGS += ${DOIMAGE_CC_FLAGS}
|
|
|
|
# Make soft links and include from local directory otherwise wrong headers
|
|
# could get pulled in from firmware tree.
|
|
INCLUDE_PATHS = -I.
|
|
|
|
RM := rm -rf
|
|
|
|
.PHONY: all clean
|
|
|
|
all: ${PROJECT}
|
|
|
|
${PROJECT}: ${OBJECTS} Makefile
|
|
@echo " HOSTLD $@"
|
|
${Q}$(host-cc) ${OBJECTS} ${DOIMAGE_LD_FLAGS} -o $@
|
|
@echo
|
|
@echo "Built $@ successfully"
|
|
@echo
|
|
|
|
%.o: %.c Makefile
|
|
@echo " HOSTCC $<"
|
|
${Q}$(host-cc) -c ${HOSTCCFLAGS} ${INCLUDE_PATHS} $< -o $@
|
|
|
|
clean:
|
|
${Q}${RM} ${PROJECT}
|
|
${Q}${RM} ${OBJECTS}
|