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

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

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

build/tests/simple_mesh3d/sim: $(MESH3D_TEST_OBJ) $(OBJS)
	$(COMPILE) $(MESH3D_TEST_OBJ) $(OBJS) -o $@