build(tools): avoid unnecessary link

In their respective makefiles, cert_create, encrypt_fw and fiptool
depend on the --openssl phony target as a prerequisite. This forces
those tools to be re-linked each time.

Move the dependencies on the --openssl target from the tools to their
makefiles all targets, to avoid unnecessary linking while preserving the
OpenSSL version printing done in the --openssl targets when in debug.

Fixes: cf2dd17ddd ("refactor(security): add OpenSSL 1.x compatibility")
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Change-Id: I98a3ab30f36dffc253cecaaf3a57d2712522135d
This commit is contained in:
Vincent Stehlé 2023-07-04 16:14:02 +02:00
parent e69400cfa6
commit aa57ce632c
3 changed files with 6 additions and 6 deletions

View File

@ -85,9 +85,9 @@ HOSTCC ?= gcc
.PHONY: all clean realclean --openssl
all: ${BINARY}
all: --openssl ${BINARY}
${BINARY}: --openssl ${OBJECTS} Makefile
${BINARY}: ${OBJECTS} Makefile
@echo " HOSTLD $@"
@echo 'const char build_msg[] = "Built : "__TIME__", "__DATE__; \
const char platform_msg[] = "${PLAT_MSG}";' | \

View File

@ -65,9 +65,9 @@ HOSTCC ?= gcc
.PHONY: all clean realclean --openssl
all: ${BINARY}
all: --openssl ${BINARY}
${BINARY}: --openssl ${OBJECTS} Makefile
${BINARY}: ${OBJECTS} Makefile
@echo " HOSTLD $@"
@echo 'const char build_msg[] = "Built : "__TIME__", "__DATE__;' | \
${HOSTCC} -c ${HOSTCCFLAGS} -xc - -o src/build_msg.o

View File

@ -68,9 +68,9 @@ DEPS := $(patsubst %.o,%.d,$(OBJECTS))
.PHONY: all clean distclean --openssl
all: ${PROJECT}
all: --openssl ${PROJECT}
${PROJECT}: --openssl ${OBJECTS} Makefile
${PROJECT}: ${OBJECTS} Makefile
@echo " HOSTLD $@"
${Q}${HOSTCC} ${OBJECTS} -o $@ ${LDLIBS}
@${ECHO_BLANK_LINE}