2021-03-07 04:58:59 +11:00
|
|
|
RUSTFILES=$(shell find . -name '*.rs')
|
|
|
|
|
|
|
|
.ONESHELL:
|
|
|
|
|
|
|
|
out/debug/%.gba: cargo-debug-%
|
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
@OUTNAME=$(patsubst out/debug/%.gba,%,$@)
|
|
|
|
@$(BINUTILS_PREFIX)objcopy -O binary target/gba/debug/examples/$${OUTNAME} out/debug/$${OUTNAME}.gba
|
|
|
|
@gbafix $@
|
|
|
|
|
|
|
|
out/release/%.gba: cargo-release-%
|
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
@OUTNAME=$(patsubst out/release/%.gba,%,$@)
|
|
|
|
@$(BINUTILS_PREFIX)objcopy -O binary target/gba/release/examples/$${OUTNAME} out/release/$${OUTNAME}.gba
|
|
|
|
@gbafix $@
|
|
|
|
|
|
|
|
d-%: out/debug/%.gba
|
|
|
|
@OUTNAME=$(patsubst d-%,%,$@)
|
2021-03-09 10:25:08 +11:00
|
|
|
@mgba-qt -l 31 -d -C logToStdout=1 $<
|
2021-03-07 09:43:37 +11:00
|
|
|
@rm -f out/debug/$${OUTNAME}.sav
|
2021-03-07 04:58:59 +11:00
|
|
|
|
|
|
|
r-%: out/release/%.gba
|
|
|
|
@OUTNAME=$(patsubst r-%,%,$@)
|
2021-03-09 10:25:08 +11:00
|
|
|
@mgba-qt -l 31 -d -C logToStdout=1 $<
|
2021-03-07 09:43:37 +11:00
|
|
|
@rm -f out/release/$${OUTNAME}.sav
|
2021-03-07 04:58:59 +11:00
|
|
|
|
2021-04-11 03:58:37 +10:00
|
|
|
cargo-release-%: $(RUSTFILES)
|
2021-03-07 04:58:59 +11:00
|
|
|
@OUTNAME=$(patsubst cargo-release-%,%, $@)
|
2021-04-11 03:30:08 +10:00
|
|
|
@rustup run nightly cargo build --release --example=$${OUTNAME}
|
2021-03-07 04:58:59 +11:00
|
|
|
|
2021-04-11 03:58:37 +10:00
|
|
|
cargo-debug-%: $(RUSTFILES)
|
2021-03-07 04:58:59 +11:00
|
|
|
@OUTNAME=$(patsubst cargo-debug-%,%, $@)
|
2021-04-11 03:30:08 +10:00
|
|
|
@rustup run nightly cargo build --example=$${OUTNAME}
|
2021-03-07 04:58:59 +11:00
|
|
|
|
2021-03-07 12:03:47 +11:00
|
|
|
doc:
|
2021-04-11 03:30:08 +10:00
|
|
|
rustup run nightly cargo doc
|