3 'qapi-clone-visitor.c',
4 'qapi-dealloc-visitor.c',
5 'qapi-forward-visitor.c',
8 'qobject-input-visitor.c',
9 'qobject-output-visitor.c',
10 'string-input-visitor.c',
11 'string-output-visitor.c',
13 if have_system or have_tools
61 if have_system or have_tools
67 qapi_storage_daemon_modules = [
82 qapi_nonmodule_outputs = [
83 'qapi-introspect.c', 'qapi-introspect.h',
84 'qapi-types.c', 'qapi-types.h',
85 'qapi-visit.h', 'qapi-visit.c',
86 'qapi-commands.h', 'qapi-commands.c',
87 'qapi-init-commands.h', 'qapi-init-commands.c',
88 'qapi-events.h', 'qapi-events.c',
89 'qapi-emit-events.c', 'qapi-emit-events.h',
92 # First build all sources
94 'qapi-builtin-types.c', 'qapi-builtin-visit.c',
95 'qapi-builtin-types.h', 'qapi-builtin-visit.h',
99 qapi_specific_outputs = []
100 foreach module : qapi_all_modules
101 qapi_inputs += [ files(module + '.json') ]
102 qapi_module_outputs = [
103 'qapi-types-@0@.c'.format(module),
104 'qapi-types-@0@.h'.format(module),
105 'qapi-visit-@0@.c'.format(module),
106 'qapi-visit-@0@.h'.format(module),
108 if have_system or have_tools
109 qapi_module_outputs += [
110 'qapi-events-@0@.c'.format(module),
111 'qapi-events-@0@.h'.format(module),
112 'qapi-commands-@0@.c'.format(module),
113 'qapi-commands-@0@.h'.format(module),
116 if module.endswith('-target')
117 qapi_specific_outputs += qapi_module_outputs
119 qapi_util_outputs += qapi_module_outputs
123 qapi_files = custom_target('shared QAPI source files',
124 output: qapi_util_outputs + qapi_specific_outputs + qapi_nonmodule_outputs,
125 input: [ files('qapi-schema.json') ],
126 command: [ qapi_gen, '-o', 'qapi', '-b', '@INPUT0@' ],
127 depend_files: [ qapi_inputs, qapi_gen_depends ])
129 # Now go through all the outputs and add them to the right sourceset.
130 # These loops must be synchronized with the output of the above custom target.
133 foreach output : qapi_util_outputs
134 if output.endswith('.h')
135 genh += qapi_files[i]
137 util_ss.add(qapi_files[i])
141 foreach output : qapi_specific_outputs + qapi_nonmodule_outputs
142 if output.endswith('.h')
143 genh += qapi_files[i]
145 specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: qapi_files[i])