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