summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 2 insertions, 0 deletions
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