mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 16:21:33 +11:00
remove need for cargo-xbuild
This commit is contained in:
parent
2c5f706d20
commit
8ba1c9448e
6
.cargo/config.toml
Normal file
6
.cargo/config.toml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
[unstable]
|
||||||
|
build-std = ["core", "compiler_builtins", "alloc"]
|
||||||
|
build-std-features = ["compiler-builtins-mem"]
|
||||||
|
|
||||||
|
[build]
|
||||||
|
target = "gba.json"
|
|
@ -1,4 +1,4 @@
|
||||||
FROM devkitpro/devkitarm:20190212
|
FROM docker.io/devkitpro/devkitarm:20190212
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y build-essential && \
|
apt-get install -y build-essential && \
|
||||||
|
@ -6,7 +6,6 @@ RUN apt-get update && \
|
||||||
|
|
||||||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly
|
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly
|
||||||
RUN . "$HOME/.cargo/env" && \
|
RUN . "$HOME/.cargo/env" && \
|
||||||
cargo install cargo-xbuild && \
|
|
||||||
rustup component add rust-src
|
rustup component add rust-src
|
||||||
|
|
||||||
RUN echo 'export PATH=$PATH:$DEVKITARM/bin' >> $HOME/.bashrc
|
RUN echo 'export PATH=$PATH:$DEVKITARM/bin' >> $HOME/.bashrc
|
||||||
|
|
8
Makefile
8
Makefile
|
@ -30,18 +30,18 @@ r-%: out/release/%.gba
|
||||||
|
|
||||||
cargo-release-%: $(RUSTFILES) out/crt0.o
|
cargo-release-%: $(RUSTFILES) out/crt0.o
|
||||||
@OUTNAME=$(patsubst cargo-release-%,%, $@)
|
@OUTNAME=$(patsubst cargo-release-%,%, $@)
|
||||||
@rustup run nightly cargo xbuild --release --target=gba.json --example=$${OUTNAME}
|
@rustup run nightly cargo build --release --target=gba.json --example=$${OUTNAME}
|
||||||
|
|
||||||
cargo-debug-%: $(RUSTFILES) out/crt0.o
|
cargo-debug-%: $(RUSTFILES) out/crt0.o
|
||||||
@OUTNAME=$(patsubst cargo-debug-%,%, $@)
|
@OUTNAME=$(patsubst cargo-debug-%,%, $@)
|
||||||
@rustup run nightly cargo xbuild --target=gba.json --example=$${OUTNAME}
|
@rustup run nightly cargo build --target=gba.json --example=$${OUTNAME}
|
||||||
|
|
||||||
out/crt0.o: crt0.s interrupt_simple.s
|
out/crt0.o: crt0.s interrupt_simple.s
|
||||||
@mkdir -p $(dir $@)
|
@mkdir -p $(dir $@)
|
||||||
@$(CC) $(ARCH) -o out/crt0.o crt0.s
|
@$(CC) $(ARCH) -o out/crt0.o crt0.s
|
||||||
|
|
||||||
clippy:
|
clippy:
|
||||||
rustup run nightly cargo xclippy --target=gba.json
|
rustup run nightly cargo clippy --target=gba.json
|
||||||
|
|
||||||
doc:
|
doc:
|
||||||
rustup run nightly cargo xdoc --target=gba.json
|
rustup run nightly cargo doc --target=gba.json
|
|
@ -12,7 +12,6 @@ examples as documentation.
|
||||||
|
|
||||||
* Nightly rust, probably quite a recent version.
|
* Nightly rust, probably quite a recent version.
|
||||||
* Devkitarm.
|
* Devkitarm.
|
||||||
* Cargo-xbuild is used too.
|
|
||||||
|
|
||||||
This is probably easiest to do in a container, the `start-dev.sh` script creates
|
This is probably easiest to do in a container, the `start-dev.sh` script creates
|
||||||
and runs a development environment in a docker container.
|
and runs a development environment in a docker container.
|
||||||
|
|
Loading…
Reference in a new issue