blob: 5acc09d160f5db1622afc8182ceddd0374867a33 [file] [log] [blame]
Jiyong Park522ae9a2017-06-23 21:23:16 +09001//
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
16cc_defaults {
Vishnu Naire97d6122018-01-18 13:58:56 -080017 name: "dumpstate_cflag_defaults",
Jiyong Park522ae9a2017-06-23 21:23:16 +090018 cflags: [
19 "-Wall",
20 "-Werror",
21 "-Wno-missing-field-initializers",
22 "-Wno-unused-variable",
23 "-Wunused-parameter",
24 ],
25}
26
Jiyong Park522ae9a2017-06-23 21:23:16 +090027cc_library_shared {
28 name: "libdumpstateutil",
Vishnu Naire97d6122018-01-18 13:58:56 -080029 defaults: ["dumpstate_cflag_defaults"],
Jiyong Park522ae9a2017-06-23 21:23:16 +090030 vendor_available: true,
Justin Yun7fdc6602017-08-02 17:02:05 +090031 vndk: {
32 enabled: true,
33 },
Jiyong Park522ae9a2017-06-23 21:23:16 +090034 srcs: [
35 "DumpstateInternal.cpp",
36 "DumpstateUtil.cpp",
37 ],
38 shared_libs: [
39 "libbase",
40 "liblog",
41 ],
Jiyong Park259775c2017-11-03 14:40:24 +090042 export_include_dirs: ["."],
43 export_shared_lib_headers: [
44 "libbase",
45 ],
Jiyong Park522ae9a2017-06-23 21:23:16 +090046}
47
48cc_library_shared {
49 name: "libdumpstateaidl",
Vishnu Naire97d6122018-01-18 13:58:56 -080050 defaults: ["dumpstate_cflag_defaults"],
Jiyong Park522ae9a2017-06-23 21:23:16 +090051 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 Naire97d6122018-01-18 13:58:56 -080066cc_defaults {
67 name: "dumpstate_defaults",
68 defaults: ["dumpstate_cflag_defaults"],
Jiyong Park522ae9a2017-06-23 21:23:16 +090069 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",
Kweku Adams5ce418d2018-02-05 16:43:53 -080079 "libdumputils",
Jiyong Park522ae9a2017-06-23 21:23:16 +090080 "libhidlbase",
81 "libhidltransport",
82 "liblog",
83 "libutils",
84 ],
85 srcs: [
Vishnu Nair20cf5032018-01-05 13:15:49 -080086 "DumpstateSectionReporter.cpp",
Jiyong Park522ae9a2017-06-23 21:23:16 +090087 "DumpstateService.cpp",
88 "utils.cpp",
Vishnu Naire97d6122018-01-18 13:58:56 -080089 ],
90 static_libs: [
91 "libdumpsys",
92 "libserviceutils"
93 ],
94}
95
96cc_binary {
97 name: "dumpstate",
98 defaults: ["dumpstate_defaults"],
99 srcs: [
Jiyong Park522ae9a2017-06-23 21:23:16 +0900100 "dumpstate.cpp",
Vishnu Naire97d6122018-01-18 13:58:56 -0800101 "main.cpp",
Jiyong Park522ae9a2017-06-23 21:23:16 +0900102 ],
Elliott Hughesc1e09172018-06-27 15:04:28 -0700103 required: [
104 "atrace",
105 "df",
106 "getprop",
107 "ip",
108 "iptables",
109 "ip6tables",
110 "kill",
111 "librank",
112 "logcat",
113 "logcompressor",
114 "lsmod",
115 "lsof",
116 "netstat",
117 "parse_radio_log",
118 "printenv",
119 "procrank",
120 "screencap",
121 "showmap",
122 "ss",
123 "storaged",
124 "top",
125 "uptime",
126 "vdc",
127 "vril-dump",
128 ],
Jiyong Park522ae9a2017-06-23 21:23:16 +0900129 init_rc: ["dumpstate.rc"],
130}
131
132cc_test {
133 name: "dumpstate_test",
134 defaults: ["dumpstate_defaults"],
Jiyong Park522ae9a2017-06-23 21:23:16 +0900135 srcs: [
Nandana Dutt3f8c7172018-09-25 12:01:54 +0100136 "dumpstate.cpp",
Jiyong Park522ae9a2017-06-23 21:23:16 +0900137 "tests/dumpstate_test.cpp",
138 ],
139 static_libs: ["libgmock"],
140}
Vishnu Naire97d6122018-01-18 13:58:56 -0800141
142cc_test {
143 name: "dumpstate_smoke_test",
144 defaults: ["dumpstate_defaults"],
145 srcs: [
146 "dumpstate.cpp",
147 "tests/dumpstate_smoke_test.cpp",
148 ],
149 static_libs: ["libgmock"],
Kweku Adams5ce418d2018-02-05 16:43:53 -0800150}