summaryrefslogtreecommitdiffhomepage
path: root/common.mk
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2023-01-27 19:42:08 +0100
committerRoland Reichwein <mail@reichwein.it>2023-01-27 19:42:08 +0100
commitf44d36b05e43cabde31aeaba5d25fded140345a1 (patch)
tree1024a76cb1ae671c9445dcc379cb9eddd26922aa /common.mk
parent789e5555ab4c44a1ae779eccf6ccf8340602cf22 (diff)
Added diff.cpp
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)\"
+