You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
710 B

RUST_SRC:=$(wildcard **/*.rs)
RUSTUP:=$(shell which rustup || echo)
all: build
test: check
@cargo test
check: fmt-check lint
ifeq ($(RUSTUP),)
curl -sSf | sh
@$(RUSTUP) toolchain install nightly
@$(RUSTUP) component add --toolchain=nightly clippy-preview rustfmt-preview
build: target/release/libvst_sys.rlib
target/release/libvst_sys.rlib: $(RUST_SRC)
@VST_INCLUDE_DIR=$$VST_INCLUDE_DIR cargo build --release
doc: target/doc/vst-sys/index.html
target/doc/vst-sys/index.html: $(RUST_SRC)
@cargo doc
lint: $(RUST_SRC)
@cargo +nightly clippy
fmt: $(RUST_SRC)
@cargo +nightly fmt
fmt-check: $(RUST_SRC)
@cargo +nightly fmt -- --check
@rm -fr target/