-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile.toml
70 lines (58 loc) · 2.08 KB
/
Makefile.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
[config]
default_to_workspace = false
[tasks.all]
dependencies = ["test", "sdl", "rpios", "rpibm", "libretro"]
[tasks.test]
command = "cargo"
args = ["test", "--package", "magenboy_core"]
[tasks.sdl]
command = "cargo"
args = ["build", "--release", "--package", "magenboy_sdl"]
[tasks.sdl.linux]
args = ["build", "--release", "--package", "magenboy_sdl", "--no-default-features"]
dependencies = ["install_sdl2_linux"]
[tasks.install_sdl2_linux]
script = [
"""
# returns early if the package was already installed and install it otherwise. The first
# argument is the package name to be checked (and installed if not already).
# other arguments are passed to apt-get
try_install() {
dpkg -l "$1" | grep -q ^ii && return 0
sudo apt-get -y install "$@"
return 0
}
try_install libsdl2-dev
"""
]
[tasks.rpios]
install_crate = {crate_name = "cross", binary = "cross", test_arg = "-h"}
command = "cross"
args = ["build", "--release", "--target", "armv7-unknown-linux-gnueabihf", "--bin", "rpios","--no-default-features", "--features", "os"]
[tasks.rpibm]
toolchain = "nightly"
install_crate = "cargo-binutils"
command = "rust-objcopy"
args = ["target/armv7a-none-eabihf/release/baremetal", "-O", "binary", "kernel7.img"]
dependencies = ["build_rpi_baremetal","install_llvm_tools"]
[tasks.build_rpi_baremetal]
toolchain = "nightly"
cwd = "./rpi/"
command = "cargo"
args = ["build", "--release", "--target", "armv7a-none-eabihf","--package", "magenboy_rpi", "--bin", "baremetal", "-Z", "build-std=core"]
dependencies = ["install_rust_src"]
[tasks.install_llvm_tools]
toolchain = "nightly"
install_crate = {rustup_component_name = "llvm-tools-preview"}
[tasks.install_rust_src]
toolchain = "nightly"
command = "rustup"
args = ["component", "add", "rust-src"]
[tasks.libretro]
command = "cargo"
args = ["build", "--release", "--package", "magenboy_libretro"]
dependencies = ["libretro_android"]
[tasks.libretro_android]
install_crate = {crate_name = "cargo-ndk", binary = "cargo", test_arg = "ndk"}
command = "cargo"
args = ["ndk", "--target=aarch64-linux-android", "build", "--release", "--package", "magenboy_libretro"]