3 'qapi-clone-visitor.c',
4 'qapi-dealloc-visitor.c',
10 'qobject-input-visitor.c',
11 'qobject-output-visitor.c',
12 'string-input-visitor.c',
13 'string-output-visitor.c',
53 qapi_storage_daemon_modules = [
68 qapi_nonmodule_outputs = [
69 'qapi-introspect.c', 'qapi-introspect.h',
70 'qapi-types.c', 'qapi-types.h',
71 'qapi-visit.h', 'qapi-visit.c',
72 'qapi-commands.h', 'qapi-commands.c',
73 'qapi-init-commands.h', 'qapi-init-commands.c',
74 'qapi-events.h', 'qapi-events.c',
75 'qapi-emit-events.c', 'qapi-emit-events.h',
78 # First build all sources
80 'qapi-builtin-types.c', 'qapi-builtin-visit.c',
81 'qapi-builtin-types.h', 'qapi-builtin-visit.h',
85 qapi_specific_outputs = []
86 foreach module : qapi_all_modules
87 qapi_inputs += [ files(module + '.json') ]
88 qapi_module_outputs = [
89 'qapi-types-@0@.c'.format(module),
90 'qapi-types-@0@.h'.format(module),
91 'qapi-visit-@0@.c'.format(module),
92 'qapi-visit-@0@.h'.format(module),
93 'qapi-events-@0@.c'.format(module),
94 'qapi-events-@0@.h'.format(module),
95 'qapi-commands-@0@.c'.format(module),
96 'qapi-commands-@0@.h'.format(module),
98 if module.endswith('-target')
99 qapi_specific_outputs += qapi_module_outputs
101 qapi_util_outputs += qapi_module_outputs
105 qapi_files = custom_target('shared QAPI source files',
106 output: qapi_util_outputs + qapi_specific_outputs + qapi_nonmodule_outputs,
107 input: [ files('qapi-schema.json') ],
108 command: [ qapi_gen, '-o', 'qapi', '-b', '@INPUT0@' ],
109 depend_files: [ qapi_inputs, qapi_gen_depends ])
111 # Now go through all the outputs and add them to the right sourceset.
112 # These loops must be synchronized with the output of the above custom target.
115 foreach output : qapi_util_outputs
116 if output.endswith('.h')
117 genh += qapi_files[i]
119 util_ss.add(qapi_files[i])
123 foreach output : qapi_specific_outputs + qapi_nonmodule_outputs
124 if output.endswith('.h')
125 genh += qapi_files[i]
127 specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: qapi_files[i])