From c86da84d30e4b72cfb4fee22b62bea4257bc14bf Mon Sep 17 00:00:00 2001 From: Grant Likely Date: Tue, 11 Sep 2018 15:41:31 -0500 Subject: Add support for YAML encoded output YAML encoded DT is useful for validation of DTs using binding schemas. The YAML encoding is an intermediate format used for validation and is therefore subject to change as needed. The YAML output is dependent on DTS input with type information preserved. Signed-off-by: Grant Likely [robh: make YAML support optional, build fixes, Travis CI test, preserve type information in paths and phandles] Signed-off-by: Rob Herring Signed-off-by: David Gibson --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index c4bfae6..7a472b7 100644 --- a/Makefile +++ b/Makefile @@ -46,6 +46,13 @@ else CFLAGS += $(shell $(PKG_CONFIG) --cflags valgrind) endif +NO_YAML := $(shell $(PKG_CONFIG) --exists yaml-0.1; echo $$?) +ifeq ($(NO_YAML),1) + CFLAGS += -DNO_YAML +else + LDLIBS += $(shell $(PKG_CONFIG) --libs yaml-0.1) +endif + ifeq ($(HOSTOS),darwin) SHAREDLIB_EXT = dylib SHAREDLIB_CFLAGS = -fPIC @@ -329,7 +336,7 @@ clean: libfdt_clean pylibfdt_clean tests_clean # %: %.o @$(VECHO) LD $@ - $(LINK.c) -o $@ $^ + $(LINK.c) -o $@ $^ $(LDLIBS) %.o: %.c @$(VECHO) CC $@ -- cgit v1.1