summary refs log tree commit diff
path: root/Makefile
blob: caaa9ac3b6ebb51dc169954b7678b3a8ddb8fba7 (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
PREFIX = /usr/local
MANDIR = ${PREFIX}/share/man
LIBRESSL_PREFIX = /usr/local

CFLAGS += -std=c11 -Wall -Wextra -Wpedantic
CFLAGS += ${LIBRESSL_PREFIX:%=-I%/include}
LDFLAGS += ${LIBRESSL_PREFIX:%=-L%/lib}
LDLIBS = -lcrypto -ltls

-include config.mk

OBJS += imap.o
OBJS += notemap.o

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

${OBJS}: compat.h imap.h

clean:
	rm -f notemap ${OBJS}

install: notemap notemap.1
	install -d ${PREFIX}/bin ${MANDIR}/man1
	install notemap ${PREFIX}/bin
	gzip -c notemap.1 > ${MANDIR}/man1/notemap.1.gz

uninstall:
	rm -f ${PREFIX}/bin/notemap ${MANDIR}/man1/notemap.1.gz