28 lines
499 B
Makefile
28 lines
499 B
Makefile
ROOT_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
|
|
|
|
PROG_NAME := optimg
|
|
VERSION := $(shell cargo info $(PROG_NAME) | grep "^version" | cut -d ' ' -f2 | xargs)
|
|
LOG_LEVEL := debug
|
|
|
|
show:
|
|
@echo "$(PROG_NAME) version: $(VERSION)"
|
|
|
|
lint:
|
|
cargo clippy --fix --allow-dirty
|
|
|
|
format:
|
|
cargo fmt --all
|
|
|
|
check: lint format
|
|
|
|
doc:
|
|
cargo doc -r --no-deps --open
|
|
|
|
run: check
|
|
RUST_LOG=$(LOG_LEVEL) cargo run - --debug
|
|
|
|
build: check
|
|
cargo build --release
|
|
|
|
test:
|
|
cargo test --no-fail-fast --lib --tests
|