From ca25381b691a235aa0396e7e2ab5d9a8256dcbbd Mon Sep 17 00:00:00 2001 From: nirav Date: Tue, 23 Oct 2018 20:29:45 +0530 Subject: Updated makefile --- Makefile | 13 +++++++------ 1 file 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 -- cgit v1.2.3