| Dan Willemsen | 194edf7 | 2016-08-26 15:01:36 -0700 | [diff] [blame] | 1 | // | 
 | 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 |  | 
 | 17 | bootstat_lib_src_files = [ | 
 | 18 |     "boot_event_record_store.cpp", | 
| Dan Willemsen | 194edf7 | 2016-08-26 15:01:36 -0700 | [diff] [blame] | 19 | ] | 
 | 20 |  | 
 | 21 | cc_defaults { | 
 | 22 |     name: "bootstat_defaults", | 
 | 23 |  | 
 | 24 |     cflags: [ | 
 | 25 |         "-Wall", | 
 | 26 |         "-Wextra", | 
 | 27 |         "-Werror", | 
| Dan Willemsen | 194edf7 | 2016-08-26 15:01:36 -0700 | [diff] [blame] | 28 |     ], | 
 | 29 |     shared_libs: [ | 
 | 30 |         "libbase", | 
 | 31 |         "libcutils", | 
 | 32 |         "liblog", | 
| James Hawkins | 9aec926 | 2017-01-31 11:42:24 -0800 | [diff] [blame] | 33 |         "libmetricslogger", | 
| Dan Willemsen | 194edf7 | 2016-08-26 15:01:36 -0700 | [diff] [blame] | 34 |     ], | 
| Dan Willemsen | 194edf7 | 2016-08-26 15:01:36 -0700 | [diff] [blame] | 35 | } | 
 | 36 |  | 
 | 37 | // bootstat static library | 
 | 38 | // ----------------------------------------------------------------------------- | 
 | 39 | cc_library_static { | 
 | 40 |     name: "libbootstat", | 
 | 41 |     defaults: ["bootstat_defaults"], | 
 | 42 |     srcs: bootstat_lib_src_files, | 
 | 43 | } | 
 | 44 |  | 
 | 45 | // bootstat static library, debug | 
 | 46 | // ----------------------------------------------------------------------------- | 
 | 47 | cc_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 | // ----------------------------------------------------------------------------- | 
 | 62 | cc_binary { | 
 | 63 |     name: "bootstat", | 
 | 64 |     defaults: ["bootstat_defaults"], | 
 | 65 |     static_libs: ["libbootstat"], | 
| Tej Singh | 4eacd38 | 2018-01-25 17:59:57 -0800 | [diff] [blame] | 66 |     shared_libs: [ | 
| Tej Singh | 4eacd38 | 2018-01-25 17:59:57 -0800 | [diff] [blame] | 67 |         "libstatslog" | 
 | 68 |     ], | 
| Dan Willemsen | 194edf7 | 2016-08-26 15:01:36 -0700 | [diff] [blame] | 69 |     init_rc: ["bootstat.rc"], | 
| Mark Salyzyn | 9a38704 | 2017-10-10 14:57:12 -0700 | [diff] [blame] | 70 |     product_variables: { | 
| Logan Chien | 4892bbf | 2018-02-13 18:08:53 +0800 | [diff] [blame] | 71 |         pdk: { | 
 | 72 |             enabled: false, | 
 | 73 |         }, | 
| Mark Salyzyn | 9a38704 | 2017-10-10 14:57:12 -0700 | [diff] [blame] | 74 |         debuggable: { | 
 | 75 |             init_rc: ["bootstat-debug.rc"], | 
 | 76 |         }, | 
 | 77 |     }, | 
| Dan Willemsen | 194edf7 | 2016-08-26 15:01:36 -0700 | [diff] [blame] | 78 |     srcs: ["bootstat.cpp"], | 
 | 79 | } | 
 | 80 |  | 
 | 81 | // Native tests | 
 | 82 | // ----------------------------------------------------------------------------- | 
 | 83 | cc_test { | 
 | 84 |     name: "bootstat_tests", | 
| Dan Shi | 0f0cccc | 2017-03-31 17:13:04 -0700 | [diff] [blame] | 85 |     test_suites: ["device-tests"], | 
| Dan Willemsen | 194edf7 | 2016-08-26 15:01:36 -0700 | [diff] [blame] | 86 |     defaults: ["bootstat_defaults"], | 
 | 87 |     host_supported: true, | 
 | 88 |     static_libs: [ | 
 | 89 |         "libbootstat_debug", | 
 | 90 |         "libgmock", | 
 | 91 |     ], | 
 | 92 |     srcs: [ | 
 | 93 |         "boot_event_record_store_test.cpp", | 
| Dan Willemsen | 194edf7 | 2016-08-26 15:01:36 -0700 | [diff] [blame] | 94 |         "testrunner.cpp", | 
 | 95 |     ], | 
 | 96 | } |