@@ -5223,8 +5223,6 @@ EOF
$pkg_config --atleast-version=0.12.3 spice-protocol && \
compile_prog "$spice_cflags" "$spice_libs" ; then
spice="yes"
- libs_softmmu="$libs_softmmu $spice_libs"
- QEMU_CFLAGS="$QEMU_CFLAGS $spice_cflags"
spice_protocol_version=$($pkg_config --modversion spice-protocol)
spice_server_version=$($pkg_config --modversion spice-server)
else
@@ -7535,6 +7533,8 @@ fi
if test "$spice" = "yes" ; then
echo "CONFIG_SPICE=m" >> $config_host_mak
+ echo "SPICE_CFLAGS=$spice_cflags" >> $config_host_mak
+ echo "SPICE_LIBS=$spice_libs" >> $config_host_mak
fi
if test "$smartcard" = "yes" ; then
@@ -47,6 +47,7 @@ obj-$(CONFIG_VGA) += vga.o
ifeq ($(CONFIG_QXL),y)
common-obj-m += qxl.mo
qxl.mo-objs = qxl.o qxl-logger.o qxl-render.o
+qxl.mo-cflags += $(SPICE_CFLAGS)
endif
common-obj-$(CONFIG_VIRTIO_GPU) += virtio-gpu-base.o virtio-gpu.o virtio-gpu-3d.o
@@ -64,7 +64,6 @@
#include "kvm_i386.h"
#include "hw/xen/xen.h"
#include "hw/xen/start_info.h"
-#include "ui/qemu-spice.h"
#include "exec/memory.h"
#include "exec/address-spaces.h"
#include "sysemu/arch_init.h"
@@ -2,5 +2,8 @@ obj-y += misc.o
common-obj-y += monitor.o qmp.o hmp.o
common-obj-y += qmp-cmds.o qmp-cmds-control.o
common-obj-y += hmp-cmds.o
+qmp-cmds.o-cflags += $(SPICE_CFLAGS)
+hmp-cmds.o-cflags += $(SPICE_CFLAGS)
+misc.o-cflags += $(SPICE_CFLAGS)
storage-daemon-obj-y += monitor.o qmp.o qmp-cmds-control.o
@@ -11,4 +11,4 @@ obj-y += memory_mapping.o
obj-y += qtest.o
obj-y += vl.o
-vl.o-cflags := $(GPROF_CFLAGS) $(SDL_CFLAGS)
+vl.o-cflags := $(GPROF_CFLAGS) $(SDL_CFLAGS) $(SPICE_CFLAGS)
@@ -57,8 +57,8 @@ spice-app.mo-objs += spice-core.o spice-input.o spice-display.o
ifeq ($(CONFIG_GIO)$(CONFIG_SPICE),ym)
spice-app.mo-objs += spice-app.o
endif
-spice-app.mo-cflags := $(GIO_CFLAGS)
-spice-app.mo-libs := $(GIO_LIBS)
+spice-app.mo-cflags := $(GIO_CFLAGS) $(SPICE_CFLAGS)
+spice-app.mo-libs := $(GIO_LIBS) $(SPICE_LIBS)
common-obj-$(CONFIG_OPENGL) += shader.o
common-obj-$(CONFIG_OPENGL) += console-gl.o
Instead of adding the spice build flags to the top-level build options, add them where they are necessary. This is a step to move the burden of linking with spice libraries away from the top-level qemu. Signed-off-by: Christophe de Dinechin <dinechin@redhat.com> --- configure | 4 ++-- hw/display/Makefile.objs | 1 + hw/i386/pc.c | 1 - monitor/Makefile.objs | 3 +++ softmmu/Makefile.objs | 2 +- ui/Makefile.objs | 4 ++-- 6 files changed, 9 insertions(+), 6 deletions(-)