aboutsummaryrefslogtreecommitdiff
path: root/tests/simple_torus3d/source.mk
blob: e045a3c35634e4bc33da9672b78d3e1b29d6bf0c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
TORUS3D_TEST_OBJ	!= ./scripts/gen-deps --sources "tests/simple_torus3d/sim.c"
TEST_PROGS		+= build/tests/simple_torus3d/sim

build/tests/simple_torus3d/test.inc: tests/simple_torus3d/test.c
	riscv64-unknown-elf-gcc -O2 -Wall -Wextra -ffreestanding -nostdlib \
		-march=rv64i -mabi=lp64 \
		-o build/tests/simple_torus3d/test \
		tests/simple_torus3d/test.c
	riscv64-unknown-elf-objcopy -Obinary \
		build/tests/simple_torus3d/test \
		build/tests/simple_torus3d/test.bin
	xxd -i build/tests/simple_torus3d/test.bin \
		> build/tests/simple_torus3d/test.inc

build/tests/simple_torus3d/sim.o: build/tests/simple_torus3d/test.inc

build/tests/simple_torus3d/sim: $(TORUS3D_TEST_OBJ) $(OBJS)
	$(COMPILE) $(TORUS3D_TEST_OBJ) $(OBJS) -o $@