* [Qemu-devel] [PATCH v2 0/3] build: make sharing of objects explicit
@ 2011-03-10 13:58 Juan Quintela
2011-03-10 13:58 ` [Qemu-devel] [PATCH 1/3] build: Create tools-obj-y variable Juan Quintela
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Juan Quintela @ 2011-03-10 13:58 UTC (permalink / raw)
To: qemu-devel
Hi
Another week, another version.
v2:
- rename common-obj-y to softmmu-obj-y, so we can use common-obj-y
for objects shared between tools and softmmu.
v1:
- all tools shared the same list of object files, create a variable instead
or repeating them (tools-obj-y).
- tools and softmmu targets share lots of objects, just make that explicit
with shared-obj-y.
Please review, Juan.
Juan Quintela (3):
build: Create tools-obj-y variable
build: Rename common-obj-y to softmmu-obj-y
build: Create common-obj-y for objects shared between tools and
softmmu
Makefile | 12 +++--
Makefile.objs | 120 ++++++++++++++++++++++++++++--------------------------
Makefile.target | 2 +-
3 files changed, 70 insertions(+), 64 deletions(-)
--
1.7.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH 1/3] build: Create tools-obj-y variable
2011-03-10 13:58 [Qemu-devel] [PATCH v2 0/3] build: make sharing of objects explicit Juan Quintela
@ 2011-03-10 13:58 ` Juan Quintela
2011-03-10 13:58 ` [Qemu-devel] [PATCH 2/3] build: Rename common-obj-y to softmmu-obj-y Juan Quintela
2011-03-10 13:58 ` [Qemu-devel] [PATCH 3/3] build: Create common-obj-y for objects shared between tools and softmmu Juan Quintela
2 siblings, 0 replies; 4+ messages in thread
From: Juan Quintela @ 2011-03-10 13:58 UTC (permalink / raw)
To: qemu-devel
All our tools have to have exactly all this objects, just share them.
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
Makefile | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index eca4c76..9e090cb 100644
--- a/Makefile
+++ b/Makefile
@@ -150,14 +150,18 @@ 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
+
qemu-img.o: qemu-img-cmds.h
qemu-img.o qemu-tool.o qemu-nbd.o qemu-io.o cmd.o: $(GENERATED_HEADERS)
-qemu-img$(EXESUF): qemu-img.o qemu-tool.o qemu-error.o $(oslib-obj-y) $(trace-obj-y) $(block-obj-y) $(qobject-obj-y) $(version-obj-y) qemu-timer-common.o
+qemu-img$(EXESUF): qemu-img.o $(tools-obj-y)
-qemu-nbd$(EXESUF): qemu-nbd.o qemu-tool.o qemu-error.o $(oslib-obj-y) $(trace-obj-y) $(block-obj-y) $(qobject-obj-y) $(version-obj-y) qemu-timer-common.o
+qemu-nbd$(EXESUF): qemu-nbd.o $(tools-obj-y)
-qemu-io$(EXESUF): qemu-io.o cmd.o qemu-tool.o qemu-error.o $(oslib-obj-y) $(trace-obj-y) $(block-obj-y) $(qobject-obj-y) $(version-obj-y) qemu-timer-common.o
+qemu-io$(EXESUF): qemu-io.o cmd.o $(tools-obj-y)
qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx
$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@," GEN $@")
--
1.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH 2/3] build: Rename common-obj-y to softmmu-obj-y
2011-03-10 13:58 [Qemu-devel] [PATCH v2 0/3] build: make sharing of objects explicit Juan Quintela
2011-03-10 13:58 ` [Qemu-devel] [PATCH 1/3] build: Create tools-obj-y variable Juan Quintela
@ 2011-03-10 13:58 ` Juan Quintela
2011-03-10 13:58 ` [Qemu-devel] [PATCH 3/3] build: Create common-obj-y for objects shared between tools and softmmu Juan Quintela
2 siblings, 0 replies; 4+ messages in thread
From: Juan Quintela @ 2011-03-10 13:58 UTC (permalink / raw)
To: qemu-devel
It really represent object files shared between all softmmu targets.
We will use common-obj-y for objects shared between softmmu and
tools on next commit
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
Makefile | 4 +-
Makefile.objs | 116 +++++++++++++++++++++++++++---------------------------
Makefile.target | 2 +-
3 files changed, 61 insertions(+), 61 deletions(-)
diff --git a/Makefile b/Makefile
index 9e090cb..7811d74 100644
--- a/Makefile
+++ b/Makefile
@@ -87,8 +87,8 @@ ifneq ($(wildcard config-host.mak),)
include $(SRC_PATH)/Makefile.objs
endif
-$(common-obj-y): $(GENERATED_HEADERS)
-$(filter %-softmmu,$(SUBDIR_RULES)): $(trace-obj-y) $(common-obj-y) subdir-libdis
+$(softmmu-obj-y): $(GENERATED_HEADERS)
+$(filter %-softmmu,$(SUBDIR_RULES)): $(trace-obj-y) $(softmmu-obj-y) subdir-libdis
$(filter %-user,$(SUBDIR_RULES)): $(GENERATED_HEADERS) $(trace-obj-y) subdir-libdis-user subdir-libuser
diff --git a/Makefile.objs b/Makefile.objs
index 9e98a66..b525e81 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -59,54 +59,54 @@ fsdev-obj-$(CONFIG_VIRTFS) += $(addprefix fsdev/, $(fsdev-nested-y))
# 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 += $(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-$(CONFIG_WIN32) += os-win32.o
-common-obj-$(CONFIG_POSIX) += os-posix.o
-
-common-obj-y += tcg-runtime.o host-utils.o
-common-obj-y += irq.o ioport.o input.o
-common-obj-$(CONFIG_PTIMER) += ptimer.o
-common-obj-$(CONFIG_MAX7310) += max7310.o
-common-obj-$(CONFIG_WM8750) += wm8750.o
-common-obj-$(CONFIG_TWL92230) += twl92230.o
-common-obj-$(CONFIG_TSC2005) += tsc2005.o
-common-obj-$(CONFIG_LM832X) += lm832x.o
-common-obj-$(CONFIG_TMP105) += tmp105.o
-common-obj-$(CONFIG_STELLARIS_INPUT) += stellaris_input.o
-common-obj-$(CONFIG_SSD0303) += ssd0303.o
-common-obj-$(CONFIG_SSD0323) += ssd0323.o
-common-obj-$(CONFIG_ADS7846) += ads7846.o
-common-obj-$(CONFIG_MAX111X) += max111x.o
-common-obj-$(CONFIG_DS1338) += ds1338.o
-common-obj-y += i2c.o smbus.o smbus_eeprom.o
-common-obj-y += eeprom93xx.o
-common-obj-y += scsi-disk.o cdrom.o
-common-obj-y += scsi-generic.o scsi-bus.o
-common-obj-y += usb.o usb-hub.o usb-$(HOST_USB).o usb-hid.o usb-msd.o usb-wacom.o
-common-obj-y += usb-serial.o usb-net.o usb-bus.o usb-desc.o
-common-obj-$(CONFIG_SSI) += ssi.o
-common-obj-$(CONFIG_SSI_SD) += ssi-sd.o
-common-obj-$(CONFIG_SD) += sd.o
-common-obj-y += bt.o bt-host.o bt-vhci.o bt-l2cap.o bt-sdp.o bt-hci.o bt-hid.o usb-bt.o
-common-obj-y += bt-hci-csr.o
-common-obj-y += buffered_file.o migration.o migration-tcp.o qemu-sockets.o
-common-obj-y += qemu-char.o savevm.o #aio.o
-common-obj-y += msmouse.o ps2.o
-common-obj-y += qdev.o qdev-properties.o
-common-obj-y += block-migration.o
-common-obj-y += pflib.o
-common-obj-y += bitmap.o bitops.o
-
-common-obj-$(CONFIG_BRLAPI) += baum.o
-common-obj-$(CONFIG_POSIX) += migration-exec.o migration-unix.o migration-fd.o
-common-obj-$(CONFIG_WIN32) += version.o
-
-common-obj-$(CONFIG_SPICE) += ui/spice-core.o ui/spice-input.o ui/spice-display.o spice-qemu-char.o
+softmmu-obj-y = $(block-obj-y) blockdev.o
+softmmu-obj-y += $(net-obj-y)
+softmmu-obj-y += $(qobject-obj-y)
+softmmu-obj-$(CONFIG_LINUX) += $(fsdev-obj-$(CONFIG_LINUX))
+softmmu-obj-y += readline.o console.o cursor.o async.o qemu-error.o
+softmmu-obj-y += $(oslib-obj-y)
+softmmu-obj-$(CONFIG_WIN32) += os-win32.o
+softmmu-obj-$(CONFIG_POSIX) += os-posix.o
+
+softmmu-obj-y += tcg-runtime.o host-utils.o
+softmmu-obj-y += irq.o ioport.o input.o
+softmmu-obj-$(CONFIG_PTIMER) += ptimer.o
+softmmu-obj-$(CONFIG_MAX7310) += max7310.o
+softmmu-obj-$(CONFIG_WM8750) += wm8750.o
+softmmu-obj-$(CONFIG_TWL92230) += twl92230.o
+softmmu-obj-$(CONFIG_TSC2005) += tsc2005.o
+softmmu-obj-$(CONFIG_LM832X) += lm832x.o
+softmmu-obj-$(CONFIG_TMP105) += tmp105.o
+softmmu-obj-$(CONFIG_STELLARIS_INPUT) += stellaris_input.o
+softmmu-obj-$(CONFIG_SSD0303) += ssd0303.o
+softmmu-obj-$(CONFIG_SSD0323) += ssd0323.o
+softmmu-obj-$(CONFIG_ADS7846) += ads7846.o
+softmmu-obj-$(CONFIG_MAX111X) += max111x.o
+softmmu-obj-$(CONFIG_DS1338) += ds1338.o
+softmmu-obj-y += i2c.o smbus.o smbus_eeprom.o
+softmmu-obj-y += eeprom93xx.o
+softmmu-obj-y += scsi-disk.o cdrom.o
+softmmu-obj-y += scsi-generic.o scsi-bus.o
+softmmu-obj-y += usb.o usb-hub.o usb-$(HOST_USB).o usb-hid.o usb-msd.o usb-wacom.o
+softmmu-obj-y += usb-serial.o usb-net.o usb-bus.o usb-desc.o
+softmmu-obj-$(CONFIG_SSI) += ssi.o
+softmmu-obj-$(CONFIG_SSI_SD) += ssi-sd.o
+softmmu-obj-$(CONFIG_SD) += sd.o
+softmmu-obj-y += bt.o bt-host.o bt-vhci.o bt-l2cap.o bt-sdp.o bt-hci.o bt-hid.o usb-bt.o
+softmmu-obj-y += bt-hci-csr.o
+softmmu-obj-y += buffered_file.o migration.o migration-tcp.o qemu-sockets.o
+softmmu-obj-y += qemu-char.o savevm.o #aio.o
+softmmu-obj-y += msmouse.o ps2.o
+softmmu-obj-y += qdev.o qdev-properties.o
+softmmu-obj-y += block-migration.o
+softmmu-obj-y += pflib.o
+softmmu-obj-y += bitmap.o bitops.o
+
+softmmu-obj-$(CONFIG_BRLAPI) += baum.o
+softmmu-obj-$(CONFIG_POSIX) += migration-exec.o migration-unix.o migration-fd.o
+softmmu-obj-$(CONFIG_WIN32) += version.o
+
+softmmu-obj-$(CONFIG_SPICE) += ui/spice-core.o ui/spice-input.o ui/spice-display.o spice-qemu-char.o
audio-obj-y = audio.o noaudio.o wavaudio.o mixeng.o
audio-obj-$(CONFIG_SDL) += sdlaudio.o
@@ -122,7 +122,7 @@ audio-obj-$(CONFIG_WINWAVE) += winwaveaudio.o
audio-obj-$(CONFIG_AUDIO_PT_INT) += audio_pt_int.o
audio-obj-$(CONFIG_AUDIO_WIN_INT) += audio_win_int.o
audio-obj-y += wavcapture.o
-common-obj-y += $(addprefix audio/, $(audio-obj-y))
+softmmu-obj-y += $(addprefix audio/, $(audio-obj-y))
ui-obj-y += keymaps.o
ui-obj-$(CONFIG_SDL) += sdl.o sdl_zoom.o x_keymap.o
@@ -139,22 +139,22 @@ ui-obj-y += vnc-jobs-async.o
else
ui-obj-y += vnc-jobs-sync.o
endif
-common-obj-y += $(addprefix ui/, $(ui-obj-y))
+softmmu-obj-y += $(addprefix ui/, $(ui-obj-y))
-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
+softmmu-obj-y += iov.o acl.o
+softmmu-obj-$(CONFIG_THREAD) += qemu-thread.o
+softmmu-obj-$(CONFIG_POSIX) += compatfd.o
+softmmu-obj-y += notify.o event_notifier.o
+softmmu-obj-y += qemu-timer.o qemu-timer-common.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
slirp-obj-y += tcp_subr.o tcp_timer.o udp.o bootp.o tftp.o
-common-obj-$(CONFIG_SLIRP) += $(addprefix slirp/, $(slirp-obj-y))
+softmmu-obj-$(CONFIG_SLIRP) += $(addprefix slirp/, $(slirp-obj-y))
# xen backend driver support
-common-obj-$(CONFIG_XEN) += xen_backend.o xen_devconfig.o
-common-obj-$(CONFIG_XEN) += xen_console.o xenfb.o xen_disk.o xen_nic.o
+softmmu-obj-$(CONFIG_XEN) += xen_backend.o xen_devconfig.o
+softmmu-obj-$(CONFIG_XEN) += xen_console.o xenfb.o xen_disk.o xen_nic.o
######################################################################
# libuser
diff --git a/Makefile.target b/Makefile.target
index f0df98e..f77b0dc 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -343,7 +343,7 @@ monitor.o: hmp-commands.h qmp-commands.h
$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
-obj-y += $(addprefix ../, $(common-obj-y))
+obj-y += $(addprefix ../, $(softmmu-obj-y))
obj-y += $(addprefix ../libdis/, $(libdis-y))
obj-y += $(libobj-y)
obj-y += $(addprefix $(HWDIR)/, $(hw-obj-y))
--
1.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH 3/3] build: Create common-obj-y for objects shared between tools and softmmu
2011-03-10 13:58 [Qemu-devel] [PATCH v2 0/3] build: make sharing of objects explicit Juan Quintela
2011-03-10 13:58 ` [Qemu-devel] [PATCH 1/3] build: Create tools-obj-y variable Juan Quintela
2011-03-10 13:58 ` [Qemu-devel] [PATCH 2/3] build: Rename common-obj-y to softmmu-obj-y Juan Quintela
@ 2011-03-10 13:58 ` Juan Quintela
2 siblings, 0 replies; 4+ messages in thread
From: Juan Quintela @ 2011-03-10 13:58 UTC (permalink / raw)
To: qemu-devel
This way we don't have to repeat them in two places.
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
Makefile | 4 +---
Makefile.objs | 14 +++++++++-----
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/Makefile b/Makefile
index 7811d74..42d2cab 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 $(common-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 b525e81..7e54ae3 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))
######################################################################
+# common-obj-y has the object that are shared by qemu softmmu and tools
+
+common-obj-y = qemu-error.o $(block-obj-y) $(qobject-obj-y) $(oslib-obj-y)
+common-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.
-softmmu-obj-y = $(block-obj-y) blockdev.o
+softmmu-obj-y = $(common-obj-y) blockdev.o
softmmu-obj-y += $(net-obj-y)
-softmmu-obj-y += $(qobject-obj-y)
softmmu-obj-$(CONFIG_LINUX) += $(fsdev-obj-$(CONFIG_LINUX))
-softmmu-obj-y += readline.o console.o cursor.o async.o qemu-error.o
-softmmu-obj-y += $(oslib-obj-y)
+softmmu-obj-y += readline.o console.o cursor.o async.o
softmmu-obj-$(CONFIG_WIN32) += os-win32.o
softmmu-obj-$(CONFIG_POSIX) += os-posix.o
@@ -145,7 +149,7 @@ softmmu-obj-y += iov.o acl.o
softmmu-obj-$(CONFIG_THREAD) += qemu-thread.o
softmmu-obj-$(CONFIG_POSIX) += compatfd.o
softmmu-obj-y += notify.o event_notifier.o
-softmmu-obj-y += qemu-timer.o qemu-timer-common.o
+softmmu-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
--
1.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-03-10 13:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-10 13:58 [Qemu-devel] [PATCH v2 0/3] build: make sharing of objects explicit Juan Quintela
2011-03-10 13:58 ` [Qemu-devel] [PATCH 1/3] build: Create tools-obj-y variable Juan Quintela
2011-03-10 13:58 ` [Qemu-devel] [PATCH 2/3] build: Rename common-obj-y to softmmu-obj-y Juan Quintela
2011-03-10 13:58 ` [Qemu-devel] [PATCH 3/3] build: Create common-obj-y for objects shared between tools and softmmu Juan Quintela
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.