scripts/dtc: Update to upstream version v1.4.7-14-gc86da84d30e4
[linux-2.6-microblaze.git] / scripts / dtc / Makefile
index 1c943e0..81c6f51 100644 (file)
@@ -11,6 +11,13 @@ dtc-objs     += dtc-lexer.lex.o dtc-parser.tab.o
 # Source files need to get at the userspace version of libfdt_env.h to compile
 HOST_EXTRACFLAGS := -I$(src)/libfdt
 
+ifeq ($(wildcard /usr/include/yaml.h),)
+HOST_EXTRACFLAGS += -DNO_YAML
+else
+dtc-objs       += yamltree.o
+HOSTLDLIBS_dtc := -lyaml
+endif
+
 # Generated files need one more search path to include headers in source tree
 HOSTCFLAGS_dtc-lexer.lex.o := -I$(src)
 HOSTCFLAGS_dtc-parser.tab.o := -I$(src)