From a9faca40b3929f22ad1e21c071c853af47b0b7bc Mon Sep 17 00:00:00 2001 From: Leonardo Taccari Date: Fri, 25 Sep 2020 10:47:42 +0200 Subject: Honor DESTDIR and PREFIX in {un,}install --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4d6545a..ae81666 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,17 @@ +PREFIX ?= /usr/local + x11_bsd_flags = -I/usr/X11R6/include -L/usr/X11R6/lib all: ${CC} ${CFLAGS} ${LDFLAGS} clipnotify.c -o clipnotify $(x11_bsd_flags) -lX11 -lXfixes install: all - cp clipnotify /usr/local/bin + mkdir -p ${DESTDIR}${PREFIX}/bin + cp -f clipnotify ${DESTDIR}${PREFIX}/bin + chmod 755 ${DESTDIR}${PREFIX}/bin/clipnotify uninstall: - rm /usr/local/bin/clipnotify + rm -f ${DESTDIR}${PREFIX}/bin/clipnotify clean: rm -f *.o *~ clipnotify -- cgit 1.4.1