Android.bp 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. // Copyright (C) 2016 The Android Open Source Project
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. cc_defaults {
  15. name: "hwservicemanager_defaults",
  16. cflags: [
  17. "-Wall",
  18. "-Wextra",
  19. "-Werror",
  20. ],
  21. shared_libs: [
  22. "libhidlbase",
  23. "libhidltransport",
  24. "liblog",
  25. ],
  26. }
  27. cc_defaults {
  28. name: "libhwservicemanager_shared_libs",
  29. shared_libs: [
  30. "libbase",
  31. "libhidl-gen-utils",
  32. "libhwbinder",
  33. "libselinux",
  34. "libutils",
  35. "libvintf",
  36. ],
  37. }
  38. cc_library_static {
  39. name: "libhwservicemanager",
  40. defaults: [
  41. "hwservicemanager_defaults",
  42. "libhwservicemanager_shared_libs",
  43. ],
  44. srcs: [
  45. "AccessControl.cpp",
  46. "HidlService.cpp",
  47. "ServiceManager.cpp",
  48. "Vintf.cpp",
  49. ],
  50. }
  51. cc_defaults {
  52. name: "libtokenmanager_shared_libs",
  53. shared_libs: [
  54. "[email protected]",
  55. "libcrypto",
  56. ],
  57. }
  58. cc_library_static {
  59. name: "libtokenmanager",
  60. defaults: [
  61. "hwservicemanager_defaults",
  62. "libtokenmanager_shared_libs",
  63. ],
  64. srcs: [
  65. "TokenManager.cpp",
  66. ],
  67. }
  68. cc_binary {
  69. name: "hwservicemanager",
  70. defaults: [
  71. "hwservicemanager_defaults",
  72. "libhwservicemanager_shared_libs",
  73. "libtokenmanager_shared_libs",
  74. ],
  75. init_rc: [
  76. "hwservicemanager.rc",
  77. ],
  78. srcs: [
  79. "service.cpp",
  80. ],
  81. shared_libs: [
  82. "libcutils",
  83. ],
  84. static_libs: [
  85. "libhwservicemanager",
  86. "libtokenmanager",
  87. ],
  88. }
  89. cc_test {
  90. name: "hwservicemanager_test",
  91. defaults: [
  92. "hwservicemanager_defaults",
  93. "libhwservicemanager_shared_libs",
  94. ],
  95. static_libs: [
  96. "libgmock",
  97. "libhwservicemanager",
  98. ],
  99. srcs: [
  100. "test_lazy.cpp",
  101. ],
  102. test_suites: ["device-tests"],
  103. }