Browse Source

Provide a Makefile for convenience

The crate can be build by running `make VST_INCLUDE_DIR=/path/to/sdk` .
master
Andreas Linz 2 years ago
parent
commit
21ab7cf6c8
1 changed files with 38 additions and 0 deletions
  1. +38
    -0
      Makefile

+ 38
- 0
Makefile View File

@ -0,0 +1,38 @@
RUST_SRC:=$(wildcard **/*.rs)
RUSTUP:=$(shell which rustup || echo)
all: build
test: check
@cargo test
check: fmt-check lint
setup:
ifeq ($(RUSTUP),)
curl https://sh.rustup.rs -sSf | sh
endif
@$(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
clean:
@rm -fr target/

Loading…
Cancel
Save