gba/Makefile.toml

56 lines
1.3 KiB
Makefile
Raw Normal View History

2018-11-16 18:39:47 +11:00
[config]
skip_core_tasks = true
[tasks.create-target-dir]
script_runner = "@duckscript"
script = [ "mkdir ./target/" ]
2018-11-16 18:39:47 +11:00
[tasks.assemble]
dependencies = ["create-target-dir"]
command = "arm-none-eabi-as"
args = ["crt0.s", "-o", "target/crt0.o"]
2018-11-18 11:14:42 +11:00
[tasks.build-examples-debug]
2018-11-16 18:39:47 +11:00
dependencies = ["assemble"]
command = "cargo"
args = ["build", "--examples"]
2018-11-16 18:39:47 +11:00
2018-11-18 11:14:42 +11:00
[tasks.build-examples-release]
2018-11-16 18:39:47 +11:00
dependencies = ["assemble"]
command = "cargo"
args = ["build", "--examples", "--release"]
2018-11-16 18:39:47 +11:00
[tasks.pack-roms]
script_runner = "@duckscript"
2018-11-16 18:39:47 +11:00
script = [
'''
examples = glob_array ./examples/*.rs
for example in ${examples}
example = substring ${example} -3
example = basename ${example}
exec arm-none-eabi-objcopy -O binary ./target/thumbv4-none-agb/release/examples/${example} ./target/${example}.gba
end
2018-11-16 18:39:47 +11:00
'''
]
[tasks.test.linux]
command = "cargo"
args = ["test", "--lib", "--target", "x86_64-unknown-linux-gnu", "-Z", "build-std"]
[tasks.test.windows]
command = "cargo"
args = ["test", "--lib", "--target", "x86_64-pc-windows-msvc", "-Z", "build-std"]
[tasks.test.mac]
command = "cargo"
args = ["test", "--lib", "--target", "x86_64-apple-darwin", "-Z", "build-std"]
2018-11-18 11:14:42 +11:00
[tasks.justrelease]
dependencies = ["build-examples-release", "pack-roms"]
[tasks.build-all]
dependencies = ["build-examples-debug", "build-examples-release", "pack-roms"]
2018-11-20 19:52:48 +11:00
[tasks.default]
alias = "build-all"