aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPeter Crosthwaite <peter.crosthwaite@xilinx.com>2013-04-18 14:47:31 +1000
committerEdgar E. Iglesias <edgar.iglesias@gmail.com>2013-04-18 13:50:53 +0200
commita540f158db41205c3f7bad8b214f9738dc00724d (patch)
tree24a3d81ffdb0f24ccd811212d963681364418d88 /Makefile
parent98f6360569b1fbc1d94f6c8d7808577e4e5e0100 (diff)
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 <david.holsgrove@xilinx.com> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 10 insertions, 0 deletions
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 \