Message ID | 1347900303-24314-6-git-send-email-pbonzini@redhat.com |
---|---|
State | New |
Headers | show |
diff --git a/rules.mak b/rules.mak index 1b173aa..0327426 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., but for the object directory +QEMU_CFLAGS += -I$(@D) + %.o: %.c $(call quiet-command,$(CC) $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<," CC $(TARGET_DIR)$@")
When using a recursive make, -I. will automatically let you include generated files from a nested directory. This doesn't work for nonrecursive make such as the one used by QEMU. Add a rule that fixes this. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> --- rules.mak | 3 +++ 1 file modificato, 3 inserzioni(+)