From 415b5ba67bd7f07dcb87d4841da69b0c3254e5c0 Mon Sep 17 00:00:00 2001 From: Gregor Richards Date: Fri, 9 Dec 2016 18:42:12 -0500 Subject: Report git version with library_version --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Makefile') 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 := -- cgit v1.2.3