• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/ohos.gni")
15
16config("idl_config") {
17  include_dirs = [ "./idl_tool_2" ]
18}
19
20common_sources = [
21  "idl_tool_2/ast/base/ast_boolean_type.cpp",
22  "idl_tool_2/ast/base/ast_boolean_type.h",
23  "idl_tool_2/ast/base/ast_byte_type.cpp",
24  "idl_tool_2/ast/base/ast_byte_type.h",
25  "idl_tool_2/ast/base/ast_char_type.cpp",
26  "idl_tool_2/ast/base/ast_char_type.h",
27  "idl_tool_2/ast/base/ast_double_type.cpp",
28  "idl_tool_2/ast/base/ast_double_type.h",
29  "idl_tool_2/ast/base/ast_float_type.cpp",
30  "idl_tool_2/ast/base/ast_float_type.h",
31  "idl_tool_2/ast/base/ast_integer_type.cpp",
32  "idl_tool_2/ast/base/ast_integer_type.h",
33  "idl_tool_2/ast/base/ast_long_type.cpp",
34  "idl_tool_2/ast/base/ast_long_type.h",
35  "idl_tool_2/ast/base/ast_short_type.cpp",
36  "idl_tool_2/ast/base/ast_short_type.h",
37  "idl_tool_2/ast/base/ast_string16_type.cpp",
38  "idl_tool_2/ast/base/ast_string16_type.h",
39  "idl_tool_2/ast/base/ast_string_type.cpp",
40  "idl_tool_2/ast/base/ast_string_type.h",
41  "idl_tool_2/ast/base/ast_uchar_type.cpp",
42  "idl_tool_2/ast/base/ast_uchar_type.h",
43  "idl_tool_2/ast/base/ast_uint_type.cpp",
44  "idl_tool_2/ast/base/ast_uint_type.h",
45  "idl_tool_2/ast/base/ast_ulong_type.cpp",
46  "idl_tool_2/ast/base/ast_ulong_type.h",
47  "idl_tool_2/ast/base/ast_ushort_type.cpp",
48  "idl_tool_2/ast/base/ast_ushort_type.h",
49]
50
51common_sources += [
52  "idl_tool_2/ast/ast.cpp",
53  "idl_tool_2/ast/ast.h",
54  "idl_tool_2/ast/ast_array_type.cpp",
55  "idl_tool_2/ast/ast_array_type.h",
56  "idl_tool_2/ast/ast_attribute.cpp",
57  "idl_tool_2/ast/ast_attribute.h",
58  "idl_tool_2/ast/ast_enum_type.cpp",
59  "idl_tool_2/ast/ast_enum_type.h",
60  "idl_tool_2/ast/ast_expr.cpp",
61  "idl_tool_2/ast/ast_expr.h",
62  "idl_tool_2/ast/ast_fd_type.cpp",
63  "idl_tool_2/ast/ast_fd_type.h",
64  "idl_tool_2/ast/ast_interface_type.cpp",
65  "idl_tool_2/ast/ast_interface_type.h",
66  "idl_tool_2/ast/ast_map_type.cpp",
67  "idl_tool_2/ast/ast_map_type.h",
68  "idl_tool_2/ast/ast_method.cpp",
69  "idl_tool_2/ast/ast_method.h",
70  "idl_tool_2/ast/ast_namespace.cpp",
71  "idl_tool_2/ast/ast_namespace.h",
72  "idl_tool_2/ast/ast_native_buffer_type.cpp",
73  "idl_tool_2/ast/ast_native_buffer_type.h",
74  "idl_tool_2/ast/ast_node.cpp",
75  "idl_tool_2/ast/ast_node.h",
76  "idl_tool_2/ast/ast_orderedmap_type.cpp",
77  "idl_tool_2/ast/ast_orderedmap_type.h",
78  "idl_tool_2/ast/ast_parameter.cpp",
79  "idl_tool_2/ast/ast_parameter.h",
80  "idl_tool_2/ast/ast_pointer_type.cpp",
81  "idl_tool_2/ast/ast_pointer_type.h",
82  "idl_tool_2/ast/ast_rawdata_type.cpp",
83  "idl_tool_2/ast/ast_rawdata_type.h",
84  "idl_tool_2/ast/ast_sequenceable_type.cpp",
85  "idl_tool_2/ast/ast_sequenceable_type.h",
86  "idl_tool_2/ast/ast_smq_type.cpp",
87  "idl_tool_2/ast/ast_smq_type.h",
88  "idl_tool_2/ast/ast_struct_type.cpp",
89  "idl_tool_2/ast/ast_struct_type.h",
90  "idl_tool_2/ast/ast_type.cpp",
91  "idl_tool_2/ast/ast_type.h",
92  "idl_tool_2/ast/ast_union_type.cpp",
93  "idl_tool_2/ast/ast_union_type.h",
94  "idl_tool_2/ast/ast_void_type.cpp",
95  "idl_tool_2/ast/ast_void_type.h",
96]
97
98common_sources += [
99  "idl_tool_2/codegen/HDI/c/c_client_proxy_code_emitter.cpp",
100  "idl_tool_2/codegen/HDI/c/c_client_proxy_code_emitter.h",
101  "idl_tool_2/codegen/HDI/c/c_custom_types_code_emitter.cpp",
102  "idl_tool_2/codegen/HDI/c/c_custom_types_code_emitter.h",
103  "idl_tool_2/codegen/HDI/c/c_interface_code_emitter.cpp",
104  "idl_tool_2/codegen/HDI/c/c_interface_code_emitter.h",
105  "idl_tool_2/codegen/HDI/c/c_service_driver_code_emitter.cpp",
106  "idl_tool_2/codegen/HDI/c/c_service_driver_code_emitter.h",
107  "idl_tool_2/codegen/HDI/c/c_service_impl_code_emitter.cpp",
108  "idl_tool_2/codegen/HDI/c/c_service_impl_code_emitter.h",
109  "idl_tool_2/codegen/HDI/c/c_service_stub_code_emitter.cpp",
110  "idl_tool_2/codegen/HDI/c/c_service_stub_code_emitter.h",
111  "idl_tool_2/codegen/HDI/c/hdi_c_code_emitter.cpp",
112  "idl_tool_2/codegen/HDI/c/hdi_c_code_emitter.h",
113]
114
115common_sources += [
116  "idl_tool_2/codegen/HDI/cpp/cpp_client_proxy_code_emitter.cpp",
117  "idl_tool_2/codegen/HDI/cpp/cpp_client_proxy_code_emitter.h",
118  "idl_tool_2/codegen/HDI/cpp/cpp_custom_types_code_emitter.cpp",
119  "idl_tool_2/codegen/HDI/cpp/cpp_custom_types_code_emitter.h",
120  "idl_tool_2/codegen/HDI/cpp/cpp_interface_code_emitter.cpp",
121  "idl_tool_2/codegen/HDI/cpp/cpp_interface_code_emitter.h",
122  "idl_tool_2/codegen/HDI/cpp/cpp_service_driver_code_emitter.cpp",
123  "idl_tool_2/codegen/HDI/cpp/cpp_service_driver_code_emitter.h",
124  "idl_tool_2/codegen/HDI/cpp/cpp_service_impl_code_emitter.cpp",
125  "idl_tool_2/codegen/HDI/cpp/cpp_service_impl_code_emitter.h",
126  "idl_tool_2/codegen/HDI/cpp/cpp_service_stub_code_emitter.cpp",
127  "idl_tool_2/codegen/HDI/cpp/cpp_service_stub_code_emitter.h",
128  "idl_tool_2/codegen/HDI/cpp/hdi_cpp_code_emitter.cpp",
129  "idl_tool_2/codegen/HDI/cpp/hdi_cpp_code_emitter.h",
130]
131
132common_sources += [
133  "idl_tool_2/codegen/HDI/java/hdi_java_code_emitter.cpp",
134  "idl_tool_2/codegen/HDI/java/hdi_java_code_emitter.h",
135  "idl_tool_2/codegen/HDI/java/java_client_interface_code_emitter.cpp",
136  "idl_tool_2/codegen/HDI/java/java_client_interface_code_emitter.h",
137  "idl_tool_2/codegen/HDI/java/java_client_proxy_code_emitter.cpp",
138  "idl_tool_2/codegen/HDI/java/java_client_proxy_code_emitter.h",
139]
140
141common_sources += [
142  "idl_tool_2/codegen/HDI/type/hdi_array_type_emitter.cpp",
143  "idl_tool_2/codegen/HDI/type/hdi_array_type_emitter.h",
144  "idl_tool_2/codegen/HDI/type/hdi_boolean_type_emitter.cpp",
145  "idl_tool_2/codegen/HDI/type/hdi_boolean_type_emitter.h",
146  "idl_tool_2/codegen/HDI/type/hdi_byte_type_emitter.cpp",
147  "idl_tool_2/codegen/HDI/type/hdi_byte_type_emitter.h",
148  "idl_tool_2/codegen/HDI/type/hdi_double_type_emitter.cpp",
149  "idl_tool_2/codegen/HDI/type/hdi_double_type_emitter.h",
150  "idl_tool_2/codegen/HDI/type/hdi_enum_type_emitter.cpp",
151  "idl_tool_2/codegen/HDI/type/hdi_enum_type_emitter.h",
152  "idl_tool_2/codegen/HDI/type/hdi_fd_type_emitter.cpp",
153  "idl_tool_2/codegen/HDI/type/hdi_fd_type_emitter.h",
154  "idl_tool_2/codegen/HDI/type/hdi_float_type_emitter.cpp",
155  "idl_tool_2/codegen/HDI/type/hdi_float_type_emitter.h",
156  "idl_tool_2/codegen/HDI/type/hdi_int_type_emitter.cpp",
157  "idl_tool_2/codegen/HDI/type/hdi_int_type_emitter.h",
158  "idl_tool_2/codegen/HDI/type/hdi_interface_type_emitter.cpp",
159  "idl_tool_2/codegen/HDI/type/hdi_interface_type_emitter.h",
160  "idl_tool_2/codegen/HDI/type/hdi_long_type_emitter.cpp",
161  "idl_tool_2/codegen/HDI/type/hdi_long_type_emitter.h",
162  "idl_tool_2/codegen/HDI/type/hdi_map_type_emitter.cpp",
163  "idl_tool_2/codegen/HDI/type/hdi_map_type_emitter.h",
164  "idl_tool_2/codegen/HDI/type/hdi_native_buffer_type_emitter.cpp",
165  "idl_tool_2/codegen/HDI/type/hdi_native_buffer_type_emitter.h",
166  "idl_tool_2/codegen/HDI/type/hdi_pointer_type_emitter.cpp",
167  "idl_tool_2/codegen/HDI/type/hdi_pointer_type_emitter.h",
168  "idl_tool_2/codegen/HDI/type/hdi_seq_type_emitter.cpp",
169  "idl_tool_2/codegen/HDI/type/hdi_seq_type_emitter.h",
170  "idl_tool_2/codegen/HDI/type/hdi_short_type_emitter.cpp",
171  "idl_tool_2/codegen/HDI/type/hdi_short_type_emitter.h",
172  "idl_tool_2/codegen/HDI/type/hdi_smq_type_emitter.cpp",
173  "idl_tool_2/codegen/HDI/type/hdi_smq_type_emitter.h",
174  "idl_tool_2/codegen/HDI/type/hdi_string_type_emitter.cpp",
175  "idl_tool_2/codegen/HDI/type/hdi_string_type_emitter.h",
176  "idl_tool_2/codegen/HDI/type/hdi_struct_type_emitter.cpp",
177  "idl_tool_2/codegen/HDI/type/hdi_struct_type_emitter.h",
178  "idl_tool_2/codegen/HDI/type/hdi_uchar_type_emitter.cpp",
179  "idl_tool_2/codegen/HDI/type/hdi_uchar_type_emitter.h",
180  "idl_tool_2/codegen/HDI/type/hdi_uint_type_emitter.cpp",
181  "idl_tool_2/codegen/HDI/type/hdi_uint_type_emitter.h",
182  "idl_tool_2/codegen/HDI/type/hdi_ulong_type_emitter.cpp",
183  "idl_tool_2/codegen/HDI/type/hdi_ulong_type_emitter.h",
184  "idl_tool_2/codegen/HDI/type/hdi_union_type_emitter.cpp",
185  "idl_tool_2/codegen/HDI/type/hdi_union_type_emitter.h",
186  "idl_tool_2/codegen/HDI/type/hdi_ushort_type_emitter.cpp",
187  "idl_tool_2/codegen/HDI/type/hdi_ushort_type_emitter.h",
188]
189
190common_sources += [
191  "idl_tool_2/codegen/HDI/hdi_code_emitter.cpp",
192  "idl_tool_2/codegen/HDI/hdi_code_emitter.h",
193  "idl_tool_2/codegen/HDI/hdi_code_generator.cpp",
194  "idl_tool_2/codegen/HDI/hdi_code_generator.h",
195  "idl_tool_2/codegen/HDI/hdi_type_emitter.cpp",
196  "idl_tool_2/codegen/HDI/hdi_type_emitter.h",
197]
198
199common_sources += [
200  "idl_tool_2/codegen/SA/cpp/sa_cpp_client_code_emitter.cpp",
201  "idl_tool_2/codegen/SA/cpp/sa_cpp_client_code_emitter.h",
202  "idl_tool_2/codegen/SA/cpp/sa_cpp_client_proxy_code_emitter.cpp",
203  "idl_tool_2/codegen/SA/cpp/sa_cpp_client_proxy_code_emitter.h",
204  "idl_tool_2/codegen/SA/cpp/sa_cpp_code_emitter.cpp",
205  "idl_tool_2/codegen/SA/cpp/sa_cpp_code_emitter.h",
206  "idl_tool_2/codegen/SA/cpp/sa_cpp_custom_types_code_emitter.cpp",
207  "idl_tool_2/codegen/SA/cpp/sa_cpp_custom_types_code_emitter.h",
208  "idl_tool_2/codegen/SA/cpp/sa_cpp_interface_code_emitter.cpp",
209  "idl_tool_2/codegen/SA/cpp/sa_cpp_interface_code_emitter.h",
210  "idl_tool_2/codegen/SA/cpp/sa_cpp_service_stub_code_emitter.cpp",
211  "idl_tool_2/codegen/SA/cpp/sa_cpp_service_stub_code_emitter.h",
212]
213
214common_sources += [
215  "idl_tool_2/codegen/SA/rust/sa_rust_code_emitter.cpp",
216  "idl_tool_2/codegen/SA/rust/sa_rust_code_emitter.h",
217  "idl_tool_2/codegen/SA/rust/sa_rust_interface_code_emitter.cpp",
218  "idl_tool_2/codegen/SA/rust/sa_rust_interface_code_emitter.h",
219]
220
221common_sources += [
222  "idl_tool_2/codegen/SA/ts/sa_ts_client_proxy_code_emitter.cpp",
223  "idl_tool_2/codegen/SA/ts/sa_ts_client_proxy_code_emitter.h",
224  "idl_tool_2/codegen/SA/ts/sa_ts_code_emitter.cpp",
225  "idl_tool_2/codegen/SA/ts/sa_ts_code_emitter.h",
226  "idl_tool_2/codegen/SA/ts/sa_ts_interface_code_emitter.cpp",
227  "idl_tool_2/codegen/SA/ts/sa_ts_interface_code_emitter.h",
228  "idl_tool_2/codegen/SA/ts/sa_ts_service_stub_code_emitter.cpp",
229  "idl_tool_2/codegen/SA/ts/sa_ts_service_stub_code_emitter.h",
230]
231
232common_sources += [
233  "idl_tool_2/codegen/SA/type/sa_array_type_emitter.cpp",
234  "idl_tool_2/codegen/SA/type/sa_array_type_emitter.h",
235  "idl_tool_2/codegen/SA/type/sa_boolean_type_emitter.cpp",
236  "idl_tool_2/codegen/SA/type/sa_boolean_type_emitter.h",
237  "idl_tool_2/codegen/SA/type/sa_byte_type_emitter.cpp",
238  "idl_tool_2/codegen/SA/type/sa_byte_type_emitter.h",
239  "idl_tool_2/codegen/SA/type/sa_char_type_emitter.cpp",
240  "idl_tool_2/codegen/SA/type/sa_char_type_emitter.h",
241  "idl_tool_2/codegen/SA/type/sa_double_type_emitter.cpp",
242  "idl_tool_2/codegen/SA/type/sa_double_type_emitter.h",
243  "idl_tool_2/codegen/SA/type/sa_enum_type_emitter.cpp",
244  "idl_tool_2/codegen/SA/type/sa_enum_type_emitter.h",
245  "idl_tool_2/codegen/SA/type/sa_fd_type_emitter.cpp",
246  "idl_tool_2/codegen/SA/type/sa_fd_type_emitter.h",
247  "idl_tool_2/codegen/SA/type/sa_float_type_emitter.cpp",
248  "idl_tool_2/codegen/SA/type/sa_float_type_emitter.h",
249  "idl_tool_2/codegen/SA/type/sa_int_type_emitter.cpp",
250  "idl_tool_2/codegen/SA/type/sa_int_type_emitter.h",
251  "idl_tool_2/codegen/SA/type/sa_interface_type_emitter.cpp",
252  "idl_tool_2/codegen/SA/type/sa_interface_type_emitter.h",
253  "idl_tool_2/codegen/SA/type/sa_long_type_emitter.cpp",
254  "idl_tool_2/codegen/SA/type/sa_long_type_emitter.h",
255  "idl_tool_2/codegen/SA/type/sa_map_type_emitter.cpp",
256  "idl_tool_2/codegen/SA/type/sa_map_type_emitter.h",
257  "idl_tool_2/codegen/SA/type/sa_orderedmap_type_emitter.cpp",
258  "idl_tool_2/codegen/SA/type/sa_orderedmap_type_emitter.h",
259  "idl_tool_2/codegen/SA/type/sa_rawdata_type_emitter.cpp",
260  "idl_tool_2/codegen/SA/type/sa_rawdata_type_emitter.h",
261  "idl_tool_2/codegen/SA/type/sa_seq_type_emitter.cpp",
262  "idl_tool_2/codegen/SA/type/sa_seq_type_emitter.h",
263  "idl_tool_2/codegen/SA/type/sa_short_type_emitter.cpp",
264  "idl_tool_2/codegen/SA/type/sa_short_type_emitter.h",
265  "idl_tool_2/codegen/SA/type/sa_string_type_emitter.cpp",
266  "idl_tool_2/codegen/SA/type/sa_string_type_emitter.h",
267  "idl_tool_2/codegen/SA/type/sa_struct_type_emitter.cpp",
268  "idl_tool_2/codegen/SA/type/sa_struct_type_emitter.h",
269  "idl_tool_2/codegen/SA/type/sa_uchar_type_emitter.cpp",
270  "idl_tool_2/codegen/SA/type/sa_uchar_type_emitter.h",
271  "idl_tool_2/codegen/SA/type/sa_uint_type_emitter.cpp",
272  "idl_tool_2/codegen/SA/type/sa_uint_type_emitter.h",
273  "idl_tool_2/codegen/SA/type/sa_ulong_type_emitter.cpp",
274  "idl_tool_2/codegen/SA/type/sa_ulong_type_emitter.h",
275  "idl_tool_2/codegen/SA/type/sa_union_type_emitter.cpp",
276  "idl_tool_2/codegen/SA/type/sa_union_type_emitter.h",
277  "idl_tool_2/codegen/SA/type/sa_ushort_type_emitter.cpp",
278  "idl_tool_2/codegen/SA/type/sa_ushort_type_emitter.h",
279]
280
281common_sources += [
282  "idl_tool_2/codegen/SA/sa_code_emitter.cpp",
283  "idl_tool_2/codegen/SA/sa_code_emitter.h",
284  "idl_tool_2/codegen/SA/sa_code_generator.cpp",
285  "idl_tool_2/codegen/SA/sa_code_generator.h",
286  "idl_tool_2/codegen/SA/sa_type_emitter.cpp",
287  "idl_tool_2/codegen/SA/sa_type_emitter.h",
288]
289
290common_sources += [
291  "idl_tool_2/codegen/code_emitter.cpp",
292  "idl_tool_2/codegen/code_emitter.h",
293  "idl_tool_2/codegen/code_generator.cpp",
294  "idl_tool_2/codegen/code_generator.h",
295]
296
297common_sources += [
298  "idl_tool_2/hash/hash.cpp",
299  "idl_tool_2/hash/hash.h",
300]
301
302common_sources += [
303  "idl_tool_2/lexer/lexer.cpp",
304  "idl_tool_2/lexer/lexer.h",
305  "idl_tool_2/lexer/token.cpp",
306  "idl_tool_2/lexer/token.h",
307]
308
309common_sources += [
310  "idl_tool_2/metadata/meta_component.h",
311  "idl_tool_2/metadata/meta_interface.h",
312  "idl_tool_2/metadata/meta_method.h",
313  "idl_tool_2/metadata/meta_namespace.h",
314  "idl_tool_2/metadata/meta_patameter.h",
315  "idl_tool_2/metadata/meta_rawdata.h",
316  "idl_tool_2/metadata/meta_sequenceable.h",
317  "idl_tool_2/metadata/meta_type.h",
318  "idl_tool_2/metadata/metadata_builder.cpp",
319  "idl_tool_2/metadata/metadata_builder.h",
320  "idl_tool_2/metadata/metadata_dumper.cpp",
321  "idl_tool_2/metadata/metadata_dumper.h",
322  "idl_tool_2/metadata/metadata_reader.cpp",
323  "idl_tool_2/metadata/metadata_reader.h",
324  "idl_tool_2/metadata/metadata_serializer.cpp",
325  "idl_tool_2/metadata/metadata_serializer.h",
326]
327
328common_sources += [
329  "idl_tool_2/parser/intf_type_check.cpp",
330  "idl_tool_2/parser/intf_type_check.h",
331  "idl_tool_2/parser/parser.cpp",
332  "idl_tool_2/parser/parser.h",
333]
334
335common_sources += [
336  "idl_tool_2/preprocessor/preprocessor.cpp",
337  "idl_tool_2/preprocessor/preprocessor.h",
338]
339
340common_sources += [
341  "idl_tool_2/util/autoptr.h",
342  "idl_tool_2/util/common.h",
343  "idl_tool_2/util/file.cpp",
344  "idl_tool_2/util/file.h",
345  "idl_tool_2/util/light_refcount_base.cpp",
346  "idl_tool_2/util/light_refcount_base.h",
347  "idl_tool_2/util/logger.cpp",
348  "idl_tool_2/util/logger.h",
349  "idl_tool_2/util/options.cpp",
350  "idl_tool_2/util/options.h",
351  "idl_tool_2/util/string_builder.cpp",
352  "idl_tool_2/util/string_builder.h",
353  "idl_tool_2/util/string_helper.cpp",
354  "idl_tool_2/util/string_helper.h",
355  "idl_tool_2/util/string_pool.cpp",
356  "idl_tool_2/util/string_pool.h",
357]
358
359ohos_executable("idl") {
360  sources = [ "idl_tool_2/main.cpp" ]
361  sources += common_sources
362
363  configs = [ ":idl_config" ]
364  use_exceptions = true
365  use_rtti = true
366
367  external_deps = [ "bounds_checking_function:libsec_static" ]
368  if (is_arkui_x) {
369    deps = [ "//third_party/bounds_checking_function:libsec_static" ]
370  }
371
372  install_enable = false
373  part_name = "idl_tool"
374  subsystem_name = "ability"
375}
376