Unifying External Interrupt System (#51)
[lunaix-os.git] / lunaix-os / tests / units / device-tree / makefile
index 4d9d53095f134ac796f29a6ed626a965a4b63231..b008c5fb39ebeb32a18fe2f5513a8aaead9813ba 100644 (file)
@@ -1,38 +1,18 @@
-include test_build.mkinc
+obj-dut := dut/dt_interrupt.o \
+                       dut/dt.o \
+                       dut/dtspec.o \
+                       dut/changeling.o
 
-tests := $(shell cat tests.txt)
-
-obj = dut/dt_interrupt.o \
-         dut/dt.o \
-         dut/dtspec.o \
-         dut/changeling.o \
-
-dtbs := $(addprefix samples/,$(addsuffix .dtb,$(tests)))
-
-tests := $(addsuffix .test,$(tests))
-run_tests := $(addprefix run.,$(tests))
+BIN_DEPS += load.%.o
+CFLAGS   += -DCONFIG_USE_DEVICETREE -Wp,-w
 
+.PRECIOUS: %.dtb
 %.dtb: %.dts
        $(call status,DTC,$^)
        @dtc -q -I dts -O dtb $^ -o $@
 
-.PHONY: all run clean
-
-load.%.o:: load.c
+load.%.o: load.c samples/%.dtb
        $(call status,CC,$@)
-       @$(CC) $(CFLAGS) -DTEST_DTBFILE=\"samples/$*.dtb\" -c $^ -o $@
-
-%.test: $(obj-shared) $(obj-stubs) $(obj) test-%.o load.%.o
-       $(call status,LD,$@)
-       @$(CC) $^ -o $@
-
-run.%.test: %.test
-       $(call status,RUN,$^)
-       @./$^
-
-all: $(dtbs) $(tests)
-
-run: $(dtbs) $(tests) $(run_tests)
+       @$(CC) $(CFLAGS) -DTEST_DTBFILE=\"samples/$*.dtb\" -c $< -o $@
 
-clean:
-       @rm -f *.o $(obj) $(test) $(dtbs)
\ No newline at end of file
+include units_build.mkinc
\ No newline at end of file