From 378c0a0bb5dc1c581cb9ba1285da1d42a11fdd8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Gonz=C3=A1lez=20Calder=C3=B3n?= Date: Fri, 5 Jul 2024 18:46:23 -0300 Subject: [PATCH] Add simple makefile --- Makefile | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2d94132 --- /dev/null +++ b/Makefile @@ -0,0 +1,36 @@ +.PHONY: usage deps build check test clean + +UNAME := $(shell uname) + +usage: + @echo "Usage:" + @echo " deps: Installs the necesarry dependencies." + @echo " build: Builds the crate." + @echo " check: Checks format and lints." + @echo " test: Runs all tests." + @echo " clean: Cleans the built artifacts." + +build: + cargo build --release + # cargo build --release --all-features + +check: + cargo fmt --all -- --check + cargo clippy --all-targets -- -D warnings + # cargo clippy --all-targets --all-features -- -D warnings + +test: + cargo test + # cargo test --profile ci --all-features + +clean: + cargo clean + +deps: +ifeq ($(UNAME), Darwin) +deps: deps-macos +endif +deps: + +deps-macos: + -brew install llvm@18 --quiet