diff options
author | Dmitrij D. Czarkoff <czarkoff@gmail.com> | 2015-12-25 15:29:12 +0100 |
---|---|---|
committer | Dmitrij D. Czarkoff <czarkoff@gmail.com> | 2015-12-25 15:29:12 +0100 |
commit | 77827c838e36e39471f2f23338f76e5ace2404c4 (patch) | |
tree | 13bc4fd9649255e7cc6e5472afa14116cdc676dc /Makefile | |
parent | 6de6b358e81251bcf9c978b04452d2390d46a388 (diff) | |
download | imv-77827c838e36e39471f2f23338f76e5ace2404c4.tar.gz |
Make installation locations more configurable
This might be desired when platform has its own, custom layout (eg. OpenBSD or
Solaris), or when user wants to install the program to his home directory.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -1,6 +1,9 @@ .PHONY: clean check install uninstall PREFIX ?= /usr +BINPREFIX ?= $(PREFIX)/bin +MANPREFIX ?= $(PREFIX)/share/man +DATAPREFIX ?= $(PREFIX)/share CFLAGS ?= -W -Wall -Wpedantic CFLAGS += -std=gnu11 $(shell sdl2-config --cflags) @@ -41,9 +44,9 @@ 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)$(BINPREFIX)/imv + install -D -m 0644 doc/imv.1 $(DESTDIR)$(MANPREFIX)/man1/imv.1 + install -D -m 0644 files/imv.desktop $(DESTDIR)$(DATAPREFIX)/applications/imv.desktop uninstall: $(RM) $(DESTDIR)$(PREFIX)/bin/imv |