From 7fbbda610828377fe328ad6dcef80ae05ada9ff0 Mon Sep 17 00:00:00 2001 From: Martin Hauke Date: Thu, 6 Aug 2020 22:38:31 +0200 Subject: firmware/makefile: Add GIT_SHORTHASH GIT_SHORTHASH is used by the recently introduced snake game. Change-Id: I837e3dcc5c44e64ca7f6c243c08981ed01f35dd1 --- src/target/firmware/Makefile.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/target/firmware/Makefile.inc b/src/target/firmware/Makefile.inc index a91cf4f8..2be240d2 100644 --- a/src/target/firmware/Makefile.inc +++ b/src/target/firmware/Makefile.inc @@ -39,6 +39,7 @@ Q_SIZE = $(if $(V:1=),@echo " SIZE $@";) #### GIT VERSION #### GIT_COMMIT:=$(shell git describe --always) +GIT_SHORTHASH:=$(shell git rev-parse --short HEAD) GIT_MODIFIED:=$(shell (git status | grep "modified:\|added:\|deleted:" -q) && echo "-modified") GIT_REVISION:=$(GIT_COMMIT)$(GIT_MODIFIED) @@ -46,6 +47,9 @@ GIT_REVISION:=$(GIT_COMMIT)$(GIT_MODIFIED) ASFLAGS += -DGIT_REVISION=\"$(GIT_REVISION)\" CFLAGS += -DGIT_REVISION=\"$(GIT_REVISION)\" +ASFLAGS += -DGIT_SHORTHASH=\"$(GIT_SHORTHASH)\" +CFLAGS += -DGIT_SHORTHASH=\"$(GIT_SHORTHASH)\" + #### GLOBAL DATA #### ALL_OBJS= -- cgit v1.2.3