summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index b7b35a5..d0d8b7d 100644
--- a/Makefile
+++ b/Makefile
@@ -62,6 +62,10 @@ else ifneq ($(findstring Darwin,$(UNAME)),)
endif
TARGET_NAME := gpsp
+GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)"
+ifneq ($(GIT_VERSION)," unknown")
+ CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
+endif
LIBM := -lm
CORE_DIR := .
LDFLAGS :=