summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJon Medhurst <tixy@linaro.org>2014-02-17 12:18:24 +0000
committerDan Handley <dan.handley@arm.com>2014-03-05 16:21:14 +0000
commitfb05246201a2d708fb4f3d5febf47e1fc931fa7e (patch)
treec233476c8c9ff2442d58a5f1d18184fa12c16a99 /Makefile
parent38aa76a87f6cc3e955fabe181e121fe26a4ecd63 (diff)
Generate build time and date message at link time.
So it updates each time a bootloader changes, not just when bl*_main.c files are recompiled. Fixes ARM-software/tf-issues#33 Change-Id: Ie8e1a7bd7e1913d2e96ac268606284f76af8c5ab Signed-off-by: Jon Medhurst <tixy@linaro.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index d0b18c9d..e1a35011 100644
--- a/Makefile
+++ b/Makefile
@@ -353,8 +353,11 @@ $(BUILD_DIR) :
$(ELF) : $(OBJS) $(LINKERFILE)
@echo " LD $$@"
+ @echo 'const char build_message[] = "Built : "__TIME__", "__DATE__;' | \
+ $$(CC) $$(CFLAGS) -xc - -o $(BUILD_DIR)/build_message.o
$$(Q)$$(LD) -o $$@ $$(LDFLAGS) -Map=$(MAPFILE) --script $(LINKERFILE) \
- --entry=$(BL$(1)_ENTRY_POINT) $(OBJS)
+ --entry=$(BL$(1)_ENTRY_POINT) $(OBJS) \
+ $(BUILD_DIR)/build_message.o
$(DUMP) : $(ELF)
@echo " OD $$@"