summaryrefslogtreecommitdiffstats
path: root/scripts/dtc/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/dtc/Makefile')
-rw-r--r--scripts/dtc/Makefile9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/dtc/Makefile b/scripts/dtc/Makefile
index 1c943e03eaf2..056d5da6c477 100644
--- a/scripts/dtc/Makefile
+++ b/scripts/dtc/Makefile
@@ -1,7 +1,7 @@
1# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
2# scripts/dtc makefile 2# scripts/dtc makefile
3 3
4hostprogs-y := dtc 4hostprogs-$(CONFIG_DTC) := dtc
5always := $(hostprogs-y) 5always := $(hostprogs-y)
6 6
7dtc-objs := dtc.o flattree.o fstree.o data.o livetree.o treesource.o \ 7dtc-objs := dtc.o flattree.o fstree.o data.o livetree.o treesource.o \
@@ -11,6 +11,13 @@ dtc-objs += dtc-lexer.lex.o dtc-parser.tab.o
11# Source files need to get at the userspace version of libfdt_env.h to compile 11# Source files need to get at the userspace version of libfdt_env.h to compile
12HOST_EXTRACFLAGS := -I$(src)/libfdt 12HOST_EXTRACFLAGS := -I$(src)/libfdt
13 13
14ifeq ($(wildcard /usr/include/yaml.h),)
15HOST_EXTRACFLAGS += -DNO_YAML
16else
17dtc-objs += yamltree.o
18HOSTLDLIBS_dtc := -lyaml
19endif
20
14# Generated files need one more search path to include headers in source tree 21# Generated files need one more search path to include headers in source tree
15HOSTCFLAGS_dtc-lexer.lex.o := -I$(src) 22HOSTCFLAGS_dtc-lexer.lex.o := -I$(src)
16HOSTCFLAGS_dtc-parser.tab.o := -I$(src) 23HOSTCFLAGS_dtc-parser.tab.o := -I$(src)