diff mbox

[2/2] build: create shared-obj-y for tools/qemu-softmmu

Message ID adc61f1126fb2bcb1cd5fa9a5abfbda37bdb3a9b.1298542814.git.quintela@redhat.com
State New
Headers show

Commit Message

Juan Quintela Feb. 24, 2011, 10:33 a.m. UTC
There are objects that need to be in both places, just make it explicit
in a single place.

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile      |    4 +---
 Makefile.objs |   14 +++++++++-----
 2 files changed, 10 insertions(+), 8 deletions(-)

Comments

Peter Maydell Feb. 24, 2011, 11:12 a.m. UTC | #1
On 24 February 2011 10:33, Juan Quintela <quintela@redhat.com> wrote:
> +# shared-obj-y has the object that are shared by qemu binary and tools
> +
> +shared-obj-y  = qemu-error.o $(block-obj-y) $(qobject-obj-y) $(oslib-obj-y)
> +shared-obj-y += qemu-timer-common.o

I don't feel very strongly about this, but:
It seems a bit odd to have a shared-obj-y variable that isn't actually
a list of shared objects (ie .so files, DLLs). Maybe there's a better name?

-- PMM
Markus Armbruster Feb. 24, 2011, 11:44 a.m. UTC | #2
Peter Maydell <peter.maydell@linaro.org> writes:

> On 24 February 2011 10:33, Juan Quintela <quintela@redhat.com> wrote:
>> +# shared-obj-y has the object that are shared by qemu binary and tools
>> +
>> +shared-obj-y  = qemu-error.o $(block-obj-y) $(qobject-obj-y) $(oslib-obj-y)
>> +shared-obj-y += qemu-timer-common.o
>
> I don't feel very strongly about this, but:
> It seems a bit odd to have a shared-obj-y variable that isn't actually
> a list of shared objects (ie .so files, DLLs). Maybe there's a better name?

common-obj-y?
Juan Quintela Feb. 24, 2011, 12:19 p.m. UTC | #3
Markus Armbruster <armbru@redhat.com> wrote:
> Peter Maydell <peter.maydell@linaro.org> writes:
>
>> On 24 February 2011 10:33, Juan Quintela <quintela@redhat.com> wrote:
>>> +# shared-obj-y has the object that are shared by qemu binary and tools
>>> +
>>> +shared-obj-y  = qemu-error.o $(block-obj-y) $(qobject-obj-y) $(oslib-obj-y)
>>> +shared-obj-y += qemu-timer-common.o
>>
>> I don't feel very strongly about this, but:
>> It seems a bit odd to have a shared-obj-y variable that isn't actually
>> a list of shared objects (ie .so files, DLLs). Maybe there's a better name?
>
> common-obj-y?

already taken :-(

common-obj-y is the list of files that are shared by all qemu-softmmu

######################################################################
# libqemu_common.a: Target independent part of system emulation. The
# long term path is to suppress *all* target specific code in case of
# system emulation, i.e. a single QEMU executable should support all
# CPUs and machines.
common-obj-y = $(block-obj-y) blockdev.o
...

so, this is the list of files that are shared between all the softmmu
(common) and the tools.

I am open to suggestions, but all names I thought are worse than shared
(common-common-obj-y) :p

Later, Juan.
Markus Armbruster Feb. 24, 2011, 1:53 p.m. UTC | #4
Juan Quintela <quintela@redhat.com> writes:

> Markus Armbruster <armbru@redhat.com> wrote:
>> Peter Maydell <peter.maydell@linaro.org> writes:
>>
>>> On 24 February 2011 10:33, Juan Quintela <quintela@redhat.com> wrote:
>>>> +# shared-obj-y has the object that are shared by qemu binary and tools
>>>> +
>>>> +shared-obj-y  = qemu-error.o $(block-obj-y) $(qobject-obj-y) $(oslib-obj-y)
>>>> +shared-obj-y += qemu-timer-common.o
>>>
>>> I don't feel very strongly about this, but:
>>> It seems a bit odd to have a shared-obj-y variable that isn't actually
>>> a list of shared objects (ie .so files, DLLs). Maybe there's a better name?
>>
>> common-obj-y?
>
> already taken :-(
>
> common-obj-y is the list of files that are shared by all qemu-softmmu
>
> ######################################################################
> # libqemu_common.a: Target independent part of system emulation. The
> # long term path is to suppress *all* target specific code in case of
> # system emulation, i.e. a single QEMU executable should support all
> # CPUs and machines.
> common-obj-y = $(block-obj-y) blockdev.o
> ...
>
> so, this is the list of files that are shared between all the softmmu
> (common) and the tools.
>
> I am open to suggestions, but all names I thought are worse than shared
> (common-common-obj-y) :p

really-common-obj-y?  ;)

Seriously, what about renaming common-obj-y away?  target-indep-obj-y?
Paolo Bonzini Feb. 24, 2011, 1:58 p.m. UTC | #5
On 02/24/2011 02:53 PM, Markus Armbruster wrote:
> really-common-obj-y?;)
>
> Seriously, what about renaming common-obj-y away?  target-indep-obj-y?

softmmu-obj-y?

Paolo
Juan Quintela Feb. 24, 2011, 2:09 p.m. UTC | #6
Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 02/24/2011 02:53 PM, Markus Armbruster wrote:
>> really-common-obj-y?;)
>>
>> Seriously, what about renaming common-obj-y away?  target-indep-obj-y?
>
> softmmu-obj-y?

Waiting for Anthony to decide anything, renaming the variable is the
easy thing to do.

Later, Juan.
diff mbox

Patch

diff --git a/Makefile b/Makefile
index 9e090cb..1902f96 100644
--- a/Makefile
+++ b/Makefile
@@ -150,9 +150,7 @@  version.o: $(SRC_PATH)/version.rc config-host.mak
 version-obj-$(CONFIG_WIN32) += version.o
 ######################################################################

-tools-obj-y=qemu-tool.o qemu-error.o $(oslib-obj-y) $(trace-obj-y)
-tools-obj-y+=$(block-obj-y) $(qobject-obj-y) $(version-obj-y)
-tools-obj-y+=qemu-timer-common.o
+tools-obj-y = qemu-tool.o $(shared-obj-y) $(trace-obj-y) $(version-obj-y)

 qemu-img.o: qemu-img-cmds.h
 qemu-img.o qemu-tool.o qemu-nbd.o qemu-io.o cmd.o: $(GENERATED_HEADERS)
diff --git a/Makefile.objs b/Makefile.objs
index 9e98a66..5849487 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -54,17 +54,21 @@  fsdev-nested-$(CONFIG_VIRTFS) = qemu-fsdev.o
 fsdev-obj-$(CONFIG_VIRTFS) += $(addprefix fsdev/, $(fsdev-nested-y))

 ######################################################################
+# shared-obj-y has the object that are shared by qemu binary and tools
+
+shared-obj-y  = qemu-error.o $(block-obj-y) $(qobject-obj-y) $(oslib-obj-y)
+shared-obj-y += qemu-timer-common.o
+
+######################################################################
 # libqemu_common.a: Target independent part of system emulation. The
 # long term path is to suppress *all* target specific code in case of
 # system emulation, i.e. a single QEMU executable should support all
 # CPUs and machines.

-common-obj-y = $(block-obj-y) blockdev.o
+common-obj-y = $(shared-obj-y) blockdev.o
 common-obj-y += $(net-obj-y)
-common-obj-y += $(qobject-obj-y)
 common-obj-$(CONFIG_LINUX) += $(fsdev-obj-$(CONFIG_LINUX))
-common-obj-y += readline.o console.o cursor.o async.o qemu-error.o
-common-obj-y += $(oslib-obj-y)
+common-obj-y += readline.o console.o cursor.o async.o
 common-obj-$(CONFIG_WIN32) += os-win32.o
 common-obj-$(CONFIG_POSIX) += os-posix.o

@@ -145,7 +149,7 @@  common-obj-y += iov.o acl.o
 common-obj-$(CONFIG_THREAD) += qemu-thread.o
 common-obj-$(CONFIG_POSIX) += compatfd.o
 common-obj-y += notify.o event_notifier.o
-common-obj-y += qemu-timer.o qemu-timer-common.o
+common-obj-y += qemu-timer.o

 slirp-obj-y = cksum.o if.o ip_icmp.o ip_input.o ip_output.o
 slirp-obj-y += slirp.o mbuf.o misc.o sbuf.o socket.o tcp_input.o tcp_output.o