Android.bp 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. // Copyright (C) 2017 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. subdirs = [
  15. "test"
  16. ]
  17. cc_defaults {
  18. name: "libvintf-defaults",
  19. cflags: [
  20. "-Wall",
  21. "-Werror",
  22. "-Wextra-semi",
  23. ],
  24. target: {
  25. android: {
  26. cflags: ["-DLIBVINTF_TARGET"],
  27. },
  28. }
  29. }
  30. cc_library {
  31. name: "libvintf",
  32. defaults: ["libvintf-defaults"],
  33. host_supported: true,
  34. recovery_available: true,
  35. srcs: [
  36. "parse_string.cpp",
  37. "parse_xml.cpp",
  38. "CompatibilityMatrix.cpp",
  39. "FileSystem.cpp",
  40. "HalManifest.cpp",
  41. "HalInterface.cpp",
  42. "KernelConfigTypedValue.cpp",
  43. "KernelConfigParser.cpp",
  44. "KernelInfo.cpp",
  45. "RuntimeInfo.cpp",
  46. "ManifestHal.cpp",
  47. "ManifestInstance.cpp",
  48. "MatrixHal.cpp",
  49. "MatrixInstance.cpp",
  50. "MatrixKernel.cpp",
  51. "PropertyFetcher.cpp",
  52. "Regex.cpp",
  53. "SystemSdk.cpp",
  54. "TransportArch.cpp",
  55. "VintfObject.cpp",
  56. "XmlFile.cpp",
  57. ],
  58. shared_libs: [
  59. "libbase",
  60. "libhidl-gen-utils",
  61. "liblog",
  62. "libselinux",
  63. "libtinyxml2",
  64. "libz",
  65. ],
  66. export_include_dirs: ["include", "."],
  67. local_include_dirs: ["include/vintf"],
  68. export_shared_lib_headers: [
  69. "libhidl-gen-utils",
  70. ],
  71. target: {
  72. host: {
  73. srcs: [
  74. "RuntimeInfo-host.cpp",
  75. ],
  76. },
  77. android: {
  78. srcs: [
  79. "RuntimeInfo-target.cpp",
  80. ],
  81. },
  82. }
  83. }
  84. cc_binary {
  85. name: "vintf",
  86. defaults: ["libvintf-defaults"],
  87. shared_libs: [
  88. "libbase",
  89. "libhidl-gen-utils",
  90. "libvintf",
  91. ],
  92. srcs: [
  93. "main.cpp"
  94. ],
  95. }
  96. cc_binary_host {
  97. name: "checkvintf",
  98. defaults: ["libvintf-defaults"],
  99. static_libs: [
  100. "libbase",
  101. "libhidl-gen-utils",
  102. "libvintf",
  103. "libutils",
  104. "libtinyxml2",
  105. ],
  106. stl: "libc++_static",
  107. srcs: [
  108. "check_vintf.cpp",
  109. ],
  110. }
  111. cc_library_static {
  112. name: "libassemblevintf",
  113. host_supported: true,
  114. defaults: ["libvintf-defaults"],
  115. shared_libs: [
  116. "libvintf",
  117. "libbase",
  118. ],
  119. srcs: [
  120. "AssembleVintf.cpp",
  121. ],
  122. export_include_dirs: ["include-test"],
  123. }
  124. cc_binary_host {
  125. name: "assemble_vintf",
  126. defaults: ["libvintf-defaults"],
  127. shared_libs: [
  128. "libvintf",
  129. "libbase",
  130. ],
  131. static_libs: [
  132. "libassemblevintf",
  133. ],
  134. srcs: [
  135. "assemble_vintf_main.cpp"
  136. ],
  137. }
  138. cc_library_static {
  139. name: "libvintf_recovery",
  140. recovery_available: true,
  141. defaults: ["libvintf-defaults"],
  142. srcs: ["VintfObjectRecovery.cpp"],
  143. export_include_dirs: ["include"],
  144. local_include_dirs: ["include/vintf"],
  145. static_libs: [
  146. "libbase",
  147. "libvintf",
  148. "libhidl-gen-utils",
  149. "libfs_mgr",
  150. ],
  151. export_static_lib_headers: ["libhidl-gen-utils"],
  152. }