[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 23/27] build: move version-obj-y to the generic LINK
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 23/27] build: move version-obj-y to the generic LINK rule |
Date: |
Sat, 12 Jan 2013 18:35:34 +0100 |
There is no reason for it to be in block-obj-y, in particular.
We would like to put it in a library, but nothing would pull it in.
So add it to the LINK rule, and use a Makefile dependency to ensure it
is built.
Signed-off-by: Paolo Bonzini <address@hidden>
---
Makefile | 3 ++-
Makefile.objs | 3 +--
rules.mak | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 8c3b13e..e92ce1f 100644
--- a/Makefile
+++ b/Makefile
@@ -153,6 +153,7 @@ version.o: $(SRC_PATH)/version.rc config-host.h
$(call quiet-command,$(WINDRES) -I. -o $@ $<," RC $(TARGET_DIR)$@")
version-obj-$(CONFIG_WIN32) += version.o
+Makefile: $(version-obj-y)
######################################################################
# Build libraries
@@ -206,7 +207,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) $(version-obj-y) libqemuutil.a
libqemustub.a
+qemu-ga$(EXESUF): $(qga-obj-y) $(trace-obj-y) libqemuutil.a libqemustub.a
$(call LINK, $^)
clean:
diff --git a/Makefile.objs b/Makefile.objs
index eed27df..aae2696 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -25,7 +25,7 @@ coroutine-obj-$(CONFIG_WIN32) += coroutine-win32.o
block-obj-y = async.o thread-pool.o
block-obj-y += nbd.o block.o blockjob.o
-block-obj-y += $(coroutine-obj-y) $(version-obj-y)
+block-obj-y += $(coroutine-obj-y)
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
@@ -58,7 +58,6 @@ common-obj-y += block-migration.o
common-obj-y += page_cache.o
common-obj-$(CONFIG_POSIX) += migration-exec.o migration-unix.o migration-fd.o
-common-obj-$(CONFIG_WIN32) += version.o
common-obj-$(CONFIG_SPICE) += spice-qemu-char.o
diff --git a/rules.mak b/rules.mak
index 4297345..6d82c0d 100644
--- a/rules.mak
+++ b/rules.mak
@@ -23,7 +23,7 @@ QEMU_CFLAGS += -I$(<D) -I$(@D)
ifeq ($(LIBTOOL),)
LIBTOOL = /bin/false
LINK = $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ \
- $(sort $(filter %.o, $1)) $(filter-out %.o, $1) \
+ $(sort $(filter %.o, $1)) $(filter-out %.o, $1) $(version-obj-y) \
$(LIBS)," LINK $(TARGET_DIR)$@")
else
LIBTOOL += $(if $(V),,--quiet)
@@ -35,7 +35,7 @@ LIBTOOL += $(if $(V),,--quiet)
LINK = $(call quiet-command,\
$(if $(filter %.lo %.la,$^),$(LIBTOOL) --mode=link --tag=CC \
)$(CC) $(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ \
- $(sort $(filter %.o, $1)) $(filter-out %.o, $1) \
+ $(sort $(filter %.o, $1)) $(filter-out %.o, $1) $(version-obj-y) \
$(LIBS),$(if $(filter %.lo %.la,$^),"lt LINK ", " LINK
")"$(TARGET_DIR)$@")
endif
--
1.8.1
- [Qemu-devel] [PATCH 17/27] build: move files away from tools-obj-y, common-obj-y, user-obj-y, (continued)
- [Qemu-devel] [PATCH 17/27] build: move files away from tools-obj-y, common-obj-y, user-obj-y, Paolo Bonzini, 2013/01/12
- [Qemu-devel] [PATCH 20/27] build: consolidate multiple variables into universal-obj-y, Paolo Bonzini, 2013/01/12
- [Qemu-devel] [PATCH 19/27] build: move qobject files to qobject/ and libqemuutil.a, Paolo Bonzini, 2013/01/12
- [Qemu-devel] [PATCH 21/27] build: move QAPI definitions for QEMU out of qapi-obj-y, Paolo Bonzini, 2013/01/12
- [Qemu-devel] [PATCH 18/27] build: move libqemuutil.a components to util/, Paolo Bonzini, 2013/01/12
- [Qemu-devel] [PATCH 25/27] build: some simplifications for "trace/Makefile.objs", Paolo Bonzini, 2013/01/12
- [Qemu-devel] [PATCH 26/27] build: fold trace-obj-y into libqemuutil.a, Paolo Bonzini, 2013/01/12
- [Qemu-devel] [PATCH 22/27] build: move base QAPI files to libqemuutil.a, Paolo Bonzini, 2013/01/12
- [Qemu-devel] [PATCH 23/27] build: move version-obj-y to the generic LINK rule,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 27/27] build: improve quiet output for .stp rules, Paolo Bonzini, 2013/01/12
- [Qemu-devel] [PATCH 24/27] build: remove coroutine-obj-y, Paolo Bonzini, 2013/01/12
- Re: [Qemu-devel] [PULL 00/27] More source reorganization and build system TLC, Stefan Hajnoczi, 2013/01/14
- Re: [Qemu-devel] [PULL 00/27] More source reorganization and build system TLC, Andreas Färber, 2013/01/18