Skip to content

Commit

Permalink
build: fold trace-obj-y into libqemuutil.a
Browse files Browse the repository at this point in the history
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
bonzini committed Jan 12, 2013
1 parent 0e848f4 commit ff667e2
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 26 deletions.
14 changes: 7 additions & 7 deletions Makefile
Expand Up @@ -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-%:
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down
11 changes: 2 additions & 9 deletions 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
Expand Down Expand Up @@ -77,11 +77,6 @@ ifeq ($(CONFIG_SECCOMP),y)
common-obj-y += qemu-seccomp.o
endif

######################################################################
# trace

trace-obj-y += trace/

######################################################################
# smartcard

Expand All @@ -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
Expand All @@ -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)
3 changes: 2 additions & 1 deletion libcacard/Makefile
Expand Up @@ -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))

Expand Down
8 changes: 4 additions & 4 deletions tests/Makefile
Expand Up @@ -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

Expand Down
10 changes: 5 additions & 5 deletions trace/Makefile.objs
Expand Up @@ -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

0 comments on commit ff667e2

Please sign in to comment.