From 63122bacb531f01c4c3589b36417580fa09428bd Mon Sep 17 00:00:00 2001 From: Vadim Mikhailov Date: Tue, 19 Sep 2017 20:09:49 -0700 Subject: Use program version from git tag This should fix issue #51. --- Makefile | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index ce19e70..7074cbf 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,8 @@ RM := rm -rf CC ?= gcc CFLAGS ?= -g -O0 CFLAGS += -Wall -Wextra -std=c99 -pedantic +GIT_VERSION := $(shell git describe --abbrev=4 --dirty --always --tags) +CFLAGS += -DPROGRAM_VERSION=\"$(GIT_VERSION)\" ifeq ($(UNAME_S),Linux) LDFLAGS += -Wl,-z,relro -lusb-1.0 -- cgit v1.2.3