Files
phthonus/frameworks/Rust/axum/Makefile
xfy fcd15be025 chore: update dependecies
add compiler info
2024-11-08 16:02:01 +08:00

57 lines
890 B
Makefile

CARGO = cargo
RUSTC = rustc
CROSS = CROSS_REMOTE=1 cross
all: build
build:
$(CARGO) build
release:
$(CARGO) build --release
dev:
PHTHONUS_LOG=debug $(CARGO) watch -x run
run:
$(CARGO) run
test:
$(CARGO) test
clean:
$(CARGO) clean
clean-release:
rm -rf ./target/release/
rm -rf ./target/debug/
check:
$(CARGO) check
format:
$(CARGO) fmt
lint:
$(CARGO) clippy
fix:
$(CARGO) fix --allow-dirty --all-features && $(CARGO) fmt
linux-musl: clean-release
$(CROSS) build --release --target x86_64-unknown-linux-musl
linux-gnu: clean-release
$(CROSS) build --release --target x86_64-unknown-linux-gnu
windows-gnu: clean-release
$(CROSS) build --release --target x86_64-pc-windows-gnu
freebsd: clean-release
$(CROSS) build --release --target x86_64-unknown-freebsd
loongarch: clean-release
$(CROSS) build --release --target loongarch64-unknown-linux-gnu
.PHONY: all