about summary refs log tree commit diff
path: root/Makefile
blob: 95772a3f154596857c9f7996d3c5bee80005a570 (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
PREFIX ?= /usr/local
BINDIR ?= ${PREFIX}/bin
MANDIR ?= ${PREFIX}/man

CFLAGS += -std=c11 -Wall -Wextra -Wpedantic

LDADD.libtls = -ltls
LDADD.libiconv =
LDADD.resolv =

-include config.mk

LDLIBS = ${LDADD.libtls} ${LDADD.libiconv} ${LDADD.resolv}

OBJS += archive.o
OBJS += atom.o
OBJS += concat.o
OBJS += decode.o
OBJS += export.o
OBJS += getservinfo.o
OBJS += html.o
OBJS += imap.o
OBJS += mbox.o
OBJS += parse.o
OBJS += stylesheet.o
OBJS += template.o

dev: tags all

all: bubger

bubger: ${OBJS}
	${CC} ${LDFLAGS} ${OBJS} ${LDLIBS} -o $@

${OBJS}: archive.h imap.h

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

clean:
	rm -f bubger ${OBJS} tags

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

uninstall:
	rm -f ${DESTDIR}${BINDIR}/bubger ${DESTDIR}${MANDIR}/man1/bubger.1