Unifying External Interrupt System (#51)
[lunaix-os.git] / lunaix-os / tests / units / units_build.mkinc
1 include $(LUNAIX_ROOT)/tests/shared/mkobj.mkinc
2 include $(LUNAIX_ROOT)/makeinc/utils.mkinc
3
4 tests := $(addsuffix .test,$(shell cat tests.txt))
5 run_tests := $(addprefix run.,$(tests))
6
7 BIN_DEPS += $(obj-dut)
8
9 .PHONY: all run clean
10
11 %.test: $(BIN_DEPS) test-%.o
12         $(call status,LD,$@)
13         @$(CC) $^ -o $@
14
15 run.%.test: %.test
16         $(call status,RUN,$^)
17         @./$^
18
19 all: $(tests)
20
21 run: $(tests) $(run_tests)
22
23 clean:
24         @rm -f *.o $(tests) $(obj-dut) $(TO_CLEAN)