|
@@ -345,6 +345,16 @@ if 'CONFIG_USB_LIBUSB' in config_host
|
|
|
libusb = declare_dependency(compile_args: config_host['LIBUSB_CFLAGS'].split(),
|
|
|
link_args: config_host['LIBUSB_LIBS'].split())
|
|
|
endif
|
|
|
+capstone = not_found
|
|
|
+if 'CONFIG_CAPSTONE' in config_host
|
|
|
+ capstone = declare_dependency(compile_args: config_host['CAPSTONE_CFLAGS'].split(),
|
|
|
+ link_args: config_host['CAPSTONE_LIBS'].split())
|
|
|
+endif
|
|
|
+libpmem = not_found
|
|
|
+if 'CONFIG_LIBPMEM' in config_host
|
|
|
+ libpmem = declare_dependency(compile_args: config_host['LIBPMEM_CFLAGS'].split(),
|
|
|
+ link_args: config_host['LIBPMEM_LIBS'].split())
|
|
|
+endif
|
|
|
|
|
|
create_config = find_program('scripts/create_config')
|
|
|
minikconf = find_program('scripts/minikconf.py')
|
|
@@ -529,6 +539,8 @@ target_softmmu_arch = {}
|
|
|
# Trace files #
|
|
|
###############
|
|
|
|
|
|
+# TODO: add each directory to the subdirs from its own meson.build, once
|
|
|
+# we have those
|
|
|
trace_events_subdirs = [
|
|
|
'accel/kvm',
|
|
|
'accel/tcg',
|
|
@@ -697,6 +709,20 @@ softmmu_ss.add(when: ['CONFIG_FDT', fdt], if_true: [files('device_tree.c')])
|
|
|
common_ss.add(files('cpus-common.c'))
|
|
|
|
|
|
subdir('softmmu')
|
|
|
+
|
|
|
+specific_ss.add(files('disas.c', 'exec.c', 'gdbstub.c'), capstone, libpmem)
|
|
|
+specific_ss.add(files('exec-vary.c'))
|
|
|
+specific_ss.add(when: 'CONFIG_TCG', if_true: files(
|
|
|
+ 'fpu/softfloat.c',
|
|
|
+ 'tcg/optimize.c',
|
|
|
+ 'tcg/tcg-common.c',
|
|
|
+ 'tcg/tcg-op-gvec.c',
|
|
|
+ 'tcg/tcg-op-vec.c',
|
|
|
+ 'tcg/tcg-op.c',
|
|
|
+ 'tcg/tcg.c',
|
|
|
+))
|
|
|
+specific_ss.add(when: 'CONFIG_TCG_INTERPRETER', if_true: files('disas/tci.c', 'tcg/tci.c'))
|
|
|
+
|
|
|
subdir('backends')
|
|
|
subdir('disas')
|
|
|
subdir('migration')
|
|
@@ -788,6 +814,8 @@ common_all = static_library('common',
|
|
|
dependencies: common_all.dependencies(),
|
|
|
name_suffix: 'fa')
|
|
|
|
|
|
+feature_to_c = find_program('scripts/feature_to_c.sh')
|
|
|
+
|
|
|
foreach target : target_dirs
|
|
|
config_target = config_target_mak[target]
|
|
|
target_name = config_target['TARGET_NAME']
|
|
@@ -834,6 +862,15 @@ foreach target : target_dirs
|
|
|
endif
|
|
|
endif
|
|
|
|
|
|
+ if 'TARGET_XML_FILES' in config_target
|
|
|
+ gdbstub_xml = custom_target(target + '-gdbstub-xml.c',
|
|
|
+ output: target + '-gdbstub-xml.c',
|
|
|
+ input: files(config_target['TARGET_XML_FILES'].split()),
|
|
|
+ command: [feature_to_c, '@INPUT@'],
|
|
|
+ capture: true)
|
|
|
+ arch_srcs += gdbstub_xml
|
|
|
+ endif
|
|
|
+
|
|
|
t = target_arch[arch].apply(config_target, strict: false)
|
|
|
arch_srcs += t.sources()
|
|
|
|