aboutsummaryrefslogtreecommitdiff
path: root/rules.mak
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-09-17 10:21:52 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2012-12-19 08:29:06 +0100
commit9d9199a003b7531257836d5abb0b30c250303885 (patch)
treefc8f1864ead1be7b7b172bdacdbb793bfe55d25c /rules.mak
parent7937e75b1aba66cf24c93e58c48cbb4d59d1c19c (diff)
build: adjust setting of QEMU_INCLUDES
Make it correct for nested directories, and move the static part from Makefile to configure. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rules.mak')
-rw-r--r--rules.mak3
1 files changed, 3 insertions, 0 deletions
diff --git a/rules.mak b/rules.mak
index d0b04e44f5..77d23605bf 100644
--- a/rules.mak
+++ b/rules.mak
@@ -14,6 +14,9 @@ MAKEFLAGS += -rR
# Flags for dependency generation
QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(*D)/$(*F).d
+# Same as -I$(SRC_PATH) -I., but for the nested source/object directories
+QEMU_CFLAGS += -I$(<D) -I$(@D)
+
%.o: %.c
$(call quiet-command,$(CC) $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<," CC $(TARGET_DIR)$@")