+PREFIX = $(HOME)
+LDLIBS = -lcurses
+CFLAGS = -Wall -O2
+DFLAGS = -g -DDEBUG -Werror
+PROGS = tig
+DOCS = tig.1.txt tig.1.html tig.1 tigrc.5.html tigrc.5 \
+ manual.html manual.html-chunked README.html
+
+ifneq (,$(wildcard .git))
+VERSION = $(shell git-describe)
+WTDIRTY = $(shell git-diff-index --name-only HEAD 2>/dev/null)
+CFLAGS += '-DVERSION="$(VERSION)$(if $(WTDIRTY),-dirty)"'
+endif