blob: e9027127557f0ad97a74319d81f04e41b26a0278 [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
Jin Qianb049d182017-10-12 17:02:17 -070045 aidl: {
46 export_aidl_headers: true,
47 local_include_dirs: ["binder"],
48 include_dirs: ["frameworks/native/aidl/binder"],
49 },
50
Jin Qiane4f1ec32017-08-15 16:26:53 -070051 srcs: [
52 "storaged.cpp",
Jin Qian65dea712017-08-29 16:48:20 -070053 "storaged_diskstats.cpp",
Jin Qiane4f1ec32017-08-15 16:26:53 -070054 "storaged_info.cpp",
55 "storaged_service.cpp",
56 "storaged_utils.cpp",
57 "storaged_uid_monitor.cpp",
Jin Qianb049d182017-10-12 17:02:17 -070058 "uid_info.cpp",
Jin Qianebf031b2017-08-14 16:41:24 -070059 "storaged.proto",
Jin Qianb049d182017-10-12 17:02:17 -070060 "binder/android/os/IStoraged.aidl",
61 "binder/android/os/storaged/IStoragedPrivate.aidl",
Jin Qiane4f1ec32017-08-15 16:26:53 -070062 ],
63
64 logtags: ["EventLogTags.logtags"],
65
Jin Qianebf031b2017-08-14 16:41:24 -070066 proto: {
67 type: "lite",
68 export_proto_headers: true,
69 },
70
Jin Qiane4f1ec32017-08-15 16:26:53 -070071 export_include_dirs: ["include"],
72}
73
74cc_binary {
75 name: "storaged",
76
77 defaults: ["storaged_defaults"],
78
79 init_rc: ["storaged.rc"],
80
81 srcs: ["main.cpp"],
82
83 static_libs: ["libstoraged"],
84}
85
86/*
87 * Run with:
88 * adb shell /data/nativetest/storaged-unit-tests/storaged-unit-tests
89 */
90cc_test {
91 name: "storaged-unit-tests",
92
93 defaults: ["storaged_defaults"],
94
95 srcs: ["tests/storaged_test.cpp"],
96
97 static_libs: ["libstoraged"],
98}