Skip to content

Commit 5e9a533

Browse files
committed
First pass of cargo-make integration
1 parent 67ae06a commit 5e9a533

File tree

7 files changed

+57
-0
lines changed

7 files changed

+57
-0
lines changed

Makefile.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[env]
2+
TARGET_TRIPLE = "thumbv6m-none-eabi"
3+
CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
4+
FEATURES = ""
5+
6+
[tasks.build]
7+
args = [
8+
"build",
9+
"@@remove-empty(BUILD_TYPE)",
10+
"--target",
11+
"${TARGET_TRIPLE}",
12+
"--features",
13+
"${FEATURES}",
14+
]
15+
16+
[tasks.build-release]
17+
clear = true
18+
env.BUILD_TYPE = "--release"
19+
run_task = "build"
20+
21+
[tasks.test]
22+
disabled = true

b1display/Makefile.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
extend = "../Makefile.toml"

c1minimal/Makefile.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
extend = "../Makefile.toml"

fl16-inputmodules/Makefile.toml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
extend = "../Makefile.toml"
2+
3+
[tasks.build-all]
4+
run_task = { name = [
5+
"build-ledmatrix",
6+
"build-b1display",
7+
"build-c1minimal",
8+
], parallel = true }
9+
10+
11+
[tasks.build-ledmatrix]
12+
env.FEATURES = "ledmatrix"
13+
run_task = "build"
14+
15+
[tasks.build-b1display]
16+
env.FEATURES = "b1display"
17+
run_task = "build"
18+
19+
[tasks.build-c1minimal]
20+
env.FEATURES = "c1minimal"
21+
run_task = "build"

fl16-inputmodules/src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
#![allow(clippy::needless_range_loop)]
22
#![no_std]
33

4+
#[cfg(any(
5+
all(feature = "ledmatrix", feature = "b1display"),
6+
all(feature = "ledmatrix", feature = "c1minimal"),
7+
all(feature = "b1display", feature = "c1minimal"),
8+
))]
9+
compile_error!("Features \"ledmatrix\", \"b1display\", and \"c1minimal\" are mutually exclusive");
10+
411
#[cfg(feature = "ledmatrix")]
512
pub mod fl16;
613
#[cfg(feature = "ledmatrix")]

inputmodule-control/Makefile.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
extend = "../Makefile.toml"
2+
3+
[env]
4+
TARGET_TRIPLE = "x86_64-unknown-linux-gnu"

ledmatrix/Makefile.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
extend = "../Makefile.toml"

0 commit comments

Comments
 (0)