Add git hash baked into ROM for bug reports
This commit is contained in:
@@ -38,11 +38,17 @@ GRAPHICS := graphics
|
|||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
ARCH := -mthumb -mthumb-interwork
|
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\
|
CFLAGS := -g -O3 -Wall -Werror\
|
||||||
-mcpu=arm7tdmi -mtune=arm7tdmi \
|
-mcpu=arm7tdmi -mtune=arm7tdmi \
|
||||||
-ffast-math -fomit-frame-pointer -funroll-loops \
|
-ffast-math -fomit-frame-pointer -funroll-loops \
|
||||||
$(ARCH)
|
$(ARCH)
|
||||||
|
|
||||||
|
CFLAGS += $(GIT_C_FLAGS)
|
||||||
|
|
||||||
CFLAGS += $(INCLUDE)
|
CFLAGS += $(INCLUDE)
|
||||||
|
|
||||||
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions
|
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
#ifndef VERSION_H
|
||||||
|
#define VERSION_H
|
||||||
|
|
||||||
|
__attribute__((used))
|
||||||
|
const char gba_version[] = "GBA_VERSION:" GIT_HASH GIT_DIRTY;
|
||||||
|
|
||||||
|
#endif // VERSION_H
|
||||||
@@ -28,6 +28,7 @@
|
|||||||
#include "soundbank.h"
|
#include "soundbank.h"
|
||||||
|
|
||||||
#include "list.h"
|
#include "list.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
static uint rng_seed = 0;
|
static uint rng_seed = 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user