Unit testing framework and devicetree framework refactoring (#50)
[lunaix-os.git] / lunaix-os / tests / units / makefile
diff --git a/lunaix-os/tests/units/makefile b/lunaix-os/tests/units/makefile
new file mode 100644 (file)
index 0000000..66cf8ab
--- /dev/null
@@ -0,0 +1,29 @@
+LUNAIX_ROOT ?= $(shell realpath ../../)
+
+include test_build.mkinc
+
+__test-dir := device-tree
+test-dir := $(addprefix test-,$(__test-dir))
+
+obj-stubs := 
+
+obj-tmp := 
+include stubs/makefile
+obj-stubs += $(addprefix $(unit-test-root)/stubs/,$(obj-tmp))
+
+export obj-stubs LUNAIX_ROOT
+test-%:
+       $(call status,MK,$*)
+       @$(MAKE) $(MKFLAGS) -C $* $(_ACT) -I $(CURDIR)
+
+.PHONY: all clean
+
+all: _ACT := all
+all: $(obj-stubs) $(test-dir)
+
+run: _ACT := run
+run: $(obj-stubs) $(test-dir)
+
+clean: _ACT := clean
+clean: $(test-dir)
+       @rm -f $(obj-stubs) $(obj-shared)
\ No newline at end of file