qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: aliguori@us.ibm.com, afaerber@suse.de
Subject: [Qemu-devel] [PATCH 03/32] build: adjust setting of QEMU_INCLUDES
Date: Thu,  6 Dec 2012 14:06:41 +0100	[thread overview]
Message-ID: <1354799230-30904-4-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1354799230-30904-1-git-send-email-pbonzini@redhat.com>

Make it correct for nested directories, and move the static part
from Makefile to configure.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 Makefile  |    2 --
 configure |    3 +--
 rules.mak |    3 +++
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 7e38112..9ebd3cd 100644
--- a/Makefile
+++ b/Makefile
@@ -145,8 +145,6 @@ audio/audio.o audio/fmodaudio.o: QEMU_CFLAGS += $(FMOD_CFLAGS)
 
 QEMU_CFLAGS+=$(CURL_CFLAGS)
 
-QEMU_CFLAGS += -I$(SRC_PATH)/include
-
 ui/cocoa.o: ui/cocoa.m
 
 ui/sdl.o audio/sdlaudio.o ui/sdl_zoom.o hw/baum.o: QEMU_CFLAGS += $(SDL_CFLAGS)
diff --git a/configure b/configure
index 994f731..caaa426 100755
--- a/configure
+++ b/configure
@@ -269,7 +269,7 @@ QEMU_CFLAGS="-fno-strict-aliasing $QEMU_CFLAGS"
 QEMU_CFLAGS="-Wall -Wundef -Wwrite-strings -Wmissing-prototypes $QEMU_CFLAGS"
 QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS"
 QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $QEMU_CFLAGS"
-QEMU_INCLUDES="-I. -I\$(SRC_PATH) -I\$(SRC_PATH)/fpu"
+QEMU_INCLUDES="-I. -I\$(SRC_PATH) -I\$(SRC_PATH)/include -I\$(SRC_PATH)/fpu"
 if test "$debug_info" = "yes"; then
     CFLAGS="-g $CFLAGS"
     LDFLAGS="-g $LDFLAGS"
@@ -3336,7 +3336,6 @@ fi
 if test "$slirp" = "yes" ; then
   echo "CONFIG_SLIRP=y" >> $config_host_mak
   echo "CONFIG_SMBD_COMMAND=\"$smbd\"" >> $config_host_mak
-  QEMU_INCLUDES="-I\$(SRC_PATH)/slirp $QEMU_INCLUDES"
 fi
 if test "$vde" = "yes" ; then
   echo "CONFIG_VDE=y" >> $config_host_mak
diff --git a/rules.mak b/rules.mak
index d0b04e4..77d2360 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)$@")
 
-- 
1.7.1

  parent reply	other threads:[~2012-12-06 13:07 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-06 13:06 [Qemu-devel] [PATCH 00/32] Build cleanups and header file movement to include/ Paolo Bonzini
2012-12-06 13:06 ` [Qemu-devel] [PATCH 01/32] libcacard: simplify rules for recursive build Paolo Bonzini
2012-12-06 13:06 ` [Qemu-devel] [PATCH 02/32] vscclient: use per-target variables Paolo Bonzini
2012-12-06 13:06 ` Paolo Bonzini [this message]
2012-12-06 13:06 ` [Qemu-devel] [PATCH 04/32] build: add $(TARGET_DIR) to "GEN config-target.h" lines Paolo Bonzini
2012-12-06 13:06 ` [Qemu-devel] [PATCH 05/32] build: move rules from Makefile to */Makefile.objs Paolo Bonzini
2012-12-06 13:06 ` [Qemu-devel] [PATCH 06/32] build: create ldscripts/ Paolo Bonzini
2012-12-06 13:06 ` [Qemu-devel] [PATCH 07/32] build: kill libdis, move disassemblers to disas/ Paolo Bonzini
2012-12-06 13:06 ` [Qemu-devel] [PATCH 08/32] build: kill libuser Paolo Bonzini
2012-12-06 13:06 ` [Qemu-devel] [PATCH 09/32] janitor: do not rely on indirect inclusions of or from qemu-char.h Paolo Bonzini
2012-12-06 13:06 ` [Qemu-devel] [PATCH 10/32] janitor: do not include qemu-char everywhere Paolo Bonzini
2012-12-06 13:06 ` [Qemu-devel] [PATCH 11/32] net: move Bluetooth stuff out of net.h Paolo Bonzini
2012-12-06 13:06 ` [Qemu-devel] [PATCH 12/32] net: do not include net.h everywhere Paolo Bonzini
2012-12-06 13:06 ` [Qemu-devel] [PATCH 13/32] net: move net.c to net/ Paolo Bonzini
2012-12-06 13:06 ` [Qemu-devel] [PATCH 14/32] net: reorganize headers Paolo Bonzini
2012-12-06 13:06 ` [Qemu-devel] [PATCH 15/32] qemu-ga: move qemu-ga files to qga/ Paolo Bonzini
2012-12-06 13:06 ` [Qemu-devel] [PATCH 16/32] ui: move files to ui/ and include/ui/ Paolo Bonzini
2012-12-06 13:06 ` [Qemu-devel] [PATCH 17/32] qapi: move inclusions of qemu-common.h from headers to .c files Paolo Bonzini
2012-12-06 13:06 ` [Qemu-devel] [PATCH 18/32] qapi: remove qapi/qapi-types-core.h Paolo Bonzini
2012-12-06 13:06 ` [Qemu-devel] [PATCH 19/32] qapi: make struct Visitor opaque Paolo Bonzini
2012-12-06 13:06 ` [Qemu-devel] [PATCH 20/32] janitor: add guards to headers Paolo Bonzini
2012-12-06 13:06 ` [Qemu-devel] [PATCH 21/32] qapi: move include files to include/qapi/ Paolo Bonzini
2012-12-06 13:07 ` [Qemu-devel] [PATCH 22/32] block: move include files to include/block/ Paolo Bonzini
2012-12-06 13:07 ` [Qemu-devel] [PATCH 23/32] exec: move include files to include/exec/ Paolo Bonzini
2012-12-06 13:07 ` [Qemu-devel] [PATCH 24/32] monitor: move include files to include/monitor/ Paolo Bonzini
2012-12-06 13:07 ` [Qemu-devel] [PATCH 25/32] migration: move include files to include/migration/ Paolo Bonzini
2012-12-06 13:07 ` [Qemu-devel] [PATCH 26/32] qom: move include files to include/qom/ Paolo Bonzini
2012-12-06 13:07 ` [Qemu-devel] [PATCH 27/32] misc: move include files to include/qemu/ Paolo Bonzini
2012-12-06 13:07 ` [Qemu-devel] [PATCH 28/32] softmmu: move include files to include/sysemu/ Paolo Bonzini
2013-01-07  1:15   ` Amos Kong
2012-12-06 13:07 ` [Qemu-devel] [PATCH 29/32] softmmu: move remaining include files to include/ subdirectories Paolo Bonzini
2012-12-06 13:07 ` [Qemu-devel] [PATCH 30/32] fpu: move public header file to include/fpu Paolo Bonzini
2012-12-06 13:07 ` [Qemu-devel] [PATCH 31/32] hw: move executable format header files to hw/ Paolo Bonzini
2012-12-06 13:07 ` [Qemu-devel] [PATCH 32/32] janitor: move remaining public headers to include/ Paolo Bonzini
2012-12-11  8:45 ` [Qemu-devel] [PATCH 00/32] Build cleanups and header file movement " Stefan Hajnoczi
  -- strict thread matches above, loose matches on Subject: below --
2012-12-17 18:17 [Qemu-devel] [PULL 00/45] Include reorganization + PCI patch queue Paolo Bonzini
2012-12-17 18:17 ` [Qemu-devel] [PATCH 03/32] build: adjust setting of QEMU_INCLUDES Paolo Bonzini
2012-10-24 12:58 [Qemu-devel] [PATCH 00/32] Header file renaming and cleanup Paolo Bonzini
2012-10-24 12:58 ` [Qemu-devel] [PATCH 03/32] build: adjust setting of QEMU_INCLUDES Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1354799230-30904-4-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=afaerber@suse.de \
    --cc=aliguori@us.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).