blob: b214ff9845a4dd76f15b702bf8599dfb4c7924db [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
40 local_include_dirs: ["src"],
41 // TODO
42 include_dirs: ["packages/inputmethods/LatinIME/native/jni/src"],
43
44 product_variables: {
45 unbundled_build: {
46 enabled: false,
47 },
48 },
49}
50
51cc_library_host_static {
52 name: "liblatinime_dicttoolkit",
53 defaults: ["dicttoolkit_defaults"],
54
55 srcs: [
56 "src/command_executors/diff_executor.cpp",
57 "src/command_executors/header_executor.cpp",
58 "src/command_executors/help_executor.cpp",
59 "src/command_executors/info_executor.cpp",
60 "src/command_executors/makedict_executor.cpp",
61 "src/offdevice_intermediate_dict/offdevice_intermediate_dict.cpp",
62 "src/utils/arguments_parser.cpp",
63 "src/utils/command_utils.cpp",
64 "src/utils/utf8_utils.cpp",
65
66 ":LATIN_IME_CORE_SRC_FILES",
67 ],
68}
69
70cc_binary_host {
71 name: "dicttoolkit",
72 defaults: ["dicttoolkit_defaults"],
73
74 srcs: ["dict_toolkit_main.cpp"],
75 static_libs: ["liblatinime_dicttoolkit"],
76}
77
78cc_test_host {
79 name: "dicttoolkit_unittests",
80 defaults: ["dicttoolkit_defaults"],
81
82 srcs: [
83 "tests/command_executors/diff_executor_test.cpp",
84 "tests/command_executors/header_executor_test.cpp",
85 "tests/command_executors/info_executor_test.cpp",
86 "tests/command_executors/makedict_executor_test.cpp",
87 "tests/dict_toolkit_defines_test.cpp",
88 "tests/offdevice_intermediate_dict/offdevice_intermediate_dict_test.cpp",
89 "tests/utils/arguments_parser_test.cpp",
90 "tests/utils/command_utils_test.cpp",
91 "tests/utils/utf8_utils_test.cpp",
92 ],
93 static_libs: ["liblatinime_dicttoolkit"],
94}