Add a git revision to all debug builds...

This commit is contained in:
Jan Vidar Krey
2009-06-23 16:11:30 +02:00
parent ca33461851
commit 2ad2b66db3
2 changed files with 11 additions and 1 deletions

View File

@@ -69,8 +69,10 @@ LDFLAGS += -L/source/libevent
-include release_setup.mk
ifeq ($(RELEASE),YES)
CFLAGS += -Os -DNDEBUG
GIT_REVISION ?= NO
else
CFLAGS += -g -DDEBUG
GIT_REVISION ?= YES
endif
ifeq ($(STACK_PROTECT),YES)
@@ -127,6 +129,10 @@ CFLAGS += -I$(LIBEVENT_PATH)
LDFLAGS += -L$(LIBEVENT_PATH)
endif
ifeq ($(GIT_REVISION),YES)
CFLAGS += -DGIT_REVISION=\"-git:$(shell git show --oneline | head -n 1 | cut -f 1 -d " ")\"
endif
# Sources
libuhub_SOURCES := \
src/auth.c \