diff options
-rw-r--r-- | INSTALL | 1 | ||||
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | VERSION | 1 | ||||
-rw-r--r-- | functions.h | 2 |
4 files changed, 5 insertions, 2 deletions
@@ -9,6 +9,7 @@ To compile: - a C compiler - glibc - OpenSSL +- Git (optional - used to define VERSION if installed) To run: @@ -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: @@ -0,0 +1 @@ +v0.2-git diff --git a/functions.h b/functions.h index 30ae4e4..6ec2c28 100644 --- a/functions.h +++ b/functions.h @@ -55,7 +55,7 @@ #define MAXTOKENS 100 // For strsep string splitting -#define VERSION "0.2-git" // Blabouncer version +//#define VERSION "" // VERSION is now passed via -DVERSION by the Makefile // Write debug string to file. // Debug level is provided by level, set to one of DEBUG_CRIT, DEBUG_SOME or DEBUG_FULL. |