Jiyong Park | 522ae9a | 2017-06-23 21:23:16 +0900 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2017 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 | cc_defaults { |
Vishnu Nair | e97d612 | 2018-01-18 13:58:56 -0800 | [diff] [blame^] | 17 | name: "dumpstate_cflag_defaults", |
Jiyong Park | 522ae9a | 2017-06-23 21:23:16 +0900 | [diff] [blame] | 18 | cflags: [ |
| 19 | "-Wall", |
| 20 | "-Werror", |
| 21 | "-Wno-missing-field-initializers", |
| 22 | "-Wno-unused-variable", |
| 23 | "-Wunused-parameter", |
| 24 | ], |
| 25 | } |
| 26 | |
Jiyong Park | 522ae9a | 2017-06-23 21:23:16 +0900 | [diff] [blame] | 27 | cc_library_shared { |
| 28 | name: "libdumpstateutil", |
Vishnu Nair | e97d612 | 2018-01-18 13:58:56 -0800 | [diff] [blame^] | 29 | defaults: ["dumpstate_cflag_defaults"], |
Jiyong Park | 522ae9a | 2017-06-23 21:23:16 +0900 | [diff] [blame] | 30 | vendor_available: true, |
Justin Yun | 7fdc660 | 2017-08-02 17:02:05 +0900 | [diff] [blame] | 31 | vndk: { |
| 32 | enabled: true, |
| 33 | }, |
Jiyong Park | 522ae9a | 2017-06-23 21:23:16 +0900 | [diff] [blame] | 34 | srcs: [ |
| 35 | "DumpstateInternal.cpp", |
| 36 | "DumpstateUtil.cpp", |
| 37 | ], |
| 38 | shared_libs: [ |
| 39 | "libbase", |
| 40 | "liblog", |
| 41 | ], |
Jiyong Park | 259775c | 2017-11-03 14:40:24 +0900 | [diff] [blame] | 42 | export_include_dirs: ["."], |
| 43 | export_shared_lib_headers: [ |
| 44 | "libbase", |
| 45 | ], |
Jiyong Park | 522ae9a | 2017-06-23 21:23:16 +0900 | [diff] [blame] | 46 | } |
| 47 | |
| 48 | cc_library_shared { |
| 49 | name: "libdumpstateaidl", |
Vishnu Nair | e97d612 | 2018-01-18 13:58:56 -0800 | [diff] [blame^] | 50 | defaults: ["dumpstate_cflag_defaults"], |
Jiyong Park | 522ae9a | 2017-06-23 21:23:16 +0900 | [diff] [blame] | 51 | shared_libs: [ |
| 52 | "libbinder", |
| 53 | "libutils", |
| 54 | ], |
| 55 | aidl: { |
| 56 | local_include_dirs: ["binder"], |
| 57 | export_aidl_headers: true, |
| 58 | }, |
| 59 | srcs: [ |
| 60 | "binder/android/os/IDumpstate.aidl", |
| 61 | "binder/android/os/IDumpstateListener.aidl", |
| 62 | "binder/android/os/IDumpstateToken.aidl", |
| 63 | ], |
| 64 | } |
| 65 | |
Vishnu Nair | e97d612 | 2018-01-18 13:58:56 -0800 | [diff] [blame^] | 66 | cc_defaults { |
| 67 | name: "dumpstate_defaults", |
| 68 | defaults: ["dumpstate_cflag_defaults"], |
Jiyong Park | 522ae9a | 2017-06-23 21:23:16 +0900 | [diff] [blame] | 69 | shared_libs: [ |
| 70 | "android.hardware.dumpstate@1.0", |
| 71 | "libziparchive", |
| 72 | "libbase", |
| 73 | "libbinder", |
| 74 | "libcrypto", |
| 75 | "libcutils", |
| 76 | "libdebuggerd_client", |
| 77 | "libdumpstateaidl", |
| 78 | "libdumpstateutil", |
| 79 | "libhidlbase", |
| 80 | "libhidltransport", |
| 81 | "liblog", |
| 82 | "libutils", |
| 83 | ], |
| 84 | srcs: [ |
Vishnu Nair | 20cf503 | 2018-01-05 13:15:49 -0800 | [diff] [blame] | 85 | "DumpstateSectionReporter.cpp", |
Jiyong Park | 522ae9a | 2017-06-23 21:23:16 +0900 | [diff] [blame] | 86 | "DumpstateService.cpp", |
| 87 | "utils.cpp", |
Vishnu Nair | e97d612 | 2018-01-18 13:58:56 -0800 | [diff] [blame^] | 88 | ], |
| 89 | static_libs: [ |
| 90 | "libdumpsys", |
| 91 | "libserviceutils" |
| 92 | ], |
| 93 | } |
| 94 | |
| 95 | cc_binary { |
| 96 | name: "dumpstate", |
| 97 | defaults: ["dumpstate_defaults"], |
| 98 | srcs: [ |
Jiyong Park | 522ae9a | 2017-06-23 21:23:16 +0900 | [diff] [blame] | 99 | "dumpstate.cpp", |
Vishnu Nair | e97d612 | 2018-01-18 13:58:56 -0800 | [diff] [blame^] | 100 | "main.cpp", |
Jiyong Park | 522ae9a | 2017-06-23 21:23:16 +0900 | [diff] [blame] | 101 | ], |
| 102 | init_rc: ["dumpstate.rc"], |
| 103 | } |
| 104 | |
| 105 | cc_test { |
| 106 | name: "dumpstate_test", |
| 107 | defaults: ["dumpstate_defaults"], |
Jiyong Park | 522ae9a | 2017-06-23 21:23:16 +0900 | [diff] [blame] | 108 | srcs: [ |
Jiyong Park | 522ae9a | 2017-06-23 21:23:16 +0900 | [diff] [blame] | 109 | "tests/dumpstate_test.cpp", |
| 110 | ], |
| 111 | static_libs: ["libgmock"], |
| 112 | } |
Vishnu Nair | e97d612 | 2018-01-18 13:58:56 -0800 | [diff] [blame^] | 113 | |
| 114 | cc_test { |
| 115 | name: "dumpstate_smoke_test", |
| 116 | defaults: ["dumpstate_defaults"], |
| 117 | srcs: [ |
| 118 | "dumpstate.cpp", |
| 119 | "tests/dumpstate_smoke_test.cpp", |
| 120 | ], |
| 121 | static_libs: ["libgmock"], |
| 122 | } |