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 | |
Bob Badour | 187b7d1 | 2021-02-12 17:48:16 -0800 | [diff] [blame^] | 17 | package { |
| 18 | // See: http://go/android-license-faq |
| 19 | // A large-scale-change added 'default_applicable_licenses' to import |
| 20 | // all of the 'license_kinds' from "system_core_license" |
| 21 | // to get the below license kinds: |
| 22 | // SPDX-license-identifier-Apache-2.0 |
| 23 | default_applicable_licenses: ["system_core_license"], |
| 24 | } |
| 25 | |
Dan Willemsen | 194edf7 | 2016-08-26 15:01:36 -0700 | [diff] [blame] | 26 | bootstat_lib_src_files = [ |
| 27 | "boot_event_record_store.cpp", |
Dan Willemsen | 194edf7 | 2016-08-26 15:01:36 -0700 | [diff] [blame] | 28 | ] |
| 29 | |
| 30 | cc_defaults { |
| 31 | name: "bootstat_defaults", |
| 32 | |
| 33 | cflags: [ |
| 34 | "-Wall", |
| 35 | "-Wextra", |
| 36 | "-Werror", |
Dan Willemsen | 194edf7 | 2016-08-26 15:01:36 -0700 | [diff] [blame] | 37 | ], |
| 38 | shared_libs: [ |
| 39 | "libbase", |
| 40 | "libcutils", |
| 41 | "liblog", |
| 42 | ], |
Howard Ro | fe0b389 | 2020-01-31 17:37:32 -0800 | [diff] [blame] | 43 | static_libs: ["libgtest_prod"], |
Dan Willemsen | 194edf7 | 2016-08-26 15:01:36 -0700 | [diff] [blame] | 44 | } |
| 45 | |
| 46 | // bootstat static library |
| 47 | // ----------------------------------------------------------------------------- |
| 48 | cc_library_static { |
| 49 | name: "libbootstat", |
| 50 | defaults: ["bootstat_defaults"], |
| 51 | srcs: bootstat_lib_src_files, |
| 52 | } |
| 53 | |
| 54 | // bootstat static library, debug |
| 55 | // ----------------------------------------------------------------------------- |
| 56 | cc_library_static { |
| 57 | name: "libbootstat_debug", |
| 58 | defaults: ["bootstat_defaults"], |
| 59 | host_supported: true, |
| 60 | srcs: bootstat_lib_src_files, |
| 61 | |
| 62 | target: { |
| 63 | host: { |
| 64 | cflags: ["-UNDEBUG"], |
| 65 | }, |
| 66 | }, |
| 67 | } |
| 68 | |
| 69 | // bootstat binary |
| 70 | // ----------------------------------------------------------------------------- |
| 71 | cc_binary { |
| 72 | name: "bootstat", |
| 73 | defaults: ["bootstat_defaults"], |
| 74 | static_libs: ["libbootstat"], |
Tej Singh | 4eacd38 | 2018-01-25 17:59:57 -0800 | [diff] [blame] | 75 | shared_libs: [ |
Tej Singh | 4eacd38 | 2018-01-25 17:59:57 -0800 | [diff] [blame] | 76 | "libstatslog" |
| 77 | ], |
Dan Willemsen | 194edf7 | 2016-08-26 15:01:36 -0700 | [diff] [blame] | 78 | init_rc: ["bootstat.rc"], |
Mark Salyzyn | 9a38704 | 2017-10-10 14:57:12 -0700 | [diff] [blame] | 79 | product_variables: { |
Logan Chien | 4892bbf | 2018-02-13 18:08:53 +0800 | [diff] [blame] | 80 | pdk: { |
| 81 | enabled: false, |
| 82 | }, |
Mark Salyzyn | 9a38704 | 2017-10-10 14:57:12 -0700 | [diff] [blame] | 83 | debuggable: { |
| 84 | init_rc: ["bootstat-debug.rc"], |
| 85 | }, |
| 86 | }, |
Dan Willemsen | 194edf7 | 2016-08-26 15:01:36 -0700 | [diff] [blame] | 87 | srcs: ["bootstat.cpp"], |
| 88 | } |
| 89 | |
| 90 | // Native tests |
| 91 | // ----------------------------------------------------------------------------- |
| 92 | cc_test { |
| 93 | name: "bootstat_tests", |
Dan Shi | 0f0cccc | 2017-03-31 17:13:04 -0700 | [diff] [blame] | 94 | test_suites: ["device-tests"], |
Dan Willemsen | 194edf7 | 2016-08-26 15:01:36 -0700 | [diff] [blame] | 95 | defaults: ["bootstat_defaults"], |
| 96 | host_supported: true, |
| 97 | static_libs: [ |
| 98 | "libbootstat_debug", |
| 99 | "libgmock", |
| 100 | ], |
| 101 | srcs: [ |
| 102 | "boot_event_record_store_test.cpp", |
Dan Willemsen | 194edf7 | 2016-08-26 15:01:36 -0700 | [diff] [blame] | 103 | "testrunner.cpp", |
| 104 | ], |
Julien Desprez | 2c8cb01 | 2021-02-05 09:22:05 -0800 | [diff] [blame] | 105 | test_options: { |
| 106 | unit_test: true, |
| 107 | }, |
Dan Willemsen | 194edf7 | 2016-08-26 15:01:36 -0700 | [diff] [blame] | 108 | } |