diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e3a4327 --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +# Variables +BIN_NAME = rms-client +BIN_DEST = /usr/local/bin/$(BIN_NAME) + +# Targets +all: + @echo "Usage:" + @echo "" + @echo "make compile: only compile" + @echo "make install_bin: only move the bin to /usr/local/bin" + @echo "make install: compile, then install the bin" + @echo "make uninstall: remove the bin" + +install: compile install_bin + +compile: + cargo build --release + +install_bin: + sudo cp target/release/$(BIN_NAME) $(BIN_DEST) + +uninstall: + sudo rm -r $(BIN_DEST) target +