diff --git a/include/version.h b/include/version.h index 35caffda..111f4e72 100644 --- a/include/version.h +++ b/include/version.h @@ -11,7 +11,7 @@ #define PACKAGE_VERSION_MAJOR (0) #define PACKAGE_VERSION_MINOR (3) -#define PACKAGE_VERSION_PATCH (9) +#define PACKAGE_VERSION_PATCH (10) const char *get_package_version_string(void); diff --git a/src/asm/symbol.c b/src/asm/symbol.c index 9d969539..ae3a7f68 100644 --- a/src/asm/symbol.c +++ b/src/asm/symbol.c @@ -566,6 +566,10 @@ void sym_Init(void) _RSSymbol->isBuiltin = true; + sym_AddEqu("__RGBDS_MAJOR__", PACKAGE_VERSION_MAJOR); + sym_AddEqu("__RGBDS_MINOR__", PACKAGE_VERSION_MINOR); + sym_AddEqu("__RGBDS_PATCH__", PACKAGE_VERSION_PATCH); + time_t now = time(NULL); if (now == (time_t)-1) { diff --git a/test/asm/version.asm b/test/asm/version.asm new file mode 100644 index 00000000..e8456849 --- /dev/null +++ b/test/asm/version.asm @@ -0,0 +1 @@ +PRINTT "RGBDS version {__RGBDS_MAJOR__}.{__RGBDS_MINOR__}.{__RGBDS_PATCH__}\n" diff --git a/test/asm/version.err b/test/asm/version.err new file mode 100644 index 00000000..e69de29b diff --git a/test/asm/version.out b/test/asm/version.out new file mode 100644 index 00000000..c7680749 --- /dev/null +++ b/test/asm/version.out @@ -0,0 +1 @@ +RGBDS version $0.$3.$A