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

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

BINS = imbox git-fetch-email
MANS = ${BINS:=.1}

-include config.mk

OBJS += imap.o
OBJS += imbox.o

all: ${BINS}

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

${OBJS}: imap.h

clean:
	rm -f ${BINS} ${OBJS}

install: ${BINS} ${MANS}
	install -d ${DESTDIR}${PREFIX}/bin ${DESTDIR}${MANDIR}/man1
	install ${BINS} ${DESTDIR}${PREFIX}/bin
	install -m 644 ${MANS} ${DESTDIR}${MANDIR}/man1

uninstall:
	rm -f ${BINS:%=${PREFIX}/bin/%} ${MANS:%=${MANDIR}/man1/%}