From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:42204) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QlAE8-0003il-6t for qemu-devel@nongnu.org; Sun, 24 Jul 2011 21:45:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QlAE6-0005Qp-Lt for qemu-devel@nongnu.org; Sun, 24 Jul 2011 21:45:00 -0400 Received: from e8.ny.us.ibm.com ([32.97.182.138]:50144) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QlAE6-0005QZ-J6 for qemu-devel@nongnu.org; Sun, 24 Jul 2011 21:44:58 -0400 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e8.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id p6P1WFnL014267 for ; Sun, 24 Jul 2011 21:32:15 -0400 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p6P1ivlA148646 for ; Sun, 24 Jul 2011 21:44:57 -0400 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p6P1iv6H006873 for ; Sun, 24 Jul 2011 21:44:57 -0400 From: Anthony Liguori Date: Sun, 24 Jul 2011 20:44:34 -0500 Message-Id: <1311558293-5855-3-git-send-email-aliguori@us.ibm.com> In-Reply-To: <1311558293-5855-1-git-send-email-aliguori@us.ibm.com> References: <1311558293-5855-1-git-send-email-aliguori@us.ibm.com> Subject: [Qemu-devel] [PATCH 02/21] qom: convert QAPI to use Qconfig build system List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Anthony Liguori Plug depends on QAPI and in order to express that dependency, QAPI needs to use the Qconfig build system. Right now, QAPI is only built for guest agent, but this changes the generic build to now include QAPI. Signed-off-by: Anthony Liguori --- Makefile | 10 ++++++---- Makefile.objs | 4 ---- Makefile.qom | 2 ++ Qconfig | 2 +- qapi/Makefile | 3 +++ qapi/Qconfig | 19 +++++++++++++++++++ 6 files changed, 31 insertions(+), 9 deletions(-) create mode 100644 qapi/Makefile create mode 100644 qapi/Qconfig diff --git a/Makefile b/Makefile index f3a03ad..81d864f 100644 --- a/Makefile +++ b/Makefile @@ -185,16 +185,18 @@ $(qapi-dir)/qga-qapi-visit.h: $(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scr $(qapi-dir)/qga-qmp-marshal.c: $(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-commands.py $(call quiet-command,python $(SRC_PATH)/scripts/qapi-commands.py -o "$(qapi-dir)" -p "qga-" < $<, " GEN $@") -test-visitor.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types.h test-qapi-visit.c test-qapi-visit.h) $(qapi-obj-y) +qga-obj-y := $(addprefix qapi/,$(qapi-obj-y)) + +test-visitor.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types.h test-qapi-visit.c test-qapi-visit.h) $(qga-obj-y) test-visitor: test-visitor.o qfloat.o qint.o qdict.o qstring.o qlist.o qbool.o $(qapi-obj-y) error.o osdep.o qemu-malloc.o $(oslib-obj-y) qjson.o json-streamer.o json-lexer.o json-parser.o qerror.o qemu-error.o qemu-tool.o $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o test-qmp-commands.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types.h test-qapi-visit.c test-qapi-visit.h test-qmp-marshal.c test-qmp-commands.h) $(qapi-obj-y) -test-qmp-commands: test-qmp-commands.o qfloat.o qint.o qdict.o qstring.o qlist.o qbool.o $(qapi-obj-y) error.o osdep.o qemu-malloc.o $(oslib-obj-y) qjson.o json-streamer.o json-lexer.o json-parser.o qerror.o qemu-error.o qemu-tool.o $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o $(qapi-dir)/test-qmp-marshal.o module.o +test-qmp-commands: test-qmp-commands.o qfloat.o qint.o qdict.o qstring.o qlist.o qbool.o $(qga-obj-y) error.o osdep.o qemu-malloc.o $(oslib-obj-y) qjson.o json-streamer.o json-lexer.o json-parser.o qerror.o qemu-error.o qemu-tool.o $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o $(qapi-dir)/test-qmp-marshal.o module.o QGALIB=qga/guest-agent-command-state.o qga/guest-agent-commands.o -qemu-ga.o: $(addprefix $(qapi-dir)/, qga-qapi-types.c qga-qapi-types.h qga-qapi-visit.c qga-qmp-marshal.c) $(qapi-obj-y) -qemu-ga$(EXESUF): qemu-ga.o $(QGALIB) qemu-tool.o qemu-error.o error.o $(oslib-obj-y) $(trace-obj-y) $(block-obj-y) $(qobject-obj-y) $(version-obj-y) $(qapi-obj-y) qemu-timer-common.o qemu-sockets.o module.o qapi/qmp-dispatch.o qapi/qmp-registry.o $(qapi-dir)/qga-qapi-visit.o $(qapi-dir)/qga-qapi-types.o $(qapi-dir)/qga-qmp-marshal.o +qemu-ga.o: $(addprefix $(qapi-dir)/, qga-qapi-types.c qga-qapi-types.h qga-qapi-visit.c qga-qmp-marshal.c) $(qga-obj-y) +qemu-ga$(EXESUF): qemu-ga.o $(QGALIB) qemu-tool.o qemu-error.o error.o $(oslib-obj-y) $(trace-obj-y) $(block-obj-y) $(qobject-obj-y) $(version-obj-y) $(qga-obj-y) qemu-timer-common.o qemu-sockets.o module.o qapi/qmp-dispatch.o qapi/qmp-registry.o $(qapi-dir)/qga-qapi-visit.o $(qapi-dir)/qga-qapi-types.o $(qapi-dir)/qga-qmp-marshal.o QEMULIBS=libhw32 libhw64 libuser libdis libdis-user diff --git a/Makefile.objs b/Makefile.objs index 9cc87fd..ef6030a 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -379,10 +379,6 @@ libcacard-y = cac.o event.o vcard.o vreader.o vcard_emul_nss.o vcard_emul_type.o ###################################################################### # qapi -qapi-nested-y = qapi-visit-core.o qmp-input-visitor.o qmp-output-visitor.o qapi-dealloc-visitor.o -qapi-nested-y += qmp-registry.o qmp-dispatch.o -qapi-obj-y = $(addprefix qapi/, $(qapi-nested-y)) - vl.o: QEMU_CFLAGS+=$(GPROF_CFLAGS) vl.o: QEMU_CFLAGS+=$(SDL_CFLAGS) diff --git a/Makefile.qom b/Makefile.qom index 8b14952..1b06970 100644 --- a/Makefile.qom +++ b/Makefile.qom @@ -7,3 +7,5 @@ config-qom.mak: $(SRC_PATH)/Qconfig $(QCONFIGS) -include config-qom.mak +include $(SRC_PATH)/qapi/Makefile +common-obj-y += $(addprefix qapi/,$(qapi-obj-y)) diff --git a/Qconfig b/Qconfig index 62b15d7..cdf8f6c 100644 --- a/Qconfig +++ b/Qconfig @@ -1 +1 @@ -# Do nothing for now +source qapi/Qconfig diff --git a/qapi/Makefile b/qapi/Makefile new file mode 100644 index 0000000..11efdfe --- /dev/null +++ b/qapi/Makefile @@ -0,0 +1,3 @@ +qapi-obj-$(CONFIG_QAPI) += qapi-dealloc-visitor.o qapi-visit-core.o +qapi-obj-$(CONFIG_QAPI_QMP) += qmp-input-visitor.o qmp-output-visitor.o +qapi-obj-$(CONFIG_QAPI_QMP_SERVER) += qmp-dispatch.o qmp-registry.o diff --git a/qapi/Qconfig b/qapi/Qconfig new file mode 100644 index 0000000..aaa9f01 --- /dev/null +++ b/qapi/Qconfig @@ -0,0 +1,19 @@ +config QAPI + bool "QEMU API Support" + default y + help + This provides a generic marshalling framework for converting C types + to other data structures. If unsure, say y here. + +config QAPI_QMP + bool "QAPI support for QObjects" + default y + help + This allows QAPI to convert to and from QObjects. QObjects are mainly + used to marshal to and from JSON. + +config QAPI_QMP_SERVER + bool "QAPI based QMP server" + default y + help + This provides a QMP server framework using QAPI. -- 1.7.4.1