summary refs log tree commit diff
path: root/Makefile
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-12-16 17:06:16 -0500
committerJune McEnroe <june@causal.agency>2020-12-16 17:06:16 -0500
commitc3ede99d15304078619415f6a5fb42e88402949b (patch)
treef815b71f98bc27157135c5cce410171cc1ca9348 /Makefile
parentTake username as a required positional argument (diff)
downloadnotemap-c3ede99d15304078619415f6a5fb42e88402949b.tar.gz
notemap-c3ede99d15304078619415f6a5fb42e88402949b.zip
Add git-notemap wrapper
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 11 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 1fd5a03..5475b97 100644
--- a/Makefile
+++ b/Makefile
@@ -6,22 +6,29 @@ LDLIBS = -ltls
 
 -include config.mk
 
+BINS = notemap git-notemap
+
 OBJS += getservinfo.o
 OBJS += imap.o
 OBJS += notemap.o
 
+all: ${BINS}
+
 notemap: ${OBJS}
 	${CC} ${LDFLAGS} ${OBJS} ${LDLIBS} -o $@
 
 ${OBJS}: imap.h
 
 clean:
-	rm -f notemap ${OBJS}
+	rm -f ${BINS} ${OBJS}
 
-install: notemap notemap.1
+install: ${BINS} notemap.1
 	install -d ${DESTDIR}${PREFIX}/bin ${DESTDIR}${MANDIR}/man1
-	install notemap ${DESTDIR}${PREFIX}/bin
+	install ${BINS} ${DESTDIR}${PREFIX}/bin
 	install -m 644 notemap.1 ${DESTDIR}${MANDIR}/man1
+	ln -fs notemap.1 ${DESTDIR}${MANDIR}/man1/git-notemap.1
 
 uninstall:
-	rm -f ${DESTDIR}${PREFIX}/bin/notemap ${DESTDIR}${MANDIR}/man1/notemap.1
+	rm -f ${BINS:%=${DESTDIR}${PREFIX}/bin/%}
+	rm -f ${DESTDIR}${MANDIR}/man1/notemap.1
+	rm -f ${DESTDIR}${MANDIR}/man1/git-notemap.1