aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dridi Boukelmoune <dridi.boukelmoune@gmail.com>2018-03-14 11:41:30 +0100
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2018-03-14 16:11:30 +0530
commit6ac45b92bd41ff4898016a88cf9f905b6af52863 (patch)
tree7235da205aec68a65454b85ef76bd0b07b9a93d4
parentf13974ff2cc79eebca7912d422e464c702001ac0 (diff)
downloadnnn-6ac45b92bd41ff4898016a88cf9f905b6af52863.tar.gz
Make install(1) commands override-able (#96)
-rw-r--r--Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 239a001..09818a0 100644
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,7 @@ PREFIX ?= /usr/local
MANPREFIX ?= $(PREFIX)/share/man
STRIP ?= strip
PKG_CONFIG ?= pkg-config
+INSTALL ?= install
CFLAGS ?= -O3
CFLAGS += -Wall -Wextra -Wno-unused-parameter
@@ -32,10 +33,10 @@ debug: $(SRC)
$(CC) -DDEBUGMODE -g $(CFLAGS) $(LDFLAGS) -o $(BIN) $^ $(LDLIBS)
install: all
- install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
- install -m 0755 $(BIN) $(PLAYER) $(DESTDIR)$(PREFIX)/bin
- install -m 0755 -d $(DESTDIR)$(MANPREFIX)/man1
- install -m 0644 $(BIN).1 $(DESTDIR)$(MANPREFIX)/man1
+ $(INSTALL) -m 0755 -d $(DESTDIR)$(PREFIX)/bin
+ $(INSTALL) -m 0755 $(BIN) $(PLAYER) $(DESTDIR)$(PREFIX)/bin
+ $(INSTALL) -m 0755 -d $(DESTDIR)$(MANPREFIX)/man1
+ $(INSTALL) -m 0644 $(BIN).1 $(DESTDIR)$(MANPREFIX)/man1
uninstall:
$(RM) $(DESTDIR)$(PREFIX)/bin/$(BIN)