diff options
author | Martin Hauke <mardnh@gmx.de> | 2020-08-06 22:38:31 +0200 |
---|---|---|
committer | Martin Hauke <mardnh@gmx.de> | 2020-08-06 22:38:31 +0200 |
commit | 7fbbda610828377fe328ad6dcef80ae05ada9ff0 (patch) | |
tree | 9e071df618420a3ad4bc76287b8abed017e088b2 /src | |
parent | 611bb0a7e9066825ed01b0f5d119c12a877bed97 (diff) |
firmware/makefile: Add GIT_SHORTHASH
GIT_SHORTHASH is used by the recently introduced snake game.
Change-Id: I837e3dcc5c44e64ca7f6c243c08981ed01f35dd1
Diffstat (limited to 'src')
-rw-r--r-- | src/target/firmware/Makefile.inc | 4 |
1 files changed, 4 insertions, 0 deletions
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= |