From 31169e4821d6bd14d35682da6d808ee96cfc0ae8 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Tue, 27 Oct 2020 19:01:58 -0400 Subject: Rewrite compat and add configure script --- Makefile | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index caaa9ac..5fac27e 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,8 @@ -PREFIX = /usr/local -MANDIR = ${PREFIX}/share/man -LIBRESSL_PREFIX = /usr/local +PREFIX ?= /usr/local +MANDIR ?= ${PREFIX}/share/man CFLAGS += -std=c11 -Wall -Wextra -Wpedantic -CFLAGS += ${LIBRESSL_PREFIX:%=-I%/include} -LDFLAGS += ${LIBRESSL_PREFIX:%=-L%/lib} -LDLIBS = -lcrypto -ltls +LDLIBS = -ltls -include config.mk @@ -15,15 +12,15 @@ OBJS += notemap.o notemap: ${OBJS} ${CC} ${LDFLAGS} ${OBJS} ${LDLIBS} -o $@ -${OBJS}: compat.h imap.h +${OBJS}: 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 + install -d ${DESTDIR}${PREFIX}/bin ${DESTDIR}${MANDIR}/man1 + install notemap ${DESTDIR}${PREFIX}/bin + install -m 644 notemap.1 ${DESTDIR}${MANDIR}/man1 uninstall: - rm -f ${PREFIX}/bin/notemap ${MANDIR}/man1/notemap.1.gz + rm -f ${DESTDIR}${PREFIX}/bin/notemap ${DESTDIR}${MANDIR}/man1/notemap.1 -- cgit 1.4.1