blob: bc90a6e6a55df92b70a148de2459f8fd53ac10fd [file] [log] [blame]
Dan Willemsen194edf72016-08-26 15:01:36 -07001//
2// Copyright (C) 2016 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17bootstat_lib_src_files = [
18 "boot_event_record_store.cpp",
Dan Willemsen194edf72016-08-26 15:01:36 -070019]
20
21cc_defaults {
22 name: "bootstat_defaults",
23
24 cflags: [
25 "-Wall",
26 "-Wextra",
27 "-Werror",
Dan Willemsen194edf72016-08-26 15:01:36 -070028 ],
29 shared_libs: [
30 "libbase",
31 "libcutils",
32 "liblog",
James Hawkins9aec9262017-01-31 11:42:24 -080033 "libmetricslogger",
Dan Willemsen194edf72016-08-26 15:01:36 -070034 ],
35 whole_static_libs: ["libgtest_prod"],
36 // Clang is required because of C++14
37 clang: true,
38}
39
40// bootstat static library
41// -----------------------------------------------------------------------------
42cc_library_static {
43 name: "libbootstat",
44 defaults: ["bootstat_defaults"],
45 srcs: bootstat_lib_src_files,
46}
47
48// bootstat static library, debug
49// -----------------------------------------------------------------------------
50cc_library_static {
51 name: "libbootstat_debug",
52 defaults: ["bootstat_defaults"],
53 host_supported: true,
54 srcs: bootstat_lib_src_files,
55
56 target: {
57 host: {
58 cflags: ["-UNDEBUG"],
59 },
60 },
61}
62
63// bootstat binary
64// -----------------------------------------------------------------------------
65cc_binary {
66 name: "bootstat",
67 defaults: ["bootstat_defaults"],
68 static_libs: ["libbootstat"],
69 init_rc: ["bootstat.rc"],
70 srcs: ["bootstat.cpp"],
71}
72
73// Native tests
74// -----------------------------------------------------------------------------
75cc_test {
76 name: "bootstat_tests",
Dan Shi0f0cccc2017-03-31 17:13:04 -070077 test_suites: ["device-tests"],
Dan Willemsen194edf72016-08-26 15:01:36 -070078 defaults: ["bootstat_defaults"],
79 host_supported: true,
80 static_libs: [
81 "libbootstat_debug",
82 "libgmock",
83 ],
84 srcs: [
85 "boot_event_record_store_test.cpp",
Dan Willemsen194edf72016-08-26 15:01:36 -070086 "testrunner.cpp",
87 ],
88}