summaryrefslogtreecommitdiffhomepage
path: root/common.mk
diff options
context:
space:
mode:
Diffstat (limited to 'common.mk')
-rw-r--r--common.mk8
1 files changed, 8 insertions, 0 deletions
diff --git a/common.mk b/common.mk
index 1f4c2df..5f4c77c 100644
--- a/common.mk
+++ b/common.mk
@@ -61,3 +61,11 @@ LIBS+=-lboost_filesystem -lpthread
LIBS+=-lSQLiteCpp $(shell pkg-config --libs qrcodegencpp GraphicsMagick++ fmt sqlite3)
LIBS+=-lreichwein
+SRC_ROOT=$(shell echo $(MAKEFILE_LIST) | tr " " "\n" | grep common.mk | sed -e 's/\([^ ]*\)common.mk/\1/g')
+ifeq ($(SRC_ROOT),)
+SRC_ROOT=.
+endif
+
+VERSION=$(shell dpkg-parsechangelog --show-field Version --file $(SRC_ROOT)/debian/changelog)
+CXXFLAGS+=-DWHITEBOARD_VERSION=\"$(VERSION)\"
+