blob: 2c870182cacdb86c7e53ac253bb337bea484ee97 [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 ],
Dan Willemsen194edf72016-08-26 15:01:36 -070035}
36
37// bootstat static library
38// -----------------------------------------------------------------------------
39cc_library_static {
40 name: "libbootstat",
41 defaults: ["bootstat_defaults"],
42 srcs: bootstat_lib_src_files,
43}
44
45// bootstat static library, debug
46// -----------------------------------------------------------------------------
47cc_library_static {
48 name: "libbootstat_debug",
49 defaults: ["bootstat_defaults"],
50 host_supported: true,
51 srcs: bootstat_lib_src_files,
52
53 target: {
54 host: {
55 cflags: ["-UNDEBUG"],
56 },
57 },
58}
59
60// bootstat binary
61// -----------------------------------------------------------------------------
62cc_binary {
63 name: "bootstat",
64 defaults: ["bootstat_defaults"],
65 static_libs: ["libbootstat"],
Mark Salyzynb304f6d2017-08-04 13:35:51 -070066 shared_libs: ["liblogcat"],
Dan Willemsen194edf72016-08-26 15:01:36 -070067 init_rc: ["bootstat.rc"],
Mark Salyzyn9a387042017-10-10 14:57:12 -070068 product_variables: {
69 debuggable: {
70 init_rc: ["bootstat-debug.rc"],
71 },
72 },
Dan Willemsen194edf72016-08-26 15:01:36 -070073 srcs: ["bootstat.cpp"],
74}
75
76// Native tests
77// -----------------------------------------------------------------------------
78cc_test {
79 name: "bootstat_tests",
Dan Shi0f0cccc2017-03-31 17:13:04 -070080 test_suites: ["device-tests"],
Dan Willemsen194edf72016-08-26 15:01:36 -070081 defaults: ["bootstat_defaults"],
82 host_supported: true,
83 static_libs: [
84 "libbootstat_debug",
85 "libgmock",
86 ],
87 srcs: [
88 "boot_event_record_store_test.cpp",
Dan Willemsen194edf72016-08-26 15:01:36 -070089 "testrunner.cpp",
90 ],
91}