From e72bd7a99e2ceb0c7f1554c2bb26da624fba9a4d Mon Sep 17 00:00:00 2001 From: Nathan Date: Sat, 14 Dec 2024 12:14:21 -0700 Subject: [PATCH] Adjust version defines to avoid name collisions and improve usage ergonomics (#45) * Rename `VERSION` define to `BUILD_VERSION` to avoid some possible name collisions * Set a unique define per game version in addition to the `BUILD_VERSION` define --- configure.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configure.py b/configure.py index 511ff9c..4b35b5d 100755 --- a/configure.py +++ b/configure.py @@ -157,7 +157,8 @@ config.asflags = [ "--strip-local-absolute", "-I include", f"-I build/{config.version}/include", - f"--defsym version={version_num}", + f"--defsym BUILD_VERSION={version_num}", + f"--defsym VERSION_{config.version}", ] config.ldflags = [ "-fp hardware", @@ -198,7 +199,8 @@ cflags_base = [ "-multibyte", # For Wii compilers, replace with `-enc SJIS` "-i include", f"-i build/{config.version}/include", - f"-DVERSION={version_num}", + f"-DBUILD_VERSION={version_num}", + f"-DVERSION_{config.version}", ] # Debug flags