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