Files
phthonus/frameworks/Rust/axum-xitca/Makefile
2024-09-24 13:55:14 +08:00

63 lines
1.0 KiB
Makefile

CARGO = cargo
RUSTC = rustc
CROSS = cross
all: build
build:
$(CARGO) build
release: clean
$(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
deps:
python -m venv venus \
&& source venus/bin/activate \
&& pip install -r scripts/requirements.txt \
&& python scripts/download-core.py
.PHONY: all