From b07a942993efe44e5dbdff8088b0ed87c79fc433 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Fri, 5 Jul 2024 00:20:22 +0200 Subject: cross: mini zig cross compile --- example-cross-compile/Makefile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 example-cross-compile/Makefile (limited to 'example-cross-compile/Makefile') diff --git a/example-cross-compile/Makefile b/example-cross-compile/Makefile new file mode 100644 index 0000000..72f611d --- /dev/null +++ b/example-cross-compile/Makefile @@ -0,0 +1,17 @@ +riscv64: lin-riscv64 +aarch64: lin-aarch64 +mips64el: lin-mips64el + +lin-%: + zig build-exe lin.zig -target $*-linux-musl --name $*.elf + file $*.elf + qemu-$* $*.elf + +win: + zig build-exe win.zig -target x86_64-windows -lc + file win.exe + wine win.exe + +clean: + git clean -fdx . + -- cgit v1.2.3