aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile13
1 files changed, 7 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 7970756..7a5c899 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,7 @@ CFLAGS?=-o2 -pipe
CFLAGS+=-Wall -Wextra -Wno-unused-parameter
CFLAGS+=$(shell $(PKGCONFIG) --cflags gtk+-3.0)
LDFLAGS+=$(shell $(PKGCONFIG) --libs gtk+-3.0)
+DESTDIR?=
PREFIX?=/usr/local
BINDIR?=$(PREFIX)/bin
APPDIR?=$(PREFIX)/share/applications
@@ -40,13 +41,13 @@ clean:
rm -rf $(SRCDIR)/resources.c
install: qwe qwe.desktop
- $(INSTALL) -m0755 qwe $(BINDIR)
- $(INSTALL) -m0644 qwe.desktop $(APPDIR)/qwe.desktop
- $(INSTALL) -m0444 doc/qwe.1 $(MANDIR)/qwe.1
+ $(INSTALL) -Dm0755 qwe $(DESTDIR)$(BINDIR)/qwe
+ $(INSTALL) -Dm0644 qwe.desktop $(DESTDIR)$(APPDIR)/qwe.desktop
+ $(INSTALL) -Dm0644 doc/qwe.1 $(DESTDIR)$(MANDIR)/qwe.1
uninstall:
- rm -f $(BINDIR)/qwe
- rm -f $(APPDIR)/qwe.desktop
- rm -f $(MANDIR)/qwe.1
+ rm -f $(DESTDIR)$(BINDIR)/qwe
+ rm -f $(DESTDIR)$(APPDIR)/qwe.desktop
+ rm -f $(DESTDIR)$(MANDIR)/qwe.1
.PHONY: all clean install uninstall