@@ -156,7 +156,6 @@ ifdef CONFIG_SOFTMMU
obj-y += arch_init.o cpus.o gdbstub.o balloon.o ioport.o
obj-y += qtest.o
obj-y += hw/
-obj-y += qapi/
obj-y += memory.o
obj-y += memory_mapping.o
LIBS := $(libs_softmmu) $(LIBS)
deleted file mode 100644
@@ -1,11 +0,0 @@
-QAPI_TARGET_MODULES = machine-target misc-target
-
-obj-y = qapi-introspect.o
-obj-y += $(QAPI_TARGET_MODULES:%=qapi-types-%.o)
-obj-y += qapi-types.o
-obj-y += $(QAPI_TARGET_MODULES:%=qapi-visit-%.o)
-obj-y += qapi-visit.o
-obj-y += $(QAPI_TARGET_MODULES:%=qapi-events-%.o)
-obj-y += qapi-events.o
-obj-y += $(QAPI_TARGET_MODULES:%=qapi-commands-%.o)
-obj-y += qapi-commands.o
@@ -67,11 +67,17 @@ foreach module : qapi_common_modules + qapi_target_modules
endif
endforeach
-qapi_all_outputs += [
+qapi_specific_outputs = [
'qapi-introspect.c', 'qapi-introspect.h',
- 'qapi-doc.texi'
+ 'qapi-types.c', 'qapi-types.h',
+ 'qapi-visit.c', 'qapi-visit.h',
+ 'qapi-events.c', 'qapi-events.h',
+ 'qapi-commands.c', 'qapi-commands.h',
]
+qapi_all_outputs += qapi_specific_outputs
+qapi_all_outputs += 'qapi-doc.texi'
+
qapi_files = custom_target('QAPI files',
output: qapi_all_outputs,
input: [ files('qapi-schema.json') ],
@@ -87,3 +93,14 @@ foreach output : qapi_util_outputs
endif
i = i + 1
endforeach
+
+i = 0
+foreach output : qapi_all_outputs
+ if output in qapi_specific_outputs
+ specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: qapi_files[i])
+ endif
+ if output.endswith('-target.c')
+ specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: qapi_files[i])
+ endif
+ i = i + 1
+endforeach