X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/9daf4fcdae88f72af60aeb0c7722841af02233d4..f89517343bf062d299d54408eea2f9387bfefb6d:/lunaix-os/tests/units/device-tree/makefile diff --git a/lunaix-os/tests/units/device-tree/makefile b/lunaix-os/tests/units/device-tree/makefile index 4d9d530..b008c5f 100644 --- a/lunaix-os/tests/units/device-tree/makefile +++ b/lunaix-os/tests/units/device-tree/makefile @@ -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