Unit testing framework and devicetree framework refactoring (#50)
[lunaix-os.git] / lunaix-os / tests / units / makefile
1 LUNAIX_ROOT ?= $(shell realpath ../../)
2
3 include test_build.mkinc
4
5 __test-dir := device-tree
6 test-dir := $(addprefix test-,$(__test-dir))
7
8 obj-stubs := 
9
10 obj-tmp := 
11 include stubs/makefile
12 obj-stubs += $(addprefix $(unit-test-root)/stubs/,$(obj-tmp))
13
14 export obj-stubs LUNAIX_ROOT
15 test-%:
16         $(call status,MK,$*)
17         @$(MAKE) $(MKFLAGS) -C $* $(_ACT) -I $(CURDIR)
18
19 .PHONY: all clean
20
21 all: _ACT := all
22 all: $(obj-stubs) $(test-dir)
23
24 run: _ACT := run
25 run: $(obj-stubs) $(test-dir)
26
27 clean: _ACT := clean
28 clean: $(test-dir)
29         @rm -f $(obj-stubs) $(obj-shared)