From ca19005e1da6cf6688cde2b89203cab1bd15529f Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Sat, 25 Sep 2021 04:58:05 -0400 Subject: [PATCH] Pass VERSION macro to src/common.cpp only. --- Makefile | 3 ++- src/common.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index af146c8f..84d827df 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,6 @@ VERSION_MAJOR := 2 VERSION := 2.git.$(shell git rev-parse --short HEAD) # VERSION := 2.0.0 -FLAGS += -DVERSION=$(VERSION) FLAGS += -Iinclude -Idep/include include arch.mk @@ -17,6 +16,8 @@ SOURCES += dep/pffft/pffft.c dep/pffft/fftpack.c SOURCES += $(wildcard src/*.c src/*/*.c) SOURCES += $(wildcard src/*.cpp src/*/*.cpp) +build/src/common.cpp.o: FLAGS += -D_APP_VERSION=$(VERSION) + STANDALONE_SOURCES += adapters/standalone.cpp FLAGS += -fPIC diff --git a/src/common.cpp b/src/common.cpp index 9193803f..62870fbb 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -19,7 +19,7 @@ const std::string APP_NAME = "VCV Rack"; const std::string APP_EDITION = "CE"; const std::string APP_EDITION_NAME = "Community Edition"; const std::string APP_VERSION_MAJOR = "2"; -const std::string APP_VERSION = TOSTRING(VERSION); +const std::string APP_VERSION = TOSTRING(_APP_VERSION); #if defined ARCH_WIN const std::string APP_ARCH = "win"; #elif ARCH_MAC