summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 011a4306ba87fe6402784d219fdfb217c5fc2c70 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
PREFIX ?= /usr/local
BINDIR ?= /bin

CFLAGS = -std=c99 -D_XOPEN_SOURCE=700 -Wunused-function -Wunused-variable \
		 -Wconversion -Wsign-compare -Wuninitialized
LDFLAGS = -lcurses

ifeq ($(DEBUG),1)
	CFLAGS += -fsanitize=address -Og -g
else
	CFLAGS += -O3
endif

CFLAGS += $(CFLAGS_EXTRA)

all: tquery

clean:
	rm -f tquery

cleanall: clean

tquery: tquery.c

install:
	install -m755 tquery -t "$(DESTDIR)$(PREFIX)$(BINDIR)"

uninstall:
	rm -f "$(DESTDIR)$(PREFIX)$(BINDIR)/tquery"

.PHONY: all clean cleanall install uninstall