aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc
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/ppc
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/ppc')
-rw-r--r--hw/ppc/Makefile.objs35
-rw-r--r--hw/ppc/meson.build80
2 files changed, 80 insertions, 35 deletions
diff --git a/hw/ppc/Makefile.objs b/hw/ppc/Makefile.objs
deleted file mode 100644
index c3d3cc56eb..0000000000
--- a/hw/ppc/Makefile.objs
+++ /dev/null
@@ -1,35 +0,0 @@
-# shared objects
-obj-y += ppc.o ppc_booke.o
-obj-$(CONFIG_FDT_PPC) += fdt.o
-obj-$(CONFIG_FW_CFG_PPC) += fw_cfg.o
-# IBM pSeries (sPAPR)
-obj-$(CONFIG_PSERIES) += spapr.o spapr_caps.o spapr_vio.o spapr_events.o
-obj-$(CONFIG_PSERIES) += spapr_hcall.o spapr_iommu.o spapr_rtas.o
-obj-$(CONFIG_PSERIES) += spapr_pci.o spapr_rtc.o spapr_drc.o
-obj-$(CONFIG_PSERIES) += spapr_cpu_core.o spapr_ovec.o spapr_irq.o
-obj-$(CONFIG_PSERIES) += spapr_tpm_proxy.o spapr_nvdimm.o
-obj-$(CONFIG_SPAPR_RNG) += spapr_rng.o
-obj-$(call land,$(CONFIG_PSERIES),$(CONFIG_LINUX)) += spapr_pci_vfio.o spapr_pci_nvlink2.o
-# IBM PowerNV
-obj-$(CONFIG_POWERNV) += pnv.o pnv_xscom.o pnv_core.o pnv_lpc.o pnv_psi.o pnv_occ.o pnv_bmc.o
-obj-$(CONFIG_POWERNV) += pnv_homer.o pnv_pnor.o
-
-obj-$(CONFIG_PSERIES) += spapr_rtas_ddw.o
-# PowerPC 4xx boards
-obj-$(CONFIG_PPC405) += ppc405_boards.o ppc405_uc.o
-obj-$(CONFIG_PPC440) += ppc440_bamboo.o ppc440_pcix.o ppc440_uc.o
-obj-$(CONFIG_PPC4XX) += ppc4xx_pci.o ppc4xx_devs.o
-obj-$(CONFIG_SAM460EX) += sam460ex.o
-# PReP
-obj-$(CONFIG_PREP) += prep.o
-obj-$(CONFIG_PREP) += prep_systemio.o
-obj-${CONFIG_RS6000_MC} += rs6000_mc.o
-# OldWorld PowerMac
-obj-$(CONFIG_MAC_OLDWORLD) += mac_oldworld.o
-# NewWorld PowerMac
-obj-$(CONFIG_MAC_NEWWORLD) += mac_newworld.o
-# e500
-obj-$(CONFIG_E500) += e500.o mpc8544ds.o e500plat.o
-obj-$(CONFIG_E500) += mpc8544_guts.o ppce500_spin.o
-# PowerPC 440 Xilinx ML507 reference board.
-obj-$(CONFIG_VIRTEX) += virtex_ml507.o
diff --git a/hw/ppc/meson.build b/hw/ppc/meson.build
new file mode 100644
index 0000000000..918969b320
--- /dev/null
+++ b/hw/ppc/meson.build
@@ -0,0 +1,80 @@
+ppc_ss = ss.source_set()
+ppc_ss.add(files(
+ 'ppc.c',
+ 'ppc_booke.c',
+))
+ppc_ss.add(when: 'CONFIG_FDT_PPC', if_true: [files(
+ 'fdt.c',
+), fdt])
+ppc_ss.add(when: 'CONFIG_FW_CFG_PPC', if_true: files('fw_cfg.c'))
+
+# IBM pSeries (sPAPR)
+ppc_ss.add(when: 'CONFIG_PSERIES', if_true: files(
+ 'spapr.c',
+ 'spapr_caps.c',
+ 'spapr_vio.c',
+ 'spapr_events.c',
+ 'spapr_hcall.c',
+ 'spapr_iommu.c',
+ 'spapr_rtas.c',
+ 'spapr_pci.c',
+ 'spapr_rtc.c',
+ 'spapr_drc.c',
+ 'spapr_cpu_core.c',
+ 'spapr_ovec.c',
+ 'spapr_irq.c',
+ 'spapr_tpm_proxy.c',
+ 'spapr_nvdimm.c',
+ 'spapr_rtas_ddw.c'
+))
+ppc_ss.add(when: 'CONFIG_SPAPR_RNG', if_true: files('spapr_rng.c'))
+ppc_ss.add(when: ['CONFIG_PSERIES', 'CONFIG_LINUX'], if_true: files(
+ 'spapr_pci_vfio.c',
+ 'spapr_pci_nvlink2.c'
+))
+
+# IBM PowerNV
+ppc_ss.add(when: 'CONFIG_POWERNV', if_true: files(
+ 'pnv.c',
+ 'pnv_xscom.c',
+ 'pnv_core.c',
+ 'pnv_lpc.c',
+ 'pnv_psi.c',
+ 'pnv_occ.c',
+ 'pnv_bmc.c',
+ 'pnv_homer.c',
+ 'pnv_pnor.c',
+))
+# PowerPC 4xx boards
+ppc_ss.add(when: 'CONFIG_PPC405', if_true: files(
+ 'ppc405_boards.c',
+ 'ppc405_uc.c'))
+ppc_ss.add(when: 'CONFIG_PPC440', if_true: files(
+ 'ppc440_bamboo.c',
+ 'ppc440_pcix.c', 'ppc440_uc.c'))
+ppc_ss.add(when: 'CONFIG_PPC4XX', if_true: files(
+ 'ppc4xx_pci.c',
+ 'ppc4xx_devs.c'))
+ppc_ss.add(when: 'CONFIG_SAM460EX', if_true: files('sam460ex.c'))
+# PReP
+ppc_ss.add(when: 'CONFIG_PREP', if_true: files('prep.c'))
+ppc_ss.add(when: 'CONFIG_PREP', if_true: files('prep_systemio.c'))
+ppc_ss.add(when: 'CONFIG_RS6000_MC', if_true: files('rs6000_mc.c'))
+# OldWorld PowerMac
+ppc_ss.add(when: 'CONFIG_MAC_OLDWORLD', if_true: files('mac_oldworld.c'))
+# NewWorld PowerMac
+ppc_ss.add(when: 'CONFIG_MAC_NEWWORLD', if_true: files('mac_newworld.c'))
+# e500
+ppc_ss.add(when: 'CONFIG_E500', if_true: files(
+ 'e500.c',
+ 'mpc8544ds.c',
+ 'e500plat.c'
+))
+ppc_ss.add(when: 'CONFIG_E500', if_true: files(
+ 'mpc8544_guts.c',
+ 'ppce500_spin.c'
+))
+# PowerPC 440 Xilinx ML507 reference board.
+ppc_ss.add(when: 'CONFIG_VIRTEX', if_true: files('virtex_ml507.c'))
+
+hw_arch += {'ppc': ppc_ss}