1// Copyright 2016 Google Inc. All rights reserved
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: "ckati_defaults",
17    cflags: [
18        "-W",
19        "-Wall",
20        "-Werror",
21        "-DNOLOG",
22    ],
23    tidy_checks: [
24        "-google-global-names-in-headers",
25        "-google-build-using-namespace",
26        "-google-explicit-constructor",
27    ],
28}
29
30cc_library_host_static {
31    name: "libckati",
32    defaults: ["ckati_defaults"],
33    srcs: [
34        "affinity.cc",
35        "command.cc",
36        "dep.cc",
37        "eval.cc",
38        "exec.cc",
39        "expr.cc",
40        "file.cc",
41        "file_cache.cc",
42        "fileutil.cc",
43        "find.cc",
44        "flags.cc",
45        "func.cc",
46        "io.cc",
47        "log.cc",
48        "ninja.cc",
49        "parser.cc",
50        "regen.cc",
51        "rule.cc",
52        "stats.cc",
53        "stmt.cc",
54        "string_piece.cc",
55        "stringprintf.cc",
56        "strutil.cc",
57        "symtab.cc",
58        "thread_pool.cc",
59        "timeutil.cc",
60        "var.cc",
61        "version_unknown.cc",
62    ],
63}
64
65cc_binary_host {
66    name: "ckati",
67    defaults: ["ckati_defaults"],
68    srcs: ["main.cc"],
69    whole_static_libs: ["libckati"],
70}
71
72cc_binary_host {
73    name: "ckati_stamp_dump",
74    defaults: ["ckati_defaults"],
75    srcs: ["regen_dump.cc"],
76    static_libs: ["libckati"],
77}
78
79cc_test_host {
80    name: "ckati_test",
81    defaults: ["ckati_defaults"],
82    test_per_src: true,
83    srcs: [
84        "find_test.cc",
85        "ninja_test.cc",
86        "string_piece_test.cc",
87        "strutil_bench.cc",
88        "strutil_test.cc",
89    ],
90    gtest: false,
91    static_libs: ["libckati"],
92}
93
94cc_benchmark_host {
95    name: "ckati_fileutil_bench",
96    defaults: ["ckati_defaults"],
97    srcs: [
98        "fileutil_bench.cc",
99    ],
100    static_libs: ["libckati"],
101}
102