From d61b874c6e685cfc0de6c67bbb2db47442cdae8e Mon Sep 17 00:00:00 2001 From: bg Date: Wed, 14 Nov 2012 20:35:46 +0100 Subject: [PATCH] adding hashing of final hex file to make-system --- Makefile_main.inc | 8 +++++++- Makefile_sys_conf.inc | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile_main.inc b/Makefile_main.inc index 1edb660..f448e8d 100644 --- a/Makefile_main.inc +++ b/Makefile_main.inc @@ -191,7 +191,7 @@ endef $(foreach algo, $(ALGORITHMS), $(eval $(call TestBin_TEMPLATE, \ $(algo), \ - $(BIN_DIR)$(call lc, $(algo))/$(TEST_DIR)main-$(call lc, $(algo))-test.elf \ + $(BIN_DIR)$(call lc, $(algo))/$(TEST_DIR)main-$(call lc, $(algo))-test.hex \ ))) #------------------------------------------------------------------------------- @@ -210,6 +210,12 @@ $(foreach algo, $(ALGORITHMS), $(eval $(call Listing_TEMPLATE, \ %.hex: %.elf @echo "[objcopy]: $@" @$(OBJCOPY) -j .text -j .data -O ihex $< $@ +ifdef HASH_TOOL +ifneq ($(HASH_TOOL),) + @echo -n "[$(HASH_TOOL)]: " + @$(HASH_TOOL) $< +endif +endif #------------------------------------------------------------------------------- diff --git a/Makefile_sys_conf.inc b/Makefile_sys_conf.inc index 3135e17..74ea636 100644 --- a/Makefile_sys_conf.inc +++ b/Makefile_sys_conf.inc @@ -35,6 +35,7 @@ OBJCOPY = avr-objcopy OBJDUMP = avr-objdump SIZE = avr-size READELF = readelf +HASH_TOOL = sha256sum RUBY = ruby GET_TEST = host/get_test.rb MAKE = make -- 2.39.2