about summary refs log tree commit diff
path: root/Makefile
diff options
context:
space:
mode:
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