Move version into C file
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
#include "soundbank.h"
|
||||
|
||||
#include "list.h"
|
||||
#include "version.h"
|
||||
|
||||
static uint rng_seed = 0;
|
||||
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user