diff options
author | Harry Jeffery <harry@exec64.co.uk> | 2019-06-22 21:35:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-22 21:35:03 +0100 |
commit | 4e53f4e9e648464e81ff59e16dd5750c1f15a91a (patch) | |
tree | ee0dd8c20aeffc174139b2a94cc4c6a36b652f54 | |
parent | 79bba4bf2cd1cbed4a32f8c6a09e99ff7faff3db (diff) | |
parent | 8dbe8a8934ab37d2e3ce3caa0affe3b83e78dace (diff) | |
download | imv-4e53f4e9e648464e81ff59e16dd5750c1f15a91a.tar.gz |
Merge pull request #159 from t6/master
Allow overriding install commands
-rw-r--r-- | Makefile | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -8,6 +8,10 @@ MANPREFIX ?= $(PREFIX)/share/man DATAPREFIX ?= $(PREFIX)/share CONFIGPREFIX ?= /etc +INSTALL_DATA ?= install -m 0644 +INSTALL_MAN ?= install -m 0644 +INSTALL_PROGRAM ?= install -m 0755 + override CFLAGS += -std=c99 -W -Wall -Wpedantic -Wextra override CPPFLAGS += $(shell sdl2-config --cflags) -D_XOPEN_SOURCE=700 override LIBS := $(shell sdl2-config --libs) @@ -106,11 +110,15 @@ doc/%: doc/%.txt a2x --no-xmllint --doctype manpage --format manpage $< install: $(TARGET) doc - install -D -m 0755 $(TARGET) $(DESTDIR)$(BINPREFIX)/imv - install -D -m 0644 doc/imv.1 $(DESTDIR)$(MANPREFIX)/man1/imv.1 - install -D -m 0644 doc/imv.5 $(DESTDIR)$(MANPREFIX)/man5/imv.5 - install -D -m 0644 files/imv.desktop $(DESTDIR)$(DATAPREFIX)/applications/imv.desktop - install -D -m 0644 files/imv_config $(DESTDIR)$(CONFIGPREFIX)/imv_config + mkdir -p $(DESTDIR)$(BINPREFIX) + $(INSTALL_PROGRAM) $(TARGET) $(DESTDIR)$(BINPREFIX)/imv + mkdir -p $(DESTDIR)$(MANPREFIX) + $(INSTALL_MAN) doc/imv.1 $(DESTDIR)$(MANPREFIX)/man1/imv.1 + $(INSTALL_MAN) doc/imv.5 $(DESTDIR)$(MANPREFIX)/man5/imv.5 + mkdir -p $(DESTDIR)$(DATAPREFIX)/applications + $(INSTALL_DATA) files/imv.desktop $(DESTDIR)$(DATAPREFIX)/applications/imv.desktop + mkdir -p $(DESTDIR)$(CONFIGPREFIX) + $(INSTALL_DATA) files/imv_config $(DESTDIR)$(CONFIGPREFIX)/imv_config uninstall: $(RM) $(DESTDIR)$(BINPREFIX)/imv |