Initial test framework

Clean up makefiles
Everything buildable under docker (or natively)
This commit is contained in:
Toby Jaffey 2025-12-10 16:36:33 +00:00
parent 5a0c70a017
commit da7f70c456
48 changed files with 7254 additions and 293 deletions

View file

@ -1,12 +1,15 @@
all:
# zig's objcopy is broken, so use external tool
# https://ziggit.dev/t/addobjcopy-producing-zero-padding-at-start-of-binary/13384
zig build && docker run -v `pwd`:/data -w /data --rm riscv-dev riscv64-unknown-elf-objcopy zig-out/bin/mandel -O binary mandel.bin
PROJECT=mandel
TOPDIR=../../
clean:
rm -rf mandel.bin zig-out .zig-cache
all:
@# zig's objcopy is broken, so use external tool
@# https://ziggit.dev/t/addobjcopy-producing-zero-padding-at-start-of-binary/13384
zig build && ${PREFIX}objcopy zig-out/bin/${PROJECT} -O binary ${PROJECT}.bin
clean: clean_common
rm -rf zig-out .zig-cache
test: all
../../host/host mandel.bin
${TOPDIR}/host/host ${PROJECT}.bin
include ${TOPDIR}/apps/makefile.common