PREFIX ?= ~/.local 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 OBJS += events.o OBJS += html.o 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 server.o: default.css.h default.css.h: default.css color.css cat default.css color.css | file2c > $@ test: .test .test: scooper ./scooper -c ${TEST_DB} touch .test tags: *.c *.h ctags -w *.c *.h clean: rm -f scooper ${OBJS} .test tags install: scooper scooper.1 install -d ${PREFIX}/bin ${MANDIR}/man1 install scooper ${PREFIX}/bin install -m 644 scooper.1 ${MANDIR}/man1 uninstall: rm -f ${PREFIX}/bin/scooper ${MANDIR}/man1/scooper.1