Jin Qian | e4f1ec3 | 2017-08-15 16:26:53 -0700 | [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 | |
| 17 | cc_defaults { |
| 18 | name: "storaged_defaults", |
| 19 | |
| 20 | shared_libs: [ |
| 21 | "libbase", |
| 22 | "libbatteryservice", |
| 23 | "libbinder", |
| 24 | "libcutils", |
| 25 | "liblog", |
Jin Qian | ebf031b | 2017-08-14 16:41:24 -0700 | [diff] [blame^] | 26 | "libprotobuf-cpp-lite", |
Jin Qian | e4f1ec3 | 2017-08-15 16:26:53 -0700 | [diff] [blame] | 27 | "libsysutils", |
| 28 | "libutils", |
Jin Qian | ebf031b | 2017-08-14 16:41:24 -0700 | [diff] [blame^] | 29 | "libz", |
Jin Qian | e4f1ec3 | 2017-08-15 16:26:53 -0700 | [diff] [blame] | 30 | ], |
| 31 | |
| 32 | cflags: [ |
| 33 | "-Wall", |
| 34 | "-Werror", |
| 35 | "-Wextra", |
| 36 | "-Wno-unused-parameter" |
| 37 | ], |
| 38 | } |
| 39 | |
| 40 | cc_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 Qian | ebf031b | 2017-08-14 16:41:24 -0700 | [diff] [blame^] | 51 | "storaged.proto", |
Jin Qian | e4f1ec3 | 2017-08-15 16:26:53 -0700 | [diff] [blame] | 52 | ], |
| 53 | |
| 54 | logtags: ["EventLogTags.logtags"], |
| 55 | |
Jin Qian | ebf031b | 2017-08-14 16:41:24 -0700 | [diff] [blame^] | 56 | proto: { |
| 57 | type: "lite", |
| 58 | export_proto_headers: true, |
| 59 | }, |
| 60 | |
Jin Qian | e4f1ec3 | 2017-08-15 16:26:53 -0700 | [diff] [blame] | 61 | export_include_dirs: ["include"], |
| 62 | } |
| 63 | |
| 64 | cc_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 | */ |
| 80 | cc_test { |
| 81 | name: "storaged-unit-tests", |
| 82 | |
| 83 | defaults: ["storaged_defaults"], |
| 84 | |
| 85 | srcs: ["tests/storaged_test.cpp"], |
| 86 | |
| 87 | static_libs: ["libstoraged"], |
| 88 | } |