From ff667e2e9b86fdc36e3b143483526f4c4fe80049 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Fri, 21 Dec 2012 09:45:20 +0100 Subject: [PATCH] build: fold trace-obj-y into libqemuutil.a Signed-off-by: Paolo Bonzini --- Makefile | 14 +++++++------- Makefile.objs | 11 ++--------- libcacard/Makefile | 3 ++- tests/Makefile | 8 ++++---- trace/Makefile.objs | 10 +++++----- 5 files changed, 20 insertions(+), 26 deletions(-) diff --git a/Makefile b/Makefile index ad85e5ba8d..2b737d57b7 100644 --- a/Makefile +++ b/Makefile @@ -135,9 +135,9 @@ $(SRC_PATH)/pixman/configure: $(SUBDIR_RULES): libqemuutil.a libqemustub.a -$(filter %-softmmu,$(SUBDIR_RULES)): $(universal-obj-y) $(trace-obj-y) $(common-obj-y) $(extra-obj-y) +$(filter %-softmmu,$(SUBDIR_RULES)): $(universal-obj-y) $(common-obj-y) $(extra-obj-y) -$(filter %-user,$(SUBDIR_RULES)): $(universal-obj-y) $(trace-obj-y) $(user-obj-y) +$(filter %-user,$(SUBDIR_RULES)): $(universal-obj-y) $(user-obj-y) ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS)) romsubdir-%: @@ -164,13 +164,13 @@ libqemuutil.a: $(util-obj-y) qemu-img.o: qemu-img-cmds.h -qemu-img$(EXESUF): qemu-img.o $(trace-obj-y) $(block-obj-y) libqemuutil.a libqemustub.a -qemu-nbd$(EXESUF): qemu-nbd.o $(trace-obj-y) $(block-obj-y) libqemuutil.a libqemustub.a -qemu-io$(EXESUF): qemu-io.o cmd.o $(trace-obj-y) $(block-obj-y) libqemuutil.a libqemustub.a +qemu-img$(EXESUF): qemu-img.o $(block-obj-y) libqemuutil.a libqemustub.a +qemu-nbd$(EXESUF): qemu-nbd.o $(block-obj-y) libqemuutil.a libqemustub.a +qemu-io$(EXESUF): qemu-io.o cmd.o $(block-obj-y) libqemuutil.a libqemustub.a qemu-bridge-helper$(EXESUF): qemu-bridge-helper.o -fsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsdev/virtio-9p-marshal.o $(trace-obj-y) libqemuutil.a libqemustub.a +fsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsdev/virtio-9p-marshal.o libqemuutil.a libqemustub.a fsdev/virtfs-proxy-helper$(EXESUF): LIBS += -lcap qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx @@ -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) libqemuutil.a libqemustub.a +qemu-ga$(EXESUF): $(qga-obj-y) libqemuutil.a libqemustub.a $(call LINK, $^) clean: diff --git a/Makefile.objs b/Makefile.objs index bc56c61af6..d465a72030 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/ qapi/ +util-obj-y = util/ qobject/ qapi/ trace/ ####################################################################### # block-obj-y is code used by both qemu system emulation and qemu-img @@ -77,11 +77,6 @@ ifeq ($(CONFIG_SECCOMP),y) common-obj-y += qemu-seccomp.o endif -###################################################################### -# trace - -trace-obj-y += trace/ - ###################################################################### # smartcard @@ -107,7 +102,6 @@ universal-obj-y += tcg-runtime.o universal-obj-y += hw/ universal-obj-y += qom/ universal-obj-y += disas/ -universal-obj-y += $(trace-obj-y) ###################################################################### # guest agent @@ -129,6 +123,5 @@ nested-vars += \ block-obj-y \ common-obj-y \ universal-obj-y \ - extra-obj-y \ - trace-obj-y + extra-obj-y dummy := $(call unnest-vars) diff --git a/libcacard/Makefile b/libcacard/Makefile index c658d3a9b7..47827a0eb8 100644 --- a/libcacard/Makefile +++ b/libcacard/Makefile @@ -3,10 +3,11 @@ libcacard_includedir=$(includedir)/cacard TOOLS += vscclient$(EXESUF) # objects linked into a shared library, built with libtool with -fPIC if required -libcacard-obj-y = $(trace-obj-y) $(stub-obj-y) $(libcacard-y) +libcacard-obj-y = $(stub-obj-y) $(libcacard-y) libcacard-obj-y += util/osdep.o util/cutils.o util/qemu-timer-common.o util/error.o libcacard-obj-$(CONFIG_WIN32) += util/oslib-win32.o util/qemu-thread-win32.o libcacard-obj-$(CONFIG_POSIX) += util/oslib-posix.o util/qemu-thread-posix.o +libcacard-obj-y += $(filter trace/%, $(util-obj-y)) libcacard-lobj-y=$(patsubst %.o,%.lo,$(libcacard-obj-y)) diff --git a/tests/Makefile b/tests/Makefile index f224eb2390..d97a571c8b 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -104,10 +104,10 @@ tests/test-qmp-input-strict$(EXESUF): tests/test-qmp-input-strict.o $(test-qapi- tests/test-qmp-commands$(EXESUF): tests/test-qmp-commands.o tests/test-qmp-marshal.o $(test-qapi-obj-y) qapi-types.o qapi-visit.o libqemuutil.a libqemustub.a tests/test-visitor-serialization$(EXESUF): tests/test-visitor-serialization.o $(test-qapi-obj-y) libqemuutil.a libqemustub.a -tests/rtc-test$(EXESUF): tests/rtc-test.o $(trace-obj-y) -tests/m48t59-test$(EXESUF): tests/m48t59-test.o $(trace-obj-y) -tests/fdc-test$(EXESUF): tests/fdc-test.o tests/libqtest.o $(trace-obj-y) -tests/hd-geo-test$(EXESUF): tests/hd-geo-test.o tests/libqtest.o $(trace-obj-y) +tests/rtc-test$(EXESUF): tests/rtc-test.o +tests/m48t59-test$(EXESUF): tests/m48t59-test.o +tests/fdc-test$(EXESUF): tests/fdc-test.o +tests/hd-geo-test$(EXESUF): tests/hd-geo-test.o # QTest rules diff --git a/trace/Makefile.objs b/trace/Makefile.objs index ed2e30b001..27fe26b5c2 100644 --- a/trace/Makefile.objs +++ b/trace/Makefile.objs @@ -51,8 +51,8 @@ endif ###################################################################### # Backend code -trace-obj-$(CONFIG_TRACE_DEFAULT) += default.o -trace-obj-$(CONFIG_TRACE_SIMPLE) += simple.o -trace-obj-$(CONFIG_TRACE_STDERR) += stderr.o -trace-obj-y += control.o -trace-obj-y += generated-tracers.o +util-obj-$(CONFIG_TRACE_DEFAULT) += default.o +util-obj-$(CONFIG_TRACE_SIMPLE) += simple.o +util-obj-$(CONFIG_TRACE_STDERR) += stderr.o +util-obj-y += control.o +util-obj-y += generated-tracers.o