Makefile: add support to DESTDIR

Closes: #22

Signed-off-by: Anna (navi) Figueiredo Gomes <navi@vlhl.dev>
This commit is contained in:
Anna (navi) Figueiredo Gomes 2024-03-24 23:23:31 +01:00 committed by Drew DeVault
parent 9f420764b0
commit 4a6558258e
2 changed files with 3 additions and 3 deletions

View File

@ -3,9 +3,9 @@
default: all default: all
.DEFAULT: .DEFAULT:
cd src && $(MAKE) $@ $(MAKE) -C src $@
install: install:
cd src && $(MAKE) $@ $(MAKE) -C src $@
.PHONY: install .PHONY: install

View File

@ -55,7 +55,7 @@ else
endif endif
PREFIX?=/usr/local PREFIX?=/usr/local
INSTALL_BIN=$(PREFIX)/bin INSTALL_BIN=$(DESTDIR)$(PREFIX)/bin
INSTALL=install INSTALL=install
PKG_CONFIG?=pkg-config PKG_CONFIG?=pkg-config