BINARY_NAME = moto
TARGET_DIR = target
RELEASE_BIN = $(TARGET_DIR)/release/$(BINARY_NAME)
DEBUG_BIN = $(TARGET_DIR)/debug/$(BINARY_NAME)
.PHONY: all build run test fmt clippy check doc clean
all: build
build:
@echo "Building release binary..."
@cargo build --release
run:
@echo "Running debug binary..."
@cargo run -- $(ARGS)
test:
@echo "Running tests..."
@cargo test
fmt:
@echo "Formatting code..."
@cargo fmt
clippy:
@echo "Running Clippy linter..."
@cargo clippy -- -D warnings
check: fmt clippy test
@echo "All checks passed!"
doc:
@echo "Building and opening documentation..."
@cargo doc --open
clean:
@echo "Cleaning build artifacts..."
@cargo clean