summary refs log tree commit diff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-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