mk: add version numbers to compiler flags (#162)

This commit is contained in:
Alfred E. Heggestad 2018-10-16 08:57:31 +02:00 committed by Richard Aas
parent ee6b5e0a91
commit 7394ee407a
2 changed files with 6 additions and 1 deletions

View file

@ -10,7 +10,7 @@ VER_MINOR := 5
VER_PATCH := 9
PROJECT := re
VERSION := 0.5.9
VERSION := $(VER_MAJOR).$(VER_MINOR).$(VER_PATCH)
MK := mk/re.mk

View file

@ -610,6 +610,11 @@ CCACHE := $(shell [ -e /usr/bin/ccache ] 2>/dev/null \
|| [ -e /opt/local/bin/ccache ] \
&& echo "ccache")
CFLAGS += -DVERSION=\"$(VERSION)\"
CFLAGS += \
-DVER_MAJOR=$(VER_MAJOR) \
-DVER_MINOR=$(VER_MINOR) \
-DVER_PATCH=$(VER_PATCH)
# Enable gcov Coverage testing
#