From 50ad4e1b09e32148628427baa47e96fc829adb23 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Thu, 9 Jul 2020 23:56:31 -0400 Subject: Add -c to check SQL queries --- Makefile | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 47f6aa4..1f56ebf 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,8 @@ MANDIR ?= ${PREFIX}/share/man CFLAGS += -std=c11 -Wall -Wextra -Wpedantic LDLIBS = -lkcgi -lkcgihtml -lsqlite3 +TEST_DB = ~/.local/share/litterbox/litterbox.sqlite + -include config.mk OBJS += contexts.o @@ -13,13 +15,26 @@ OBJS += networks.o OBJS += search.o OBJS += server.o +dev: tags all test + +all: scooper + scooper: ${OBJS} ${CC} ${LDFLAGS} ${OBJS} ${LDLIBS} -o $@ ${OBJS}: server.h +test: .test + +.test: scooper + ./scooper -c ${TEST_DB} + touch .test + +tags: *.c *.h + ctags -w *.c *.h + clean: - rm -f scooper ${OBJS} + rm -f scooper ${OBJS} .test tags install: scooper scooper.1 install -d ${PREFIX}/bin ${MANDIR}/man1 -- cgit 1.4.1