aboutsummaryrefslogtreecommitdiff
path: root/target/sparc
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2020-08-07 12:10:23 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2020-08-21 06:30:35 -0400
commitabff1abfe8113a989215ed33c48839a827e531f1 (patch)
treefb31d57aff267871822d237052c264788664047e /target/sparc
parent2c44220d055d12142f27cf513848f17d6007ae35 (diff)
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>
Diffstat (limited to 'target/sparc')
-rw-r--r--target/sparc/Makefile.objs7
-rw-r--r--target/sparc/meson.build23
2 files changed, 23 insertions, 7 deletions
diff --git a/target/sparc/Makefile.objs b/target/sparc/Makefile.objs
deleted file mode 100644
index ec905698c5..0000000000
--- a/target/sparc/Makefile.objs
+++ /dev/null
@@ -1,7 +0,0 @@
-obj-$(CONFIG_SOFTMMU) += machine.o monitor.o
-obj-y += translate.o helper.o cpu.o
-obj-y += fop_helper.o cc_helper.o win_helper.o mmu_helper.o ldst_helper.o
-obj-$(TARGET_SPARC) += int32_helper.o
-obj-$(TARGET_SPARC64) += int64_helper.o
-obj-$(TARGET_SPARC64) += vis_helper.o
-obj-y += gdbstub.o
diff --git a/target/sparc/meson.build b/target/sparc/meson.build
new file mode 100644
index 0000000000..a3638b9503
--- /dev/null
+++ b/target/sparc/meson.build
@@ -0,0 +1,23 @@
+sparc_ss = ss.source_set()
+sparc_ss.add(files(
+ 'cc_helper.c',
+ 'cpu.c',
+ 'fop_helper.c',
+ 'gdbstub.c',
+ 'helper.c',
+ 'ldst_helper.c',
+ 'mmu_helper.c',
+ 'translate.c',
+ 'win_helper.c',
+))
+sparc_ss.add(when: 'TARGET_SPARC', if_true: files('int32_helper.c'))
+sparc_ss.add(when: 'TARGET_SPARC64', if_true: files('int64_helper.c', 'vis_helper.c'))
+
+sparc_softmmu_ss = ss.source_set()
+sparc_softmmu_ss.add(files(
+ 'machine.c',
+ 'monitor.c',
+))
+
+target_arch += {'sparc': sparc_ss}
+target_softmmu_arch += {'sparc': sparc_softmmu_ss}