Add git hash baked into ROM for bug reports

This commit is contained in:
Rickey Fehr
2025-09-23 16:15:50 -07:00
parent 74739d87ed
commit ebe789aa52
3 changed files with 14 additions and 0 deletions
+6
View File
@@ -38,11 +38,17 @@ GRAPHICS := graphics
#---------------------------------------------------------------------------------
ARCH := -mthumb -mthumb-interwork
GIT_DIRTY := $(shell git diff-index --quiet HEAD -- || echo "-dirty")
GIT_HASH := $(shell git rev-parse --short HEAD)
GIT_C_FLAGS := -DGIT_HASH=\"$(GIT_HASH)\" -DGIT_DIRTY=\"$(GIT_DIRTY)\"
CFLAGS := -g -O3 -Wall -Werror\
-mcpu=arm7tdmi -mtune=arm7tdmi \
-ffast-math -fomit-frame-pointer -funroll-loops \
$(ARCH)
CFLAGS += $(GIT_C_FLAGS)
CFLAGS += $(INCLUDE)
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions