mirror of
https://github.com/DefectingCat/phthonus
synced 2025-07-15 16:41:32 +00:00
63 lines
1.0 KiB
Makefile
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
|
|
|
|
build-linux-musl: clean-release
|
|
$(CROSS) build --release --target x86_64-unknown-linux-musl
|
|
|
|
build-linux-gnu: clean-release
|
|
$(CROSS) build --release --target x86_64-unknown-linux-gnu
|
|
|
|
build-windows-gnu: clean-release
|
|
$(CROSS) build --release --target x86_64-pc-windows-gnu
|
|
|
|
build-freebsd: clean-release
|
|
$(CROSS) build --release --target x86_64-unknown-freebsd
|
|
|
|
build-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
|