Makefile: Split out a setup target Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
diff --git a/.travis.yml b/.travis.yml index b3d54d3..d088936 100644 --- a/.travis.yml +++ b/.travis.yml
@@ -29,11 +29,7 @@ - popd install: - - rustup target add thumbv7em-none-eabi - - rustup target add riscv32imc-unknown-none-elf - - rustup component add rustfmt - - rustup component add clippy - - cargo install elf2tab --version 0.4.0 + - make setup # Build Tock, it needs to be outside of the libtock-rs source - pushd ../ - git clone https://github.com/tock/tock.git
diff --git a/Makefile b/Makefile index 213e36b..53aace9 100644 --- a/Makefile +++ b/Makefile
@@ -15,9 +15,18 @@ @echo " - hifive1" @echo " - nrf52" @echo + @echo "Run 'make setup' to setup Rust to build libtock-rs." @echo "Run 'make <board>' to build libtock-rs for that board" @echo "Run 'make test' to test any local changes you have made" +.PHONY: setup +setup: + rustup target add thumbv7em-none-eabi + rustup target add riscv32imc-unknown-none-elf + rustup component add rustfmt + rustup component add clippy + cargo install elf2tab --version 0.4.0 + .PHONY: examples examples: PLATFORM=nrf52 cargo build --release --target=thumbv7em-none-eabi --examples