about summary refs log tree commit diff
path: root/Makefile
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-10-29 11:34:56 -0400
committerJune McEnroe <june@causal.agency>2020-10-29 11:35:34 -0400
commitf17f882b5e748c71d9365d8769711d8ff8af015f (patch)
tree9eadef4e8d2cf8eb2bc010b0edd2a506e4f12286 /Makefile
parentRefactor IMAP struct (diff)
downloadimbox-f17f882b5e748c71d9365d8769711d8ff8af015f.tar.gz
imbox-f17f882b5e748c71d9365d8769711d8ff8af015f.zip
Rewrite compat and add configure script
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 7 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index a22cd7c..925b713 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,7 @@
-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 = -ltls
 
 BINS = imbox git-fetch-email
@@ -20,15 +17,15 @@ all: ${BINS}
 imbox: ${OBJS}
 	${CC} ${LDFLAGS} ${OBJS} ${LDLIBS} -o $@
 
-${OBJS}: compat.h imap.h
+${OBJS}: imap.h
 
 clean:
 	rm -f ${BINS} ${OBJS}
 
 install: ${BINS} ${MANS}
-	install -d ${PREFIX}/bin ${MANDIR}/man1
-	install ${BINS} ${PREFIX}/bin
-	for man in ${MANS}; do gzip -c $$man > ${MANDIR}/man1/$$man.gz; done
+	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/%.gz}
+	rm -f ${BINS:%=${PREFIX}/bin/%} ${MANS:%=${MANDIR}/man1/%}
/td>Document channel keys in join optionJune McEnroe 2021-06-18Use | to separate flags from config optionsJune McEnroe 2021-06-18Stop referring to server-time as IRCv3.2June McEnroe 2021-06-17Add mailing list archive to READMEJune McEnroe 2021-06-10Stop accumulating ISUPPORT tokens once MOTD startsJune McEnroe 2021-06-09Use seprintf for snip, removing strlcpynJune McEnroe 2021-06-09Use seprintf for reserializeJune McEnroe 2021-06-09Use seprintf for capListJune McEnroe 2021-06-09Add seprintfJune McEnroe 2021-05-27Add pounce-notify to README 2.4June McEnroe 2021-05-27Fix ENVIRONMENT formatting in pounce-notify(1)June McEnroe 2021-05-27Add note about Libera.Chat SASL-only rangesJune McEnroe 2021-05-25Add QUIRKS fileJune McEnroe 2021-05-19Replace freenode with tilde.chatJune McEnroe 2021-05-04notify: Reword pounce-notify manualJune McEnroe 2021-05-02Clean up Makefiles, configure scriptsJune McEnroe 2021-04-30palaver: Exit on getopt failureJune McEnroe 2021-04-30notify: Implement pounce-notifyJune McEnroe