Change prefix to PREFIX so users can modify its value by, e.g., make PREFIX=/usr/local install

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2019-05-31 14:19:16 +02:00
parent e8be023e76
commit e8e4e45d3d

View File

@@ -151,13 +151,13 @@ version.h: version~
@echo '#endif // VERSION_H' >> "$@"
@echo "Making FTL version on branch $(GIT_BRANCH) - $(GIT_VERSION) ($(GIT_DATE))"
prefix=/usr
PREFIX=/usr
SETCAP = $(shell which setcap)
# install target just installs the executable
# other requirements (correct ownership of files, etc.) is managed by
# the service script on sudo service pihole-FTL (re)start
install: pihole-FTL
mkdir -p $(DESTDIR)$(prefix)/bin
install -m 0755 pihole-FTL $(DESTDIR)$(prefix)/bin
$(SETCAP) CAP_NET_BIND_SERVICE,CAP_NET_RAW,CAP_NET_ADMIN+eip $(DESTDIR)$(prefix)/bin/pihole-FTL
mkdir -p $(DESTDIR)$(PREFIX)/bin
install -m 0755 pihole-FTL $(DESTDIR)$(PREFIX)/bin
$(SETCAP) CAP_NET_BIND_SERVICE,CAP_NET_RAW,CAP_NET_ADMIN+eip $(DESTDIR)$(PREFIX)/bin/pihole-FTL