aboutsummaryrefslogtreecommitdiff
path: root/hw/i386
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2019-08-17 13:55:58 +0400
committerPaolo Bonzini <pbonzini@redhat.com>2020-08-21 06:30:33 -0400
commit2c44220d055d12142f27cf513848f17d6007ae35 (patch)
tree72593b21d3f6e20a325be46bfc05b69457e14244 /hw/i386
parentb2c00bce54cce0dbb8c7fd3dd397cfdaca4c28ef (diff)
meson: convert hw/arch*
Each architecture's sourceset is placed in an hw_arch dictionary, and picked up from there when building the per-emulator static_library. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/i386')
-rw-r--r--hw/i386/Makefile.objs20
-rw-r--r--hw/i386/kvm/Makefile.objs5
-rw-r--r--hw/i386/kvm/meson.build8
-rw-r--r--hw/i386/meson.build32
-rw-r--r--hw/i386/xen/Makefile.objs1
-rw-r--r--hw/i386/xen/meson.build7
6 files changed, 47 insertions, 26 deletions
diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs
deleted file mode 100644
index 6abc74551a..0000000000
--- a/hw/i386/Makefile.objs
+++ /dev/null
@@ -1,20 +0,0 @@
-obj-$(CONFIG_KVM) += kvm/
-obj-y += e820_memory_layout.o multiboot.o
-obj-y += x86.o
-obj-$(CONFIG_PC) += pc.o pc_sysfw.o
-obj-$(CONFIG_I440FX) += pc_piix.o
-obj-$(CONFIG_Q35) += pc_q35.o
-obj-$(CONFIG_MICROVM) += microvm.o
-obj-y += fw_cfg.o
-obj-$(CONFIG_X86_IOMMU) += x86-iommu.o
-obj-$(call lnot,$(CONFIG_X86_IOMMU)) += x86-iommu-stub.o
-obj-$(CONFIG_VTD) += intel_iommu.o
-obj-$(CONFIG_AMD_IOMMU) += amd_iommu.o
-obj-$(CONFIG_XEN) += ../xenpv/ xen/
-obj-$(CONFIG_VMPORT) += vmport.o
-obj-$(CONFIG_VMMOUSE) += vmmouse.o
-obj-$(CONFIG_PC) += port92.o
-
-obj-y += kvmvapic.o
-obj-$(CONFIG_ACPI) += acpi-common.o
-obj-$(CONFIG_PC) += acpi-build.o
diff --git a/hw/i386/kvm/Makefile.objs b/hw/i386/kvm/Makefile.objs
deleted file mode 100644
index 0c8d5f2dee..0000000000
--- a/hw/i386/kvm/Makefile.objs
+++ /dev/null
@@ -1,5 +0,0 @@
-obj-y += clock.o
-obj-$(CONFIG_APIC) += apic.o
-obj-$(CONFIG_IOAPIC) += ioapic.o
-obj-$(CONFIG_I8254) += i8254.o
-obj-$(CONFIG_I8259) += i8259.o
diff --git a/hw/i386/kvm/meson.build b/hw/i386/kvm/meson.build
new file mode 100644
index 0000000000..95467f1ded
--- /dev/null
+++ b/hw/i386/kvm/meson.build
@@ -0,0 +1,8 @@
+i386_kvm_ss = ss.source_set()
+i386_kvm_ss.add(files('clock.c'))
+i386_kvm_ss.add(when: 'CONFIG_APIC', if_true: files('apic.c'))
+i386_kvm_ss.add(when: 'CONFIG_I8254', if_true: files('i8254.c'))
+i386_kvm_ss.add(when: 'CONFIG_I8259', if_true: files('i8259.c'))
+i386_kvm_ss.add(when: 'CONFIG_IOAPIC', if_true: files('ioapic.c'))
+
+i386_ss.add_all(when: 'CONFIG_KVM', if_true: i386_kvm_ss)
diff --git a/hw/i386/meson.build b/hw/i386/meson.build
new file mode 100644
index 0000000000..63918fbe22
--- /dev/null
+++ b/hw/i386/meson.build
@@ -0,0 +1,32 @@
+i386_ss = ss.source_set()
+i386_ss.add(files(
+ 'fw_cfg.c',
+ 'kvmvapic.c',
+ 'e820_memory_layout.c',
+ 'multiboot.c',
+ 'x86.c',
+))
+
+i386_ss.add(when: 'CONFIG_X86_IOMMU', if_true: files('x86-iommu.c'),
+ if_false: files('x86-iommu-stub.c'))
+i386_ss.add(when: 'CONFIG_AMD_IOMMU', if_true: files('amd_iommu.c'))
+i386_ss.add(when: 'CONFIG_I440FX', if_true: files('pc_piix.c'))
+i386_ss.add(when: 'CONFIG_MICROVM', if_true: files('microvm.c'))
+i386_ss.add(when: 'CONFIG_Q35', if_true: files('pc_q35.c'))
+i386_ss.add(when: 'CONFIG_VMMOUSE', if_true: files('vmmouse.c'))
+i386_ss.add(when: 'CONFIG_VMPORT', if_true: files('vmport.c'))
+i386_ss.add(when: 'CONFIG_VTD', if_true: files('intel_iommu.c'))
+
+i386_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-common.c'))
+i386_ss.add(when: 'CONFIG_PC', if_true: files(
+ 'pc.c',
+ 'pc_sysfw.c',
+ 'acpi-build.c',
+ 'port92.c'))
+
+subdir('kvm')
+subdir('xen')
+
+i386_ss.add_all(xenpv_ss)
+
+hw_arch += {'i386': i386_ss}
diff --git a/hw/i386/xen/Makefile.objs b/hw/i386/xen/Makefile.objs
deleted file mode 100644
index be9d10cf2a..0000000000
--- a/hw/i386/xen/Makefile.objs
+++ /dev/null
@@ -1 +0,0 @@
-obj-y += xen_platform.o xen_apic.o xen_pvdevice.o xen-hvm.o xen-mapcache.o
diff --git a/hw/i386/xen/meson.build b/hw/i386/xen/meson.build
new file mode 100644
index 0000000000..be84130300
--- /dev/null
+++ b/hw/i386/xen/meson.build
@@ -0,0 +1,7 @@
+i386_ss.add(when: 'CONFIG_XEN', if_true: files(
+ 'xen-hvm.c',
+ 'xen-mapcache.c',
+ 'xen_apic.c',
+ 'xen_platform.c',
+ 'xen_pvdevice.c',
+))