kbuild: consolidate Devicetree dtb build rules
[linux-2.6-block.git] / arch / microblaze / boot / dts / Makefile
1 # SPDX-License-Identifier: GPL-2.0
2 #
3
4 ifneq ($(DTB),)
5 obj-y += linked_dtb.o
6
7 # Ensure system.dtb exists
8 $(obj)/linked_dtb.o: $(obj)/system.dtb
9
10 # Generate system.dtb from $(DTB).dtb
11 ifneq ($(DTB),system)
12 $(obj)/system.dtb: $(obj)/$(DTB).dtb
13         $(call if_changed,cp)
14 endif
15 endif
16
17 quiet_cmd_cp = CP      $< $@$2
18         cmd_cp = cat $< >$@$2 || (rm -f $@ && echo false)
19
20 # Rule to build device tree blobs
21 DTC_FLAGS := -p 1024