PREFIX = $(HOME)
-LDFLAGS = -lcurses
-CFLAGS = '-DVERSION="$(VERSION)"' -Wall
-DFLAGS = -g -DDEBUG
+LDLIBS = -lcurses
+CFLAGS = -Wall
+DFLAGS = -g -DDEBUG -Werror
PROGS = tig
DOCS = tig.1.txt tig.1.html tig.1 README.html
-VERSION = $(shell git-describe)
+
+ifneq (,$(wildcard .git))
+CFLAGS += '-DVERSION="$(shell git-describe)"'
+endif
all: $(PROGS)
all-debug: $(PROGS)