-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile.toml
88 lines (72 loc) · 2.82 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
[config]
default_to_workspace = false
[env]
nightly_version = "nightly-2023-10-05" # 1.73.0 toolchain nightly version
[tasks.test]
command = "cargo"
args = ["test", "--package", "magenboy_core"]
[tasks.sdl]
command = "cargo"
args = ["build", "--release", "--package", "magenboy_sdl"]
[tasks.sdl_dbg]
command = "cargo"
args = ["build", "--release", "--package", "magenboy_sdl", "--features", "dbg"]
[tasks.sdl.linux]
args = ["build", "--release", "--package", "magenboy_sdl", "--no-default-features"]
dependencies = ["install_sdl2_linux"]
[tasks.sdl_dbg.linux]
args = ["build", "--release", "--package", "magenboy_sdl", "--no-default-features", "--features", "dbg"]
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"}
install_crate_args=["--locked", "--version", "0.2.5"]
command = "cross"
args = ["build", "--release", "--target", "armv7-unknown-linux-gnueabihf", "--bin", "rpios","--no-default-features", "--features", "os"]
[tasks.pre-rpibm]
command = "rustup"
args = ["toolchain", "install", "--profile", "minimal", "--no-self-update", "${nightly_version}"]
[tasks.rpibm]
toolchain = "${nightly_version}"
install_crate = "cargo-binutils"
install_crate_args=["--locked", "--version", "0.3.6"]
command = "rust-objcopy"
args = ["target/armv7a-none-eabihf/release/baremetal", "-O", "binary", "kernel7.img"]
dependencies = ["pre-rpibm", "build_rpi_baremetal","install_llvm_tools"]
[tasks.build_rpi_baremetal]
toolchain = "${nightly_version}"
command = "cargo"
args = ["build", "--release", "--target", "armv7a-none-eabihf","--package", "magenboy_rpi", "--bin", "baremetal", "-Z", "build-std=core", "--features", "bm"]
dependencies = ["install_rust_src"]
[tasks.install_llvm_tools]
toolchain = "${nightly_version}"
install_crate = {rustup_component_name = "llvm-tools-preview"}
[tasks.install_rust_src]
toolchain = "${nightly_version}"
command = "rustup"
args = ["component", "add", "rust-src"]
[tasks.libretro_desktop]
command = "cargo"
args = ["build", "--release", "--package", "magenboy_libretro"]
[tasks.libretro_android]
install_crate = {crate_name = "cargo-ndk", binary = "cargo", test_arg = "ndk"}
install_crate_args=["--locked", "--version", "3.5.4"]
command = "cargo"
args = ["ndk", "--target=aarch64-linux-android", "build", "--release", "--package", "magenboy_libretro"]
dependencies = ["add_android_target"]
[tasks.add_android_target]
command = "rustup"
args = ["target", "add", "aarch64-linux-android"]