From 03aef246c16cb39b0f9c50ef4f0e07d12c43ab93 Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Mon, 9 Aug 2021 23:13:23 -0400 Subject: [PATCH] Allow cross compilation --- .cargo/config | 12 ++++++++++++ Makefile | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 .cargo/config diff --git a/.cargo/config b/.cargo/config new file mode 100644 index 0000000..edb06fb --- /dev/null +++ b/.cargo/config @@ -0,0 +1,12 @@ +# For cross compilation +[target.aarch64-unknown-linux-musl] +linker = "aarch64-linux-gnu-gcc" + +[target.armv7-unknown-linux-musleabi] +linker = "arm-linux-gnueabi-gcc" + +[target.arm-unknown-linux-musleabi] +linker = "arm-linux-gnueabi-gcc" + +[target.armv7-unknown-linux-gnueabihf] +linker = "arm-linux-gnueabihf-gcc" diff --git a/Makefile b/Makefile index f028df2..13ab148 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ build: cargo build --target=armv7-unknown-linux-gnueabihf deploy: build - scp ./target/armv7-unknown-linux-gnueabihf/debug/aw-lights pi: + scp ./target/armv7-unknown-linux-gnueabihf/debug/aw-lights pi:aw-lights-bin run: deploy ssh pi ./aw-lights