aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitrij D. Czarkoff <czarkoff@gmail.com>2015-12-25 15:07:03 +0100
committerDmitrij D. Czarkoff <czarkoff@gmail.com>2015-12-25 15:07:03 +0100
commitab0c27611be891841f5d7f250ae95c3a9895c145 (patch)
treea8f6bb6e1ae0a26f987945e43a78818de449088c
parenta01f3b3b1a9ad50e59bd05c4a8e08ae4ad547183 (diff)
downloadimv-ab0c27611be891841f5d7f250ae95c3a9895c145.tar.gz
Use "PREFIX" instead of "prefix"
Most package management systems already expect "PREFIX" macro to control installation path.
-rw-r--r--Makefile14
1 files changed, 7 insertions, 7 deletions
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