.PHONY: all
all: install-os-deps install-rust build test bench
@echo "====================================================="
@echo "All done."
.PHONY: install-os-deps
install-os-deps:
@echo "--- Installing OS Dependencies (only works for Debian-based Linux distributions) ---"
@echo "Note: You may be prompted for your sudo password."
sudo apt-get update && sudo apt-get install -y build-essential curl
.PHONY: install-rust
install-rust:
@echo "--- Checking for Rust installation (only works for Unix-like operating systems) ---"
@if ! command -v cargo >/dev/null 2>&1; then \
echo "Rust not found. Installing Rust..."; \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y; \
else \
echo "Rust is already installed!"; \
fi
.PHONY: verify
verify: build test bench
@echo "====================================================="
@echo "Verification complete! Build, tests, and benchmarks finished."
.PHONY: build
build:
@echo "--- Building the project ---"
cargo build --release
.PHONY: test
test:
@echo "--- Running unit tests ---"
cargo test --release -- --test-threads=1
.PHONY: bench
bench:
@echo "--- Running benchmarks ---"
cargo bench RBE
@echo "--- Benchmarks done ---"
@echo "Please note comments about execution times in the README."
.PHONY: clean
clean:
@echo "--- Cleaning the project ---"
cargo clean