From: Marc-André Lureau <marcandre.lur...@redhat.com> Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> --- Makefile.target | 1 - qapi/Makefile.objs | 11 ----------- qapi/meson.build | 21 +++++++++++++++++++-- 3 files changed, 19 insertions(+), 14 deletions(-) delete mode 100644 qapi/Makefile.objs
diff --git a/Makefile.target b/Makefile.target index e025246..c2fcb22 100644 --- a/Makefile.target +++ b/Makefile.target @@ -154,7 +154,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) diff --git a/qapi/Makefile.objs b/qapi/Makefile.objs deleted file mode 100644 index 10ca4f6..0000000 --- a/qapi/Makefile.objs +++ /dev/null @@ -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 diff --git a/qapi/meson.build b/qapi/meson.build index 8431f26..4a335d9 100644 --- a/qapi/meson.build +++ b/qapi/meson.build @@ -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 -- 1.8.3.1