blob: 25b433c7ef2c5933a45349ffe656b2a1aae559a0 [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",
47 "storaged_info.cpp",
48 "storaged_service.cpp",
49 "storaged_utils.cpp",
50 "storaged_uid_monitor.cpp",
Jin Qianebf031b2017-08-14 16:41:24 -070051 "storaged.proto",
Jin Qiane4f1ec32017-08-15 16:26:53 -070052 ],
53
54 logtags: ["EventLogTags.logtags"],
55
Jin Qianebf031b2017-08-14 16:41:24 -070056 proto: {
57 type: "lite",
58 export_proto_headers: true,
59 },
60
Jin Qiane4f1ec32017-08-15 16:26:53 -070061 export_include_dirs: ["include"],
62}
63
64cc_binary {
65 name: "storaged",
66
67 defaults: ["storaged_defaults"],
68
69 init_rc: ["storaged.rc"],
70
71 srcs: ["main.cpp"],
72
73 static_libs: ["libstoraged"],
74}
75
76/*
77 * Run with:
78 * adb shell /data/nativetest/storaged-unit-tests/storaged-unit-tests
79 */
80cc_test {
81 name: "storaged-unit-tests",
82
83 defaults: ["storaged_defaults"],
84
85 srcs: ["tests/storaged_test.cpp"],
86
87 static_libs: ["libstoraged"],
88}