diff --git a/tpl/Makefile.unified b/tpl/Makefile.unified index edb6384..032d08b 100644 --- a/tpl/Makefile.unified +++ b/tpl/Makefile.unified @@ -2,8 +2,8 @@ include premake.make # git commit hash and version for this build COMMIT-HASH != git log 2>/dev/null | sed -e '1s/^commit //;q' -COMMIT := "const char* commit = \"$(COMMIT-HASH)\";" -VERSION := "const char* version = \"$(MAJOR).$(MINOR).$(PATCH)\";" +COMMIT := "static const char* commit = \"$(COMMIT-HASH)\";" +VERSION := "static const char* version = \"$(MAJOR).$(MINOR).$(PATCH)\";" # some important install locations PREFIX ?= /usr/local diff --git a/tpl/version.cpp b/tpl/version.cpp index 0df3638..e95f8bc 100644 --- a/tpl/version.cpp +++ b/tpl/version.cpp @@ -1,9 +1,9 @@ #include "version.hpp" -#include "version.inc" -#include "commit.inc" #include std::string {PROJECT}_version() { +#include "version.inc" +#include "commit.inc" std::ostringstream oss; oss << "{PROJECT} version " << version; #ifdef DEBUG