Move version into C file

This commit is contained in:
Rickey Fehr
2025-09-24 20:44:13 -07:00
parent 56bbc2ff9a
commit 36bcf0fa30
3 changed files with 2 additions and 8 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ CFLAGS += $(INCLUDE)
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions
ASFLAGS := -g $(ARCH)
LDFLAGS = -g $(ARCH) -Wl,-Map,$(notdir $*.map)
LDFLAGS = -g $(ARCH) -Wl,-Map,$(notdir $*.map),--undefined=balatro_version
#---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project
-1
View File
@@ -28,7 +28,6 @@
#include "soundbank.h"
#include "list.h"
#include "version.h"
static uint rng_seed = 0;
+1 -6
View File
@@ -1,6 +1,3 @@
#ifndef VERSION_H
#define VERSION_H
#ifndef GIT_HASH
#define GIT_HASH "undef"
#endif
@@ -9,7 +6,5 @@
#define GIT_DIRTY "-dirty"
#endif
__attribute__((used))
__attribute__((section(".version"), used))
const char balatro_version[] = "GBALATRO_VERSION:" GIT_HASH GIT_DIRTY;
#endif // VERSION_H