2018-11-16 18:39:47 +11:00
|
|
|
[config]
|
|
|
|
skip_core_tasks = true
|
|
|
|
|
|
|
|
[tasks.create-target-dir]
|
2021-01-13 08:41:51 +11:00
|
|
|
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"
|
2021-01-13 08:41:51 +11:00
|
|
|
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"
|
2021-01-13 08:41:51 +11:00
|
|
|
args = ["build", "--examples", "--release"]
|
2018-11-16 18:39:47 +11:00
|
|
|
|
|
|
|
[tasks.pack-roms]
|
2021-01-13 08:41:51 +11:00
|
|
|
script_runner = "@duckscript"
|
2018-11-16 18:39:47 +11:00
|
|
|
script = [
|
|
|
|
'''
|
2021-01-13 08:41:51 +11:00
|
|
|
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
|
|
|
'''
|
|
|
|
]
|
|
|
|
|
2021-01-13 08:41:51 +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]
|
2018-12-21 10:15:23 +11:00
|
|
|
command = "cargo"
|
2021-01-13 08:41:51 +11:00
|
|
|
args = ["test", "--lib", "--target", "x86_64-apple-darwin", "-Z", "build-std"]
|
2018-11-18 11:14:42 +11:00
|
|
|
|
2018-12-20 14:58:41 +11:00
|
|
|
[tasks.justrelease]
|
|
|
|
dependencies = ["build-examples-release", "pack-roms"]
|
|
|
|
|
2018-12-21 10:15:23 +11:00
|
|
|
[tasks.build-all]
|
|
|
|
dependencies = ["build-examples-debug", "build-examples-release", "pack-roms"]
|
2018-11-20 19:52:48 +11:00
|
|
|
|
|
|
|
[tasks.default]
|
2018-12-21 10:15:23 +11:00
|
|
|
alias = "build-all"
|