qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fam Zheng <famz@redhat.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Makefiles: convert some obj-specific CFLAGS to use new foo.o-cflags syntax
Date: Sun, 4 May 2014 09:45:39 +0800	[thread overview]
Message-ID: <20140504014539.GD1124@T430.nay.redhat.com> (raw)
In-Reply-To: <1399030854-23359-1-git-send-email-mjt@msgid.tls.msk.ru>

On Fri, 05/02 15:40, Michael Tokarev wrote:
> Current Makefile system allows using foo.o-cflags variables to store
> object-specific CFLAGS.  Convert some usages of old syntax
> (using QEMU_CFLAGS += construct) to the new syntax.

Thanks for doing this! Two minor comments below, but not showstopper,

Reviewed-by: Fam Zheng <famz@redhat.com>

> 
> Do not touch multifile modules for now, as build system isn't ready for this.
> 
> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
> ---
>  Makefile               |    6 ------
>  Makefile.objs          |    2 ++
>  audio/Makefile.objs    |    2 +-
>  backends/Makefile.objs |    2 +-
>  disas/Makefile.objs    |    2 +-
>  ui/Makefile.objs       |    2 +-
>  6 files changed, 6 insertions(+), 10 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 423e373..0e32b27 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -148,10 +148,6 @@ endif
>  
>  all: $(DOCS) $(TOOLS) $(HELPERS-y) recurse-all modules
>  
> -vl.o: QEMU_CFLAGS+=$(GPROF_CFLAGS)
> -
> -vl.o: QEMU_CFLAGS+=$(SDL_CFLAGS)
> -
>  config-host.h: config-host.h-timestamp
>  config-host.h-timestamp: config-host.mak
>  qemu-options.def: $(SRC_PATH)/qemu-options.hx
> @@ -195,8 +191,6 @@ ALL_SUBDIRS=$(TARGET_DIRS) $(patsubst %,pc-bios/%, $(ROMS))
>  
>  recurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES)
>  
> -bt-host.o: QEMU_CFLAGS += $(BLUEZ_CFLAGS)
> -
>  $(BUILD_DIR)/version.o: $(SRC_PATH)/version.rc $(BUILD_DIR)/config-host.h | $(BUILD_DIR)/version.lo
>  	$(call quiet-command,$(WINDRES) -I$(BUILD_DIR) -o $@ $<,"  RC    version.o")
>  $(BUILD_DIR)/version.lo: $(SRC_PATH)/version.rc $(BUILD_DIR)/config-host.h
> diff --git a/Makefile.objs b/Makefile.objs
> index a6e0e2a..f0069ba 100644
> --- a/Makefile.objs
> +++ b/Makefile.objs
> @@ -64,9 +64,11 @@ common-obj-y += hw/
>  
>  common-obj-y += ui/
>  common-obj-y += bt-host.o bt-vhci.o
> +bt-host.o-cflags := $(BLUEZ_CFLAGS)
>  
>  common-obj-y += dma-helpers.o
>  common-obj-y += vl.o
> +vl.o-cflags := $(GPROF_CFLAGS) $(SDL_CFLAGS)
>  common-obj-y += tpm.o
>  
>  common-obj-$(CONFIG_SLIRP) += slirp/
> diff --git a/audio/Makefile.objs b/audio/Makefile.objs
> index d71a877..bdb12c6 100644
> --- a/audio/Makefile.objs
> +++ b/audio/Makefile.objs
> @@ -14,4 +14,4 @@ common-obj-$(CONFIG_AUDIO_WIN_INT) += audio_win_int.o
>  common-obj-y += wavcapture.o
>  
>  $(obj)/audio.o $(obj)/fmodaudio.o: QEMU_CFLAGS += $(FMOD_CFLAGS)
> -$(obj)/sdlaudio.o: QEMU_CFLAGS += $(SDL_CFLAGS)
> +sdlaudio.o-cflags  := $(SDL_CFLAGS)

s/  / /

> diff --git a/backends/Makefile.objs b/backends/Makefile.objs
> index 42557d5..bbe8a2d 100644
> --- a/backends/Makefile.objs
> +++ b/backends/Makefile.objs
> @@ -3,6 +3,6 @@ common-obj-$(CONFIG_POSIX) += rng-random.o
>  
>  common-obj-y += msmouse.o
>  common-obj-$(CONFIG_BRLAPI) += baum.o
> -$(obj)/baum.o: QEMU_CFLAGS += $(SDL_CFLAGS) 
> +baum.o-cflags := $(SDL_CFLAGS) 

Could remove the ending whitespace since you are touch this line.

Thanks,
Fam

>  
>  common-obj-$(CONFIG_TPM) += tpm.o
> diff --git a/disas/Makefile.objs b/disas/Makefile.objs
> index 41c2374..8dae4da 100644
> --- a/disas/Makefile.objs
> +++ b/disas/Makefile.objs
> @@ -4,7 +4,7 @@ common-obj-$(CONFIG_ARM_DIS) += arm.o
>  common-obj-$(CONFIG_ARM_A64_DIS) += arm-a64.o
>  common-obj-$(CONFIG_ARM_A64_DIS) += libvixl/
>  libvixldir = $(SRC_PATH)/disas/libvixl
> -$(obj)/arm-a64.o: QEMU_CFLAGS += -I$(libvixldir)
> +arm-a64.o-cflags := -I$(libvixldir)
>  common-obj-$(CONFIG_CRIS_DIS) += cris.o
>  common-obj-$(CONFIG_HPPA_DIS) += hppa.o
>  common-obj-$(CONFIG_I386_DIS) += i386.o
> diff --git a/ui/Makefile.objs b/ui/Makefile.objs
> index 6f2294e..4af420b 100644
> --- a/ui/Makefile.objs
> +++ b/ui/Makefile.objs
> @@ -17,4 +17,4 @@ common-obj-$(CONFIG_GTK) += gtk.o x_keymap.o
>  
>  $(obj)/sdl.o $(obj)/sdl_zoom.o $(obj)/sdl2.o: QEMU_CFLAGS += $(SDL_CFLAGS)
>  
> -$(obj)/gtk.o: QEMU_CFLAGS += $(GTK_CFLAGS) $(VTE_CFLAGS)
> +gtk.o-cflags := $(GTK_CFLAGS) $(VTE_CFLAGS)
> -- 
> 1.7.10.4
> 

  reply	other threads:[~2014-05-04  1:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-02 11:40 [Qemu-devel] [PATCH] Makefiles: convert some obj-specific CFLAGS to use new foo.o-cflags syntax Michael Tokarev
2014-05-04  1:45 ` Fam Zheng [this message]
2014-05-04  8:20   ` Michael Tokarev

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=20140504014539.GD1124@T430.nay.redhat.com \
    --to=famz@redhat.com \
    --cc=mjt@tls.msk.ru \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@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).