blob: fd35697c1db33adb13018b770405352c19d07fb1 [file] [log] [blame]
Dan Willemsen22ebec62018-10-24 17:44:49 -07001// Copyright (C) 2014 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15cc_defaults {
16 name: "dicttoolkit_defaults",
17
18 cflags: [
19 "-Werror",
20 "-Wall",
21 "-Wextra",
22 "-Weffc++",
23 "-Wformat=2",
24 "-Wcast-qual",
25 "-Wcast-align",
26 "-Wwrite-strings",
27 "-Wfloat-equal",
28 "-Wpointer-arith",
29 "-Winit-self",
30 "-Wredundant-decls",
31 "-Woverloaded-virtual",
32 "-Wsign-promo",
33 "-Wno-system-headers",
34
35 // To suppress compiler warnings for unused variables/functions used for debug features etc.
36 "-Wno-unused-parameter",
37 "-Wno-unused-function",
38 ],
39
Orion Hodson54c4f2a2020-04-03 12:45:16 +010040 header_libs: ["jni_headers"],
Dan Willemsen22ebec62018-10-24 17:44:49 -070041 local_include_dirs: ["src"],
42 // TODO
43 include_dirs: ["packages/inputmethods/LatinIME/native/jni/src"],
44
45 product_variables: {
46 unbundled_build: {
47 enabled: false,
48 },
49 },
50}
51
52cc_library_host_static {
53 name: "liblatinime_dicttoolkit",
54 defaults: ["dicttoolkit_defaults"],
55
56 srcs: [
57 "src/command_executors/diff_executor.cpp",
58 "src/command_executors/header_executor.cpp",
59 "src/command_executors/help_executor.cpp",
60 "src/command_executors/info_executor.cpp",
61 "src/command_executors/makedict_executor.cpp",
62 "src/offdevice_intermediate_dict/offdevice_intermediate_dict.cpp",
63 "src/utils/arguments_parser.cpp",
64 "src/utils/command_utils.cpp",
65 "src/utils/utf8_utils.cpp",
66
67 ":LATIN_IME_CORE_SRC_FILES",
68 ],
69}
70
71cc_binary_host {
72 name: "dicttoolkit",
73 defaults: ["dicttoolkit_defaults"],
74
75 srcs: ["dict_toolkit_main.cpp"],
76 static_libs: ["liblatinime_dicttoolkit"],
77}
78
79cc_test_host {
80 name: "dicttoolkit_unittests",
81 defaults: ["dicttoolkit_defaults"],
82
83 srcs: [
84 "tests/command_executors/diff_executor_test.cpp",
85 "tests/command_executors/header_executor_test.cpp",
86 "tests/command_executors/info_executor_test.cpp",
87 "tests/command_executors/makedict_executor_test.cpp",
88 "tests/dict_toolkit_defines_test.cpp",
89 "tests/offdevice_intermediate_dict/offdevice_intermediate_dict_test.cpp",
90 "tests/utils/arguments_parser_test.cpp",
91 "tests/utils/command_utils_test.cpp",
92 "tests/utils/utf8_utils_test.cpp",
93 ],
94 static_libs: ["liblatinime_dicttoolkit"],
95}