CARGO := cargo
GIT := git
TARGET_DIR := target
PACKAGE := librnxengine
RUSTFLAGS := -C debuginfo=2
.PHONY: all clean build-release build-debug test test-verbose fmt lint check doc help
all: build-debug
build-debug:
@echo "==> Building debug version..."
$(CARGO) build
build-release:
@echo "==> Building release version..."
$(CARGO) build --release
clean:
@echo "==> Cleaning project..."
$(CARGO) clean
test:
@echo "==> Running tests..."
$(CARGO) test
test-verbose:
@echo "==> Running tests with verbose output..."
$(CARGO) test -- --nocapture
fmt:
@echo "==> Checking and formatting code..."
$(CARGO) fmt
lint:
@echo "==> Running clippy lint..."
$(CARGO) clippy --all-targets --all-features -- -D warnings
check:
@echo "==> Running cargo check..."
$(CARGO) check
doc:
@echo "==> Generating documentation..."
$(CARGO) doc --workspace --all-features --document-private-items --no-deps --open
build-debug-verbose:
@echo "==> Building debug with verbose output..."
$(CARGO) build --verbose
build-release-verbose:
@echo "==> Building release with verbose output..."
$(CARGO) build --release --verbose
chagelog:
@echo "==> Generating changelog..."
$(GIT) log > changelog
help:
@echo "Usage: make [target]"
@echo ""
@echo "Targets:"
@echo " all Build debug version (default)"
@echo " build-debug Build debug version"
@echo " build-release Build release version"
@echo " build-debug-verbose Build debug version with verbose output"
@echo " build-release-verbose Build release version with verbose output"
@echo " clean Clean the project"
@echo " test Run tests"
@echo " test-verbose Run tests with verbose output"
@echo " fmt Format the code"
@echo " lint Run clippy lint"
@echo " check Run cargo check"
@echo " doc Generate documentation and open it"
@echo " help Show this help message"