[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 082/147] meson: convert hw/xen
From: |
Paolo Bonzini |
Subject: |
[PATCH 082/147] meson: convert hw/xen |
Date: |
Mon, 10 Aug 2020 19:08:00 +0200 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 7 +++++--
hw/Makefile.objs | 1 -
hw/meson.build | 1 +
hw/xen/Makefile.objs | 7 -------
hw/xen/meson.build | 20 ++++++++++++++++++++
meson.build | 6 ++++++
6 files changed, 32 insertions(+), 10 deletions(-)
create mode 100644 hw/meson.build
delete mode 100644 hw/xen/Makefile.objs
create mode 100644 hw/xen/meson.build
diff --git a/configure b/configure
index f3baba1..1bdea00 100755
--- a/configure
+++ b/configure
@@ -2676,6 +2676,8 @@ if test "$xen" != "no" ; then
fi
QEMU_CFLAGS="$QEMU_CFLAGS $($pkg_config --cflags $xen_pc)"
libs_softmmu="$($pkg_config --libs $xen_pc) $libs_softmmu"
+ xen_cflags="$($pkg_config --cflags $xen_pc)"
+ xen_libs="$($pkg_config --libs $xen_pc)"
else
xen_libs="-lxenstore -lxenctrl -lxenguest"
@@ -2956,9 +2958,8 @@ EOF
if test "$xen" = yes; then
if test $xen_ctrl_version -ge 40701 ; then
- libs_softmmu="$xen_stable_libs $libs_softmmu"
+ xen_libs="$xen_libs $xen_stable_libs "
fi
- libs_softmmu="$xen_libs $libs_softmmu"
fi
fi
fi
@@ -7242,6 +7243,8 @@ fi
if test "$xen" = "yes" ; then
echo "CONFIG_XEN_BACKEND=y" >> $config_host_mak
echo "CONFIG_XEN_CTRL_INTERFACE_VERSION=$xen_ctrl_version" >>
$config_host_mak
+ echo "XEN_CFLAGS=$xen_cflags" >> $config_host_mak
+ echo "XEN_LIBS=$xen_libs" >> $config_host_mak
fi
if test "$linux_aio" = "yes" ; then
echo "CONFIG_LINUX_AIO=y" >> $config_host_mak
diff --git a/hw/Makefile.objs b/hw/Makefile.objs
index 14b7ea4..d204a90 100644
--- a/hw/Makefile.objs
+++ b/hw/Makefile.objs
@@ -35,7 +35,6 @@ devices-dirs-y += usb/
devices-dirs-$(CONFIG_VFIO) += vfio/
devices-dirs-y += virtio/
devices-dirs-y += watchdog/
-devices-dirs-$(CONFIG_XEN) += xen/
devices-dirs-$(CONFIG_MEM_DEVICE) += mem/
devices-dirs-$(CONFIG_NUBUS) += nubus/
devices-dirs-y += semihosting/
diff --git a/hw/meson.build b/hw/meson.build
new file mode 100644
index 0000000..08112a5
--- /dev/null
+++ b/hw/meson.build
@@ -0,0 +1 @@
+subdir('xen')
diff --git a/hw/xen/Makefile.objs b/hw/xen/Makefile.objs
deleted file mode 100644
index 502b32d..0000000
--- a/hw/xen/Makefile.objs
+++ /dev/null
@@ -1,7 +0,0 @@
-# xen backend driver support
-common-obj-y += xen-legacy-backend.o xen_devconfig.o xen_pvdev.o xen-bus.o
xen-bus-helper.o xen-backend.o
-
-obj-$(CONFIG_XEN_PCI_PASSTHROUGH) += xen-host-pci-device.o
-obj-$(CONFIG_XEN_PCI_PASSTHROUGH) += xen_pt.o xen_pt_config_init.o
xen_pt_graphics.o xen_pt_msi.o
-obj-$(CONFIG_XEN_PCI_PASSTHROUGH) += xen_pt_load_rom.o
-obj-$(call lnot,$(CONFIG_XEN_PCI_PASSTHROUGH)) += xen_pt_stub.o
diff --git a/hw/xen/meson.build b/hw/xen/meson.build
new file mode 100644
index 0000000..076954b
--- /dev/null
+++ b/hw/xen/meson.build
@@ -0,0 +1,20 @@
+softmmu_ss.add(when: ['CONFIG_XEN', xen], if_true: files(
+ 'xen-backend.c',
+ 'xen-bus-helper.c',
+ 'xen-bus.c',
+ 'xen-legacy-backend.c',
+ 'xen_devconfig.c',
+ 'xen_pvdev.c',
+))
+
+xen_specific_ss = ss.source_set()
+xen_specific_ss.add(when: 'CONFIG_XEN_PCI_PASSTHROUGH', if_true: files(
+ 'xen-host-pci-device.c',
+ 'xen_pt.c',
+ 'xen_pt_config_init.c',
+ 'xen_pt_graphics.c',
+ 'xen_pt_load_rom.c',
+ 'xen_pt_msi.c',
+), if_false: files('xen_pt_stub.c'))
+
+specific_ss.add_all(when: ['CONFIG_XEN', xen], if_true: xen_specific_ss)
diff --git a/meson.build b/meson.build
index 49ad9e7..19c81b6 100644
--- a/meson.build
+++ b/meson.build
@@ -313,6 +313,11 @@ numa = not_found
if 'CONFIG_NUMA' in config_host
numa = declare_dependency(link_args: config_host['NUMA_LIBS'].split())
endif
+xen = not_found
+if 'CONFIG_XEN_BACKEND' in config_host
+ xen = declare_dependency(compile_args: config_host['XEN_CFLAGS'].split(),
+ link_args: config_host['XEN_LIBS'].split())
+endif
create_config = find_program('scripts/create_config')
minikconf = find_program('scripts/minikconf.py')
@@ -666,6 +671,7 @@ subdir('migration')
subdir('monitor')
subdir('net')
subdir('replay')
+subdir('hw')
# needed for fuzzing binaries
subdir('tests/qtest/libqos')
--
1.8.3.1
- [PATCH 073/147] meson: convert common QMP bits for qemu and qemu-storage-daemon, (continued)
- [PATCH 073/147] meson: convert common QMP bits for qemu and qemu-storage-daemon, Paolo Bonzini, 2020/08/10
- [PATCH 074/147] meson: convert qemu-storage-daemon, Paolo Bonzini, 2020/08/10
- [PATCH 075/147] meson: convert replay directory to Meson, Paolo Bonzini, 2020/08/10
- [PATCH 076/147] meson: convert migration directory to Meson, Paolo Bonzini, 2020/08/10
- [PATCH 077/147] meson: convert net directory to Meson, Paolo Bonzini, 2020/08/10
- [PATCH 078/147] meson: convert backends directory to Meson, Paolo Bonzini, 2020/08/10
- [PATCH 079/147] meson: convert fsdev/, Paolo Bonzini, 2020/08/10
- [PATCH 081/147] meson: convert qapi-specific to meson, Paolo Bonzini, 2020/08/10
- [PATCH 080/147] meson: convert disas directory to Meson, Paolo Bonzini, 2020/08/10
- [PATCH 084/147] meson: convert hw/semihosting, Paolo Bonzini, 2020/08/10
- [PATCH 082/147] meson: convert hw/xen,
Paolo Bonzini <=
- [PATCH 085/147] meson: convert hw/nubus, Paolo Bonzini, 2020/08/10
- [PATCH 083/147] meson: convert hw/core, Paolo Bonzini, 2020/08/10
- [PATCH 086/147] meson: convert hw/smbios, Paolo Bonzini, 2020/08/10
- [PATCH 087/147] meson: convert hw/mem, Paolo Bonzini, 2020/08/10
- [PATCH 088/147] meson: convert hw/watchdog, Paolo Bonzini, 2020/08/10
- [PATCH 089/147] meson: convert hw/virtio, Paolo Bonzini, 2020/08/10
- [PATCH 092/147] meson: convert hw/tpm, Paolo Bonzini, 2020/08/10
- [PATCH 090/147] meson: convert hw/vfio, Paolo Bonzini, 2020/08/10
- [PATCH 093/147] meson: convert hw/timer, Paolo Bonzini, 2020/08/10
- [PATCH 094/147] meson: convert hw/rtc, Paolo Bonzini, 2020/08/10