summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorPeter Maydell2013-06-21 15:00:17 +0200
committerMichael Tokarev2013-06-21 20:52:50 +0200
commit965f486c21a0a8fed33e65278516edfc01d1e2fd (patch)
treefe6e4dfe0878a63b3d7a405b082c3a9a73506878 /Makefile
parentqapi: lack of two commas in dict (diff)
downloadqemu-965f486c21a0a8fed33e65278516edfc01d1e2fd.tar.gz
qemu-965f486c21a0a8fed33e65278516edfc01d1e2fd.tar.xz
qemu-965f486c21a0a8fed33e65278516edfc01d1e2fd.zip
Makefile: pass include directives to dtc via CPPFLAGS, not CFLAGS
The dtc submodule's makefile expects -I include directives to be in CPPFLAGS, not CFLAGS. Getting this wrong meant that the include directive would not be applied when generating the dependency .d files. This in turn meant that we couldn't build libfdt when doing an out of tree build with clang. (gcc's dependency output is slightly different from clang in this situation so it happened to work.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 3cfa7d0f75..c06bfaba20 100644
--- a/Makefile
+++ b/Makefile
@@ -146,10 +146,11 @@ $(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) $(QEMU_CFLAGS) -I$(BUILD_DIR)/dtc -I$(SRC_PATH)/dtc -I$(SRC_PATH)/dtc/libfdt
+DTC_CFLAGS=$(CFLAGS) $(QEMU_CFLAGS)
+DTC_CPPFLAGS=-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) CFLAGS="$(DTC_CFLAGS)" LDFLAGS="$(LDFLAGS)" ARFLAGS="$(ARFLAGS)" CC="$(CC)" AR="$(AR)" LD="$(LD)" $(SUBDIR_MAKEFLAGS) libfdt/libfdt.a,)
+ $(call quiet-command,$(MAKE) $(DTC_MAKE_ARGS) CPPFLAGS="$(DTC_CPPFLAGS)" CFLAGS="$(DTC_CFLAGS)" LDFLAGS="$(LDFLAGS)" ARFLAGS="$(ARFLAGS)" CC="$(CC)" AR="$(AR)" LD="$(LD)" $(SUBDIR_MAKEFLAGS) libfdt/libfdt.a,)
dtc/%:
mkdir -p $@