-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.toml
82 lines (72 loc) · 1.7 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
[config]
default_to_workspace = false
[env]
DEMO_TARGET="powerpc-unknown-linux-gnu"
HOST_TARGET="x86_64-unknown-linux-gnu"
PROFILE="dev"
DEMO_DIR="${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/${DEMO_TARGET}/debug"
TARGET_DIR="${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/${HOST_TARGET}/debug"
[env.release]
PROFILE="release"
DEMO_DIR="${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/${DEMO_TARGET}/release"
TARGET_DIR="${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/${HOST_TARGET}/release"
[tasks.clean]
command = "cargo"
args = ["clean"]
[tasks.format]
install_crate = "rustfmt"
command = "cargo"
args = ["fmt", "--", "--emit=files"]
[tasks.demo]
dependencies = ["format", "clippy"]
command = "cargo"
args = [
"build",
"-p", "demo",
"--profile", "${PROFILE}",
"--target", "powerpc-unknown-linux-gnu",
]
[tasks.run_demo]
dependencies = ["demo"]
command = "cargo"
args = [
"run",
"-p", "demo",
"--target", "powerpc-unknown-linux-gnu",
]
[tasks.build]
dependencies = ["format", "clippy"]
command = "cargo"
args = [
"build",
"-p", "gdb-qemu",
"--profile", "${PROFILE}",
]
[tasks.run]
command = "cargo"
dependencies = [ "demo" ]
args = [
"run",
"-p", "gdb-qemu",
"--profile", "${PROFILE}",
"--",
"-p", "1234",
"-L", "trace",
"--",
"qemu-ppc",
"-L", "/usr/powerpc-linux-gnu",
"-g", "1234",
"${DEMO_DIR}/demo"
]
[tasks.gdb]
command = "gdb-multiarch"
dependencies = ["demo", "build"]
args = [
"-ex", "set architecture powerpc:MPC8XX",
"-ex", "set pagination off",
"-ex", "set confirm off",
"-ex", "file ${DEMO_DIR}/demo",
"-ex", "target remote | ${TARGET_DIR}/gdb-qemu -p 1234 -L trace qemu-ppc -- -L /usr/powerpc-linux-gnu -g 1234 ${DEMO_DIR}/demo"
]
[tasks.all]
dependencies = ["demo", "build"]