X-Git-Url: https://git.distorted.org.uk/~mdw/tig/blobdiff_plain/e2beda1801cd1be8aa8588b168750b7d85e8c87f..afdc35b3c4038d52405302058e70a78e88f01c89:/Makefile diff --git a/Makefile b/Makefile index 4d417c5..fb0e31e 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,14 @@ PREFIX = $(HOME) -LDFLAGS = -lcurses -CFLAGS = -Wall -DFLAGS = -g -DDEBUG +LDLIBS = -lcurses +CFLAGS = -Wall -O2 +DFLAGS = -g -DDEBUG -Werror PROGS = tig DOCS = tig.1.txt tig.1.html tig.1 README.html ifneq (,$(wildcard .git)) -CFLAGS += '-DVERSION="$(shell git-describe)"' +VERSION = $(shell git-describe) +WTDIRTY = $(shell git-diff-index --name-only HEAD 2>/dev/null) +CFLAGS += '-DVERSION="$(VERSION)$(if $(WTDIRTY),-dirty)"' endif all: $(PROGS)