summary refs log tree commit diff
path: root/Makefile
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-07-09 23:56:31 -0400
committerJune McEnroe <june@causal.agency>2020-07-09 23:56:31 -0400
commit50ad4e1b09e32148628427baa47e96fc829adb23 (patch)
tree4efc749c560d49615b466de832d5514291b56b99 /Makefile
parentAdd before param in redirect (diff)
downloadscooper-50ad4e1b09e32148628427baa47e96fc829adb23.tar.gz
scooper-50ad4e1b09e32148628427baa47e96fc829adb23.zip
Add -c to check SQL queries
Diffstat (limited to '')
-rw-r--r--Makefile17
1 files changed, 16 insertions, 1 deletions
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