summary refs log tree commit diff
path: root/Makefile
blob: 271d28fb84a618166f3f6fa7c33e0a74d08a9e73 (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
PREFIX ?= ~/.local
BINDIR ?= ${PREFIX}/bin
MANDIR ?= ${PREFIX}/man

CFLAGS += -std=c11 -Wall -Wextra -Wpedantic -Wno-overlength-strings
LDADD.kcgi = -lkcgi
LDADD.kcgi-html = -lkcgihtml
LDADD.sqlite3 = -lsqlite3

LITTERBOX = litterbox
TEST_DB = litterbox.sqlite

-include config.mk

LDLIBS = ${LDADD.kcgi} ${LDADD.kcgi-html} ${LDADD.sqlite3}

OBJS += contexts.o
OBJS += css.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} ${STATIC} ${LDFLAGS} ${OBJS} ${LDLIBS} -o $@

${OBJS}: server.h

css.c: css.sh default.css color.css
	sh css.sh default.css color.css > $@

test: .test

.test: scooper
	${LITTERBOX} -i -d ${TEST_DB}
	./scooper -c ${TEST_DB}
	rm ${TEST_DB} ${TEST_DB}-*
	touch $@

tags: *.[ch]
	ctags -w *.[ch]

clean:
	rm -f scooper ${OBJS} css.c .test tags

install: scooper scooper.1
	install -d ${DESTDIR}${BINDIR} ${DESTDIR}${MANDIR}/man1
	install scooper ${DESTDIR}${BINDIR}
	install -m 644 scooper.1 ${DESTDIR}${MANDIR}/man1

uninstall:
	rm -f ${DESTDIR}${BINDIR}/scooper ${DESTDIR}${MANDIR}/man1/scooper.1
-17Add mailing list archive to READMEJune McEnroe 2021-06-10Stop accumulating ISUPPORT tokens once MOTD startsJune McEnroe 2021-06-09Use seprintf for snip, removing strlcpynJune McEnroe 2021-06-09Use seprintf for reserializeJune McEnroe 2021-06-09Use seprintf for capListJune McEnroe 2021-06-09Add seprintfJune McEnroe 2021-05-27Add pounce-notify to README 2.4June McEnroe 2021-05-27Fix ENVIRONMENT formatting in pounce-notify(1)June McEnroe 2021-05-27Add note about Libera.Chat SASL-only rangesJune McEnroe 2021-05-25Add QUIRKS fileJune McEnroe 2021-05-19Replace freenode with tilde.chatJune McEnroe 2021-05-04notify: Reword pounce-notify manualJune McEnroe 2021-05-02Clean up Makefiles, configure scriptsJune McEnroe 2021-04-30palaver: Exit on getopt failureJune McEnroe 2021-04-30notify: Implement pounce-notifyJune McEnroe