Android.bp 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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. cc_defaults {
  17. name: "storaged_defaults",
  18. shared_libs: [
  19. "[email protected]",
  20. "[email protected]",
  21. "libbase",
  22. "libbinder",
  23. "libcutils",
  24. "libhidlbase",
  25. "libhidltransport",
  26. "libhwbinder",
  27. "liblog",
  28. "libprotobuf-cpp-lite",
  29. "libsysutils",
  30. "libutils",
  31. "libz",
  32. ],
  33. cflags: [
  34. "-Wall",
  35. "-Werror",
  36. "-Wextra",
  37. "-Wno-unused-parameter"
  38. ],
  39. }
  40. cc_library_static {
  41. name: "libstoraged",
  42. defaults: ["storaged_defaults"],
  43. aidl: {
  44. export_aidl_headers: true,
  45. local_include_dirs: ["binder"],
  46. include_dirs: ["frameworks/native/aidl/binder"],
  47. },
  48. srcs: [
  49. "storaged.cpp",
  50. "storaged_diskstats.cpp",
  51. "storaged_info.cpp",
  52. "storaged_service.cpp",
  53. "storaged_utils.cpp",
  54. "storaged_uid_monitor.cpp",
  55. "uid_info.cpp",
  56. "storaged.proto",
  57. ":storaged_aidl",
  58. ":storaged_aidl_private",
  59. ],
  60. static_libs: ["libhealthhalutils"],
  61. header_libs: ["libbatteryservice_headers"],
  62. logtags: ["EventLogTags.logtags"],
  63. proto: {
  64. type: "lite",
  65. export_proto_headers: true,
  66. },
  67. export_include_dirs: ["include"],
  68. }
  69. cc_binary {
  70. name: "storaged",
  71. defaults: ["storaged_defaults"],
  72. init_rc: ["storaged.rc"],
  73. srcs: ["main.cpp"],
  74. static_libs: [
  75. "libhealthhalutils",
  76. "libstoraged",
  77. ],
  78. }
  79. /*
  80. * Run with:
  81. * adb shell /data/nativetest/storaged-unit-tests/storaged-unit-tests
  82. */
  83. cc_test {
  84. name: "storaged-unit-tests",
  85. defaults: ["storaged_defaults"],
  86. srcs: ["tests/storaged_test.cpp"],
  87. static_libs: [
  88. "libhealthhalutils",
  89. "libstoraged",
  90. ],
  91. }
  92. // AIDL interface between storaged and framework.jar
  93. filegroup {
  94. name: "storaged_aidl",
  95. srcs: [
  96. "binder/android/os/IStoraged.aidl",
  97. ],
  98. path: "binder",
  99. }
  100. filegroup {
  101. name: "storaged_aidl_private",
  102. srcs: [
  103. "binder/android/os/storaged/IStoragedPrivate.aidl",
  104. ],
  105. path: "binder",
  106. }