Makefile: Use DESTDIR and PREFIX

This commit is contained in:
crian 2020-03-02 13:36:26 +01:00
parent fefab14bee
commit 9c9e08d2bc
No known key found for this signature in database
GPG Key ID: 313858BD269FBEC7

View File

@ -1,7 +1,9 @@
PREFIX ?= /usr/local
output: dwmblocks.c blocks.h
cc `pkg-config --cflags x11` `pkg-config --libs x11` dwmblocks.c -o dwmblocks
clean:
rm -f *.o *.gch dwmblocks
install: output
mkdir -p /usr/local/bin
cp -f dwmblocks /usr/local/bin
mkdir -p $(DESTDIR)$(PREFIX)/bin
cp -f dwmblocks $(DESTDIR)$(PREFIX)/bin