Framework for exporting system header to user space (#59)
[lunaix-os.git] / lunaix-os / tests / units / makefile
1 LUNAIX_ROOT ?= $(shell realpath ../../)
2
3 include $(LUNAIX_ROOT)/tests/shared/makefile
4 include $(LUNAIX_ROOT)/tests/shared/mkobj.mkinc
5
6 MAKEFLAGS += --no-print-directory
7 CFLAGS += -isystem $(unit-test-root)/stubs/includes
8
9 __test-dir := device-tree btrie
10 test-dir := $(addprefix test-,$(__test-dir))
11
12 obj-stubs := 
13
14 obj-tmp := 
15 include stubs/makefile
16 obj-stubs += $(addprefix $(unit-test-root)/stubs/,$(obj-tmp))
17
18 BIN_DEPS := $(obj-stubs) $(obj-shared)
19
20 export BIN_DEPS CFLAGS LUNAIX_ROOT
21 test-%:
22         $(call status,MK,$*)
23         @$(MAKE) $(MKFLAGS) -C $* $(_ACT) -I $(CURDIR)
24
25 .PHONY: all clean
26
27 all: _ACT := all
28 all: $(obj-stubs) $(test-dir)
29
30 run: _ACT := run
31 run: $(obj-stubs) $(test-dir)
32
33 clean: _ACT := clean
34 clean: $(test-dir)
35         @rm -f $(obj-stubs) $(obj-shared)