From 83d80ad1e20160b812717018d895a7d7c3f74b5b Mon Sep 17 00:00:00 2001 From: lonkaars Date: Tue, 10 May 2022 09:27:00 +0200 Subject: add build number to makefile --- robot/makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/robot/makefile b/robot/makefile index e4366d8..8ddcb28 100644 --- a/robot/makefile +++ b/robot/makefile @@ -18,6 +18,9 @@ AVRDUDE=avrdude CC=avr-gcc OBJ2HEX=avr-objcopy +BUILD_STR=$(shell git update-index -q --refresh; git describe --tags --dirty='*' --broken='x' | cut -c1-20) +CFLAGS += -DBUILD_STR="$(BUILD_STR)" + all: out.hex clean: @@ -31,6 +34,7 @@ a.out: $(OBJECTS) out.hex: a.out $(OBJ2HEX) -R .eeprom -O ihex $< $@ + $(info build $(BUILD_STR) complete) flash: out.hex $(AVRDUDE) -p $(AVRDUDE_DEVICE) -c avrisp2 -P $(PORT) -U flash:w:out.hex -- cgit v1.2.3