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 15package { 16 default_applicable_licenses: ["system_libvintf_license"], 17} 18 19// Added automatically by a large-scale-change 20// http://go/android-license-faq 21license { 22 name: "system_libvintf_license", 23 visibility: [":__subpackages__"], 24 license_kinds: [ 25 "SPDX-license-identifier-Apache-2.0", 26 ], 27 license_text: [ 28 "NOTICE", 29 ], 30} 31 32cc_defaults { 33 name: "libvintf-defaults", 34 cflags: [ 35 "-Wall", 36 "-Werror", 37 "-Wextra-semi", 38 "-Wshadow", 39 ], 40 41 target: { 42 android: { 43 cflags: ["-DLIBVINTF_TARGET"], 44 }, 45 }, 46} 47 48libvintf_private_deps = [ 49 "libbase", 50 "liblog", 51 "libselinux", 52 "libtinyxml2", 53 "libz", 54] 55 56cc_defaults { 57 name: "libvintf_static_user_defaults", 58 static_libs: libvintf_private_deps, 59} 60 61cc_library { 62 name: "libvintf", 63 defaults: ["libvintf-defaults"], 64 host_supported: true, 65 recovery_available: true, 66 srcs: [ 67 "parse_string.cpp", 68 "parse_xml.cpp", 69 "Apex.cpp", 70 "CompatibilityMatrix.cpp", 71 "FileSystem.cpp", 72 "FQName.cpp", 73 "FqInstance.cpp", 74 "HalManifest.cpp", 75 "HalInterface.cpp", 76 "KernelConfigTypedValue.cpp", 77 "KernelInfo.cpp", 78 "RuntimeInfo.cpp", 79 "ManifestHal.cpp", 80 "ManifestInstance.cpp", 81 "MatrixHal.cpp", 82 "MatrixInstance.cpp", 83 "MatrixKernel.cpp", 84 "PropertyFetcher.cpp", 85 "Regex.cpp", 86 "SystemSdk.cpp", 87 "TransportArch.cpp", 88 "VintfObject.cpp", 89 "XmlFile.cpp", 90 "utils.cpp", 91 ], 92 product_variables: { 93 release_aidl_use_unfrozen: { 94 cflags: ["-DAIDL_USE_UNFROZEN"], 95 }, 96 }, 97 generated_sources: ["apex-info-list-tinyxml"], 98 shared_libs: libvintf_private_deps, 99 header_libs: [ 100 "libaidlmetadata_headers", 101 "libhidlmetadata_headers", 102 ], 103 whole_static_libs: [ 104 "libkver", 105 "libkernelconfigs", 106 ], 107 export_include_dirs: [ 108 "include", 109 ".", 110 ], 111 local_include_dirs: ["include/vintf"], 112 113 export_shared_lib_headers: [ 114 "libbase", 115 ], 116 export_header_lib_headers: [ 117 "libaidlmetadata_headers", 118 "libhidlmetadata_headers", 119 ], 120 target: { 121 host: { 122 srcs: [ 123 "RuntimeInfo-host.cpp", 124 "VintfObjectRecovery.cpp", 125 ], 126 }, 127 android: { 128 srcs: [ 129 "RuntimeInfo-target.cpp", 130 ], 131 }, 132 recovery: { 133 srcs: [ 134 "VintfObjectRecovery.cpp", 135 ], 136 }, 137 }, 138} 139 140cc_library_headers { 141 name: "libvintf_local_headers", 142 host_supported: true, 143 export_include_dirs: ["."], 144 visibility: [ 145 "//system/libvintf:__subpackages__", 146 ], 147} 148 149cc_binary { 150 name: "vintf", 151 defaults: ["libvintf-defaults"], 152 shared_libs: [ 153 "libbase", 154 "libjsoncpp", 155 "libvintf", 156 ], 157 srcs: [ 158 "main.cpp", 159 ], 160} 161 162cc_binary_host { 163 name: "checkvintf", 164 defaults: ["libvintf-defaults"], 165 static_libs: [ 166 "libaidlmetadata", 167 "libbase", 168 "libhidlmetadata", 169 "liblog", 170 "libvintf", 171 "libvintf_fcm_exclude", 172 "libutils", 173 "libtinyxml2", 174 ], 175 stl: "libc++_static", 176 srcs: [ 177 "check_vintf.cpp", 178 "HostFileSystem.cpp", 179 ], 180 local_include_dirs: ["include-host"], 181} 182 183cc_library_static { 184 name: "libassemblevintf", 185 host_supported: true, 186 defaults: ["libvintf-defaults"], 187 shared_libs: [ 188 "libvintf", 189 "libbase", 190 ], 191 static_libs: [ 192 "libaidlmetadata", 193 "libvts_vintf_test_common", 194 ], 195 product_variables: { 196 release_aidl_use_unfrozen: { 197 cflags: ["-DAIDL_USE_UNFROZEN"], 198 }, 199 }, 200 srcs: [ 201 "AssembleVintf.cpp", 202 ], 203 export_include_dirs: ["include-test"], 204} 205 206cc_binary_host { 207 name: "assemble_vintf", 208 defaults: ["libvintf-defaults"], 209 shared_libs: [ 210 "libvintf", 211 "libbase", 212 ], 213 static_libs: [ 214 "libaidlmetadata", 215 "libassemblevintf", 216 "libvts_vintf_test_common", 217 ], 218 srcs: [ 219 "assemble_vintf_main.cpp", 220 ], 221} 222 223cc_defaults { 224 name: "libvintffm-defaults", 225 defaults: ["libvintf-defaults"], 226 host_supported: true, 227 export_include_dirs: [ 228 "include-host", 229 "include-test", 230 ], 231 target: { 232 android: { 233 enabled: false, 234 }, 235 }, 236 static_libs: [ 237 "libbase", 238 "liblog", 239 "libtinyxml2", 240 "libutils", 241 "libvintf", 242 ], 243} 244 245cc_library_static { 246 name: "libvintffm", 247 defaults: ["libvintffm-defaults"], 248 srcs: [ 249 "HostFileSystem.cpp", 250 "VintfFm.cpp", 251 ], 252} 253 254cc_binary_host { 255 name: "vintffm", 256 defaults: ["libvintffm-defaults"], 257 static_libs: [ 258 "libvintffm", 259 ], 260 srcs: [ 261 "VintfFmMain.cpp", 262 ], 263} 264 265cc_library_static { 266 name: "libkernelconfigs", 267 defaults: ["libvintf-defaults"], 268 host_supported: true, 269 recovery_available: true, 270 srcs: [ 271 "KernelConfigs.cpp", 272 "KernelConfigParser.cpp", 273 ], 274 header_libs: [ 275 "libutils_headers", 276 ], 277 shared_libs: [ 278 "libbase", 279 "libz", 280 ], 281 export_include_dirs: [ 282 "include", 283 ], 284 local_include_dirs: [ 285 "include/vintf", 286 ], 287} 288