adding hashing of final hex file to make-system

This commit is contained in:
bg 2012-11-14 20:35:46 +01:00
parent 39983bbdb6
commit d61b874c6e
2 changed files with 8 additions and 1 deletions

View File

@ -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
#-------------------------------------------------------------------------------

View File

@ -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