From a540f158db41205c3f7bad8b214f9738dc00724d Mon Sep 17 00:00:00 2001 From: Peter Crosthwaite Date: Thu, 18 Apr 2013 14:47:31 +1000 Subject: configure/Make: Build libfdt from submodule DTC Configure to use the DTC submodule to build libfdt when no system libfdt is found. Prompt to install the DTC submodule if --enable-fdt is set but no DTC can be found. DTC has no out-of-tree build capability, so the configure will symlink the Makefile and scripts directory in the out of tree build directory and pass in all the needed DTC arguments to make out of tree build happen. Ideally we fix the DTC make to support out of tree, but did it this way to avoid commits to DTC. Signed-off-by: David Holsgrove Signed-off-by: Peter Crosthwaite Reviewed-by: Peter Maydell Signed-off-by: Edgar E. Iglesias --- Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 67f19f2080..88375dcf90 100644 --- a/Makefile +++ b/Makefile @@ -145,6 +145,15 @@ pixman/Makefile: $(SRC_PATH)/pixman/configure $(SRC_PATH)/pixman/configure: (cd $(SRC_PATH)/pixman; autoreconf -v --install) +DTC_MAKE_ARGS=-I$(SRC_PATH)/dtc VPATH=$(SRC_PATH)/dtc -C dtc V="$(V)" LIBFDT_srcdir=$(SRC_PATH)/dtc/libfdt +DTC_CFLAGS=$(CFLAGS) $(extra_cflags) -I$(BUILD_DIR)/dtc -I$(SRC_PATH)/dtc -I$(SRC_PATH)/dtc/libfdt + +subdir-dtc:dtc/libfdt dtc/tests + $(call quiet-command,$(MAKE) $(DTC_MAKE_ARGS) CPPFLAGS="$(DTC_CFLAGS)" LDFLAGS="$(LDFLAGS)" ARFLAGS="$(ARFLAGS)" CC="$(CC)" AR="$(AR)" LD="$(LD)" $(SUBDIR_MAKEFLAGS) libfdt,) + +dtc/%: + mkdir -p $@ + $(SUBDIR_RULES): libqemuutil.a libqemustub.a $(common-obj-y) ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS)) @@ -262,6 +271,7 @@ distclean: clean rm -rf $$d || exit 1 ; \ done if test -f pixman/config.log; then make -C pixman distclean; fi + if test -f dtc/version_gen.h; then make $(DTC_MAKE_ARGS) clean; fi KEYMAPS=da en-gb et fr fr-ch is lt modifiers no pt-br sv \ ar de en-us fi fr-be hr it lv nl pl ru th \ -- cgit v1.2.1