meson: target

Similar to hw_arch, each architecture defines two sourceset which are placed in
dictionaries target_arch and target_softmmu_arch.  These are then 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>
This commit is contained in:
Paolo Bonzini 2020-08-07 12:10:23 +02:00
parent 2c44220d05
commit abff1abfe8
62 changed files with 595 additions and 328 deletions

View file

@ -1,20 +0,0 @@
obj-y += cpu-models.o
obj-y += cpu.o
obj-y += translate.o
ifeq ($(CONFIG_SOFTMMU),y)
obj-y += machine.o mmu_helper.o mmu-hash32.o monitor.o arch_dump.o
obj-$(TARGET_PPC64) += mmu-hash64.o mmu-book3s-v3.o compat.o
obj-$(TARGET_PPC64) += mmu-radix64.o
endif
obj-$(CONFIG_KVM) += kvm.o
obj-$(call lnot,$(CONFIG_KVM)) += kvm-stub.o
obj-y += dfp_helper.o
obj-y += excp_helper.o
obj-y += fpu_helper.o
obj-y += int_helper.o
obj-y += timebase_helper.o
obj-y += misc_helper.o
obj-y += mem_helper.o
obj-y += ../../libdecnumber/
obj-$(CONFIG_USER_ONLY) += user_only_helper.o
obj-y += gdbstub.o

37
target/ppc/meson.build Normal file
View file

@ -0,0 +1,37 @@
ppc_ss = ss.source_set()
ppc_ss.add(files(
'cpu-models.c',
'cpu.c',
'dfp_helper.c',
'excp_helper.c',
'fpu_helper.c',
'gdbstub.c',
'int_helper.c',
'mem_helper.c',
'misc_helper.c',
'timebase_helper.c',
'translate.c',
))
ppc_ss.add(libdecnumber)
ppc_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'), if_false: files('kvm-stub.c'))
ppc_ss.add(when: 'CONFIG_USER_ONLY', if_true: files('user_only_helper.c'))
ppc_softmmu_ss = ss.source_set()
ppc_softmmu_ss.add(files(
'arch_dump.c',
'machine.c',
'mmu-hash32.c',
'mmu_helper.c',
'monitor.c',
))
ppc_softmmu_ss.add(when: 'TARGET_PPC64', if_true: files(
'compat.c',
'mmu-book3s-v3.c',
'mmu-hash64.c',
'mmu-radix64.c',
))
target_arch += {'ppc': ppc_ss}
target_softmmu_arch += {'ppc': ppc_softmmu_ss}