diff options
author | Christian S <crian84@gmail.com> | 2020-03-03 20:56:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-03 20:56:08 +0100 |
commit | 5d1a8a836d21cdca47f65b09beb0aee31c4c2915 (patch) | |
tree | c8302df298c3b6fd565ca124b1b500248a61eb61 | |
parent | 765850c8f756f2b57ba4e9107b6fc7032c983712 (diff) | |
download | dwmblocks-5d1a8a836d21cdca47f65b09beb0aee31c4c2915.tar.gz dwmblocks-5d1a8a836d21cdca47f65b09beb0aee31c4c2915.tar.bz2 dwmblocks-5d1a8a836d21cdca47f65b09beb0aee31c4c2915.zip |
Makefile: Use DESTDIR/PREFIX and add uninstall
-rw-r--r-- | Makefile | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -1,3 +1,5 @@ +PREFIX ?= /usr/local + output: dwmblocks.o gcc dwmblocks.o -lX11 -o dwmblocks dwmblocks.o: dwmblocks.c config.h @@ -5,6 +7,8 @@ dwmblocks.o: dwmblocks.c config.h clean: rm *.o *.gch dwmblocks install: output - mkdir -p /usr/local/bin - cp -f dwmblocks /usr/local/bin - chmod 755 /usr/local/bin/dwmblocks + mkdir -p $(DESTDIR)$(PREFIX)/bin + cp -f dwmblocks $(DESTDIR)$(PREFIX)/bin + chmod 755 $(DESTDIR)$(PREFIX)/bin/dwmblocks +uninstall: + rm -f $(DESTDIR)$(PREFIX)/bin/dwmblocks |