1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0 29fffb55fSDavid Gibson# scripts/dtc makefile 39fffb55fSDavid Gibson 4*c3476d2fSRob Herring# *** Also keep .gitignore in sync when changing *** 50da6bcd9SViresh Kumarhostprogs-always-$(CONFIG_DTC) += dtc fdtoverlay 6faabed29SMasahiro Yamadahostprogs-always-$(CHECK_DT_BINDING) += dtc 79fffb55fSDavid Gibson 89fffb55fSDavid Gibsondtc-objs := dtc.o flattree.o fstree.o data.o livetree.o treesource.o \ 9658f29a5SJohn Bonesio srcpos.o checks.o util.o 109fffb55fSDavid Gibsondtc-objs += dtc-lexer.lex.o dtc-parser.tab.o 119fffb55fSDavid Gibson 120da6bcd9SViresh Kumar# The upstream project builds libfdt as a separate library. We are choosing to 130da6bcd9SViresh Kumar# instead directly link the libfdt object files into fdtoverlay. 140da6bcd9SViresh Kumarlibfdt-objs := fdt.o fdt_ro.o fdt_wip.o fdt_sw.o fdt_rw.o fdt_strerror.o fdt_empty_tree.o fdt_addresses.o fdt_overlay.o 150da6bcd9SViresh Kumarlibfdt = $(addprefix libfdt/,$(libfdt-objs)) 160da6bcd9SViresh Kumarfdtoverlay-objs := $(libfdt) fdtoverlay.o util.o 170da6bcd9SViresh Kumar 189fffb55fSDavid Gibson# Source files need to get at the userspace version of libfdt_env.h to compile 19efe84d40SUwe Kleine-KönigHOST_EXTRACFLAGS += -I $(srctree)/$(src)/libfdt 20f858927fSRob HerringHOST_EXTRACFLAGS += -DNO_YAML 21f858927fSRob Herring 22e3fd9b53SMasahiro Yamada# Generated files need one more search path to include headers in source tree 239cc342f6SMasahiro YamadaHOSTCFLAGS_dtc-lexer.lex.o := -I $(srctree)/$(src) 249cc342f6SMasahiro YamadaHOSTCFLAGS_dtc-parser.tab.o := -I $(srctree)/$(src) 259fffb55fSDavid Gibson 269fffb55fSDavid Gibson# dependencies on generated files need to be listed explicitly 2795abef88SArnaud Lacombe$(obj)/dtc-lexer.lex.o: $(obj)/dtc-parser.tab.h 28