From fe47579ced51258f003e71bfef800bcc5502d3a4 Mon Sep 17 00:00:00 2001 From: Ariel Miculas Date: Sat, 29 Jun 2024 22:44:15 +0300 Subject: [PATCH] Support classic installation via make The classic `make` and `make install` steps should work for installing puzzlefs, so: 1. change the default make action to do a release build 2. add an install target in the Makefile Signed-off-by: Ariel Miculas --- Makefile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 7e767da..181fb4b 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,16 @@ SRC=$(shell find . -name \*.rs | grep -v "^./target") - -.PHONY: debug -debug: - cargo build +PREFIX?=/usr/local +ROOT_SBINDIR?=$(PREFIX)/sbin +INSTALL=install .PHONY: release release: cargo build --release +.PHONY: debug +debug: + cargo build + .PHONY: check check: RUST_BACKTRACE=1 cargo test -- --nocapture @@ -24,3 +27,6 @@ fmt: .PHONY: clean clean: -cargo clean + +install: + $(INSTALL) -m0755 -D target/release/puzzlefs -t $(ROOT_SBINDIR)