blob: 6aef8c804f19ac81694cbb049b1a2edc7e218564 [file] [log] [blame]
Jin Qiane4f1ec32017-08-15 16:26:53 -07001/*
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
17cc_defaults {
18 name: "storaged_defaults",
19
20 shared_libs: [
21 "libbase",
22 "libbatteryservice",
23 "libbinder",
24 "libcutils",
25 "liblog",
Jin Qianebf031b2017-08-14 16:41:24 -070026 "libprotobuf-cpp-lite",
Jin Qiane4f1ec32017-08-15 16:26:53 -070027 "libsysutils",
28 "libutils",
Jin Qianebf031b2017-08-14 16:41:24 -070029 "libz",
Jin Qiane4f1ec32017-08-15 16:26:53 -070030 ],
31
32 cflags: [
33 "-Wall",
34 "-Werror",
35 "-Wextra",
36 "-Wno-unused-parameter"
37 ],
38}
39
40cc_library_static {
41 name: "libstoraged",
42
43 defaults: ["storaged_defaults"],
44
45 srcs: [
46 "storaged.cpp",
Jin Qian65dea712017-08-29 16:48:20 -070047 "storaged_diskstats.cpp",
Jin Qiane4f1ec32017-08-15 16:26:53 -070048 "storaged_info.cpp",
49 "storaged_service.cpp",
50 "storaged_utils.cpp",
51 "storaged_uid_monitor.cpp",
Jin Qianebf031b2017-08-14 16:41:24 -070052 "storaged.proto",
Jin Qiane4f1ec32017-08-15 16:26:53 -070053 ],
54
55 logtags: ["EventLogTags.logtags"],
56
Jin Qianebf031b2017-08-14 16:41:24 -070057 proto: {
58 type: "lite",
59 export_proto_headers: true,
60 },
61
Jin Qiane4f1ec32017-08-15 16:26:53 -070062 export_include_dirs: ["include"],
63}
64
65cc_binary {
66 name: "storaged",
67
68 defaults: ["storaged_defaults"],
69
70 init_rc: ["storaged.rc"],
71
72 srcs: ["main.cpp"],
73
74 static_libs: ["libstoraged"],
75}
76
77/*
78 * Run with:
79 * adb shell /data/nativetest/storaged-unit-tests/storaged-unit-tests
80 */
81cc_test {
82 name: "storaged-unit-tests",
83
84 defaults: ["storaged_defaults"],
85
86 srcs: ["tests/storaged_test.cpp"],
87
88 static_libs: ["libstoraged"],
89}