modify makefile to no longer build crt0.s

This commit is contained in:
Corwin Kuiper 2021-04-10 18:58:37 +01:00 committed by Corwin
parent 06cd2a9f55
commit a6f17a7044

View file

@ -1,7 +1,3 @@
BINUTILS_PREFIX=arm-none-eabi-
CC=$(BINUTILS_PREFIX)as
ARCH = -mthumb-interwork -mthumb
RUSTFILES=$(shell find . -name '*.rs')
.ONESHELL:
@ -28,20 +24,13 @@ r-%: out/release/%.gba
@mgba-qt -l 31 -d -C logToStdout=1 $<
@rm -f out/release/$${OUTNAME}.sav
cargo-release-%: $(RUSTFILES) out/crt0.o
cargo-release-%: $(RUSTFILES)
@OUTNAME=$(patsubst cargo-release-%,%, $@)
@rustup run nightly cargo build --release --example=$${OUTNAME}
cargo-debug-%: $(RUSTFILES) out/crt0.o
cargo-debug-%: $(RUSTFILES)
@OUTNAME=$(patsubst cargo-debug-%,%, $@)
@rustup run nightly cargo build --example=$${OUTNAME}
out/crt0.o: crt0.s interrupt_simple.s
@mkdir -p $(dir $@)
@$(CC) $(ARCH) -o out/crt0.o crt0.s
clippy:
rustup run nightly cargo clippy
doc:
rustup run nightly cargo doc