Patchwork [22/27] build: move base QAPI files to libqemuutil.a

login
register
mail settings
Submitter Paolo Bonzini
Date Jan. 12, 2013, 5:35 p.m.
Message ID <1358012138-21613-23-git-send-email-pbonzini@redhat.com>
Download mbox | patch
Permalink /patch/211541/
State New
Headers show

Comments

Paolo Bonzini - Jan. 12, 2013, 5:35 p.m.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 Makefile           | 2 +-
 Makefile.objs      | 9 ++-------
 qapi/Makefile.objs | 8 ++++----
 tests/Makefile     | 3 +--
 4 files changed, 8 insertions(+), 14 deletions(-)

Patch

diff --git a/Makefile b/Makefile
index ee39b36..8c3b13e 100644
--- a/Makefile
+++ b/Makefile
@@ -206,7 +206,7 @@  $(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py)
 QGALIB_GEN=$(addprefix qga/qapi-generated/, qga-qapi-types.h qga-qapi-visit.h qga-qmp-commands.h)
 $(qga-obj-y) qemu-ga.o: $(QGALIB_GEN)
 
-qemu-ga$(EXESUF): $(qga-obj-y) $(trace-obj-y) $(qapi-obj-y) $(version-obj-y) libqemuutil.a libqemustub.a
+qemu-ga$(EXESUF): $(qga-obj-y) $(trace-obj-y) $(version-obj-y) libqemuutil.a libqemustub.a
 	$(call LINK, $^)
 
 clean:
diff --git a/Makefile.objs b/Makefile.objs
index 48a7173..eed27df 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -1,7 +1,7 @@ 
 #######################################################################
 # Common libraries for tools and emulators
 stub-obj-y = stubs/
-util-obj-y = util/ qobject/
+util-obj-y = util/ qobject/ qapi/
 
 #######################################################################
 # coroutines
@@ -30,7 +30,7 @@  block-obj-y += main-loop.o iohandler.o qemu-timer.o
 block-obj-$(CONFIG_POSIX) += aio-posix.o
 block-obj-$(CONFIG_WIN32) += aio-win32.o
 block-obj-y += block/
-block-obj-y += $(qapi-obj-y) qapi-types.o qapi-visit.o
+block-obj-y += qapi-types.o qapi-visit.o
 
 ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy)
 # Lots of the fsdev/9pcode is pulled in by vl.c via qemu_fsdev_add.
@@ -102,8 +102,6 @@  common-obj-$(CONFIG_SMARTCARD_NSS) += $(libcacard-y)
 ######################################################################
 # qapi
 
-qapi-obj-y = qapi/
-
 common-obj-y += qmp-marshal.o qapi-visit.o qapi-types.o
 common-obj-y += qmp.o hmp.o
 
@@ -116,8 +114,6 @@  universal-obj-y += hw/
 universal-obj-y += qom/
 universal-obj-y += disas/
 universal-obj-y += $(trace-obj-y)
-universal-obj-y += $(qapi-obj-y)
-universal-obj-y += qapi-types.o qapi-visit.o
 
 ######################################################################
 # guest agent
@@ -136,7 +132,6 @@  nested-vars += \
 	stub-obj-y \
 	util-obj-y \
 	qga-obj-y \
-	qapi-obj-y \
 	block-obj-y \
 	common-obj-y \
 	universal-obj-y \
diff --git a/qapi/Makefile.objs b/qapi/Makefile.objs
index f9bd3b9..1f9c973 100644
--- a/qapi/Makefile.objs
+++ b/qapi/Makefile.objs
@@ -1,5 +1,5 @@ 
-qapi-obj-y = qapi-visit-core.o qapi-dealloc-visitor.o qmp-input-visitor.o
-qapi-obj-y += qmp-output-visitor.o qmp-registry.o qmp-dispatch.o
-qapi-obj-y += string-input-visitor.o string-output-visitor.o
+util-obj-y = qapi-visit-core.o qapi-dealloc-visitor.o qmp-input-visitor.o
+util-obj-y += qmp-output-visitor.o qmp-registry.o qmp-dispatch.o
+util-obj-y += string-input-visitor.o string-output-visitor.o
 
-common-obj-y += opts-visitor.o
+util-obj-y += opts-visitor.o
diff --git a/tests/Makefile b/tests/Makefile
index 9017fea..f224eb2 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -70,8 +70,7 @@  test-obj-y = tests/check-qint.o tests/check-qstring.o tests/check-qdict.o \
 	tests/test-qmp-input-visitor.o tests/test-qmp-input-strict.o \
 	tests/test-qmp-commands.o tests/test-visitor-serialization.o
 
-test-qapi-obj-y =  $(qapi-obj-y)
-test-qapi-obj-y += tests/test-qapi-visit.o tests/test-qapi-types.o
+test-qapi-obj-y = tests/test-qapi-visit.o tests/test-qapi-types.o
 
 $(test-obj-y): QEMU_INCLUDES += -Itests