blob: 0dc922bb7aea524ca251a5ac345fc00c20c5617e [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001# SPDX-License-Identifier: GPL-2.0
David Gibson9fffb552009-04-30 15:25:53 +10002# scripts/dtc makefile
3
4hostprogs-y := dtc
5always := $(hostprogs-y)
6
7dtc-objs := dtc.o flattree.o fstree.o data.o livetree.o treesource.o \
John Bonesio658f29a2010-11-17 15:28:20 -08008 srcpos.o checks.o util.o
David Gibson9fffb552009-04-30 15:25:53 +10009dtc-objs += dtc-lexer.lex.o dtc-parser.tab.o
10
11# Source files need to get at the userspace version of libfdt_env.h to compile
12
13HOSTCFLAGS_DTC := -I$(src) -I$(src)/libfdt
14
15HOSTCFLAGS_checks.o := $(HOSTCFLAGS_DTC)
16HOSTCFLAGS_data.o := $(HOSTCFLAGS_DTC)
17HOSTCFLAGS_dtc.o := $(HOSTCFLAGS_DTC)
18HOSTCFLAGS_flattree.o := $(HOSTCFLAGS_DTC)
19HOSTCFLAGS_fstree.o := $(HOSTCFLAGS_DTC)
20HOSTCFLAGS_livetree.o := $(HOSTCFLAGS_DTC)
21HOSTCFLAGS_srcpos.o := $(HOSTCFLAGS_DTC)
22HOSTCFLAGS_treesource.o := $(HOSTCFLAGS_DTC)
John Bonesio658f29a2010-11-17 15:28:20 -080023HOSTCFLAGS_util.o := $(HOSTCFLAGS_DTC)
David Gibson9fffb552009-04-30 15:25:53 +100024
25HOSTCFLAGS_dtc-lexer.lex.o := $(HOSTCFLAGS_DTC)
26HOSTCFLAGS_dtc-parser.tab.o := $(HOSTCFLAGS_DTC)
27
28# dependencies on generated files need to be listed explicitly
Arnaud Lacombe95abef82011-05-23 03:17:20 -040029$(obj)/dtc-lexer.lex.o: $(obj)/dtc-parser.tab.h
David Gibson9fffb552009-04-30 15:25:53 +100030
Magnus Damm4f3be1c2012-11-16 15:53:14 +090031# generated files need to be cleaned explicitly
32clean-files := dtc-lexer.lex.c dtc-parser.tab.c dtc-parser.tab.h