summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index c48a819..baa334c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,5 @@
CC=gcc
+GIT_VERSION := "$(shell git describe --abbrev=4 --dirty --always --tags || cat VERSION)"
BINARY=blabouncer
ifeq ($(PREFIX),)
@@ -6,7 +7,7 @@ ifeq ($(PREFIX),)
endif
blabouncer: blabouncer.c functions.c sockets.c config.c replay.c logging.c message.c config.h functions.h logging.h message.h replay.h sockets.h structures.h
- $(CC) -D_DEFAULT_SOURCE -D_BSD_SOURCE -std=gnu99 -Wall -Wextra -lssl -lcrypto -o $(BINARY) blabouncer.c functions.c sockets.c config.c replay.c logging.c message.c
+ $(CC) -D_DEFAULT_SOURCE -D_BSD_SOURCE -DVERSION=\"$(GIT_VERSION)\" -std=gnu99 -Wall -Wextra -lssl -lcrypto -o $(BINARY) blabouncer.c functions.c sockets.c config.c replay.c logging.c message.c
.PHONY: clean
clean: