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

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

-include config.mk

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

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

${OBJS}: imap.h

clean:
	rm -f notemap ${OBJS}

install: notemap notemap.1
	install -d ${DESTDIR}${PREFIX}/bin ${DESTDIR}${MANDIR}/man1
	install notemap ${DESTDIR}${PREFIX}/bin
	install -m 644 notemap.1 ${DESTDIR}${MANDIR}/man1

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