From ab0c27611be891841f5d7f250ae95c3a9895c145 Mon Sep 17 00:00:00 2001 From: "Dmitrij D. Czarkoff" Date: Fri, 25 Dec 2015 15:07:03 +0100 Subject: Use "PREFIX" instead of "prefix" Most package management systems already expect "PREFIX" macro to control installation path. --- Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 861a237..f07141f 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ .PHONY: clean check install uninstall -prefix = /usr +PREFIX ?= /usr CFLAGS = -W -Wall -Wpedantic -std=gnu11 `sdl2-config --cflags` LDFLAGS = `sdl2-config --libs` -lfreeimage -lSDL2_ttf -lfontconfig -lpthread @@ -40,11 +40,11 @@ clean: @$(RM) $(TARGET) $(OBJECTS) $(TESTS) install: $(TARGET) - install -D -m 0755 $(TARGET) $(DESTDIR)$(prefix)/bin/imv - install -D -m 0644 doc/imv.1 $(DESTDIR)$(prefix)/share/man/man1/imv.1 - install -D -m 0644 files/imv.desktop $(DESTDIR)$(prefix)/share/applications/imv.desktop + install -D -m 0755 $(TARGET) $(DESTDIR)$(PREFIX)/bin/imv + install -D -m 0644 doc/imv.1 $(DESTDIR)$(PREFIX)/share/man/man1/imv.1 + install -D -m 0644 files/imv.desktop $(DESTDIR)$(PREFIX)/share/applications/imv.desktop uninstall: - $(RM) $(DESTDIR)$(prefix)/bin/imv - $(RM) $(DESTDIR)$(prefix)/share/man/man1/imv.1 - $(RM) $(DESTDIR)$(prefix)/share/applications/imv.desktop + $(RM) $(DESTDIR)$(PREFIX)/bin/imv + $(RM) $(DESTDIR)$(PREFIX)/share/man/man1/imv.1 + $(RM) $(DESTDIR)$(PREFIX)/share/applications/imv.desktop -- cgit v1.2.3