Make install(1) commands override-able (#96)

This commit is contained in:
Dridi Boukelmoune 2018-03-14 11:41:30 +01:00 committed by Arun Prakash Jana
parent f13974ff2c
commit 6ac45b92bd

View file

@ -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)