Makefile: Fix builtin DTB compilation for out-of-tree platforms
authorAnup Patel <anup.patel@wdc.com>
Sat, 23 May 2020 06:01:18 +0000 (11:31 +0530)
committerAnup Patel <anup@brainfault.org>
Fri, 5 Jun 2020 03:32:27 +0000 (09:02 +0530)
The make rule for builtin DTB compilation does not consider
out-of-tree platforms so this patch fixes it.

Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
Makefile

index fe44ceb..79af171 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -348,6 +348,9 @@ $(platform_build_dir)/%.dep: $(platform_src_dir)/%.S
 $(platform_build_dir)/%.o: $(platform_src_dir)/%.S
        $(call compile_as,$@,$<)
 
+$(platform_build_dir)/%.dtb: $(platform_src_dir)/%.dts
+       $(call compile_dts,$@,$<)
+
 $(platform_build_dir)/%.dep: $(src_dir)/%.c
        $(call compile_cc_dep,$@,$<)
 
@@ -360,9 +363,6 @@ $(platform_build_dir)/%.dep: $(src_dir)/%.S
 $(platform_build_dir)/%.o: $(src_dir)/%.S
        $(call compile_as,$@,$<)
 
-$(build_dir)/%.dtb: $(src_dir)/%.dts
-       $(call compile_dts,$@,$<)
-
 # Rule for "make docs"
 $(build_dir)/docs/latex/refman.pdf: $(build_dir)/docs/latex/refman.tex
        $(CMD_PREFIX)mkdir -p $(build_dir)/docs