| // Copyright (C) 2017 The Android Open Source Project |
| // |
| // Licensed under the Apache License, Version 2.0 (the "License"); |
| // you may not use this file except in compliance with the License. |
| // You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| |
| package { |
| default_applicable_licenses: ["system_libvintf_license"], |
| } |
| |
| // Added automatically by a large-scale-change |
| // http://go/android-license-faq |
| license { |
| name: "system_libvintf_license", |
| visibility: [":__subpackages__"], |
| license_kinds: [ |
| "SPDX-license-identifier-Apache-2.0", |
| ], |
| license_text: [ |
| "NOTICE", |
| ], |
| } |
| |
| cc_defaults { |
| name: "libvintf-defaults", |
| cflags: [ |
| "-Wall", |
| "-Werror", |
| "-Wextra-semi", |
| "-Wshadow", |
| ], |
| |
| target: { |
| android: { |
| cflags: ["-DLIBVINTF_TARGET"], |
| }, |
| }, |
| } |
| |
| libvintf_private_deps = [ |
| "libbase", |
| "liblog", |
| "libselinux", |
| "libtinyxml2", |
| "libz", |
| ] |
| |
| cc_defaults { |
| name: "libvintf_static_user_defaults", |
| static_libs: libvintf_private_deps, |
| } |
| |
| cc_library { |
| name: "libvintf", |
| defaults: ["libvintf-defaults"], |
| host_supported: true, |
| recovery_available: true, |
| srcs: [ |
| "parse_string.cpp", |
| "parse_xml.cpp", |
| "Apex.cpp", |
| "CompatibilityMatrix.cpp", |
| "FileSystem.cpp", |
| "FQName.cpp", |
| "FqInstance.cpp", |
| "HalManifest.cpp", |
| "HalInterface.cpp", |
| "KernelConfigTypedValue.cpp", |
| "KernelInfo.cpp", |
| "RuntimeInfo.cpp", |
| "ManifestHal.cpp", |
| "ManifestInstance.cpp", |
| "MatrixHal.cpp", |
| "MatrixInstance.cpp", |
| "MatrixKernel.cpp", |
| "PropertyFetcher.cpp", |
| "Regex.cpp", |
| "SystemSdk.cpp", |
| "TransportArch.cpp", |
| "VintfObject.cpp", |
| "XmlFile.cpp", |
| "utils.cpp", |
| ], |
| product_variables: { |
| release_aidl_use_unfrozen: { |
| cflags: ["-DAIDL_USE_UNFROZEN"], |
| }, |
| }, |
| generated_sources: ["apex-info-list-tinyxml"], |
| shared_libs: libvintf_private_deps, |
| header_libs: [ |
| "libaidlmetadata_headers", |
| "libhidlmetadata_headers", |
| ], |
| whole_static_libs: [ |
| "libkver", |
| "libkernelconfigs", |
| ], |
| export_include_dirs: [ |
| "include", |
| ".", |
| ], |
| local_include_dirs: ["include/vintf"], |
| |
| export_shared_lib_headers: [ |
| "libbase", |
| ], |
| export_header_lib_headers: [ |
| "libaidlmetadata_headers", |
| "libhidlmetadata_headers", |
| ], |
| target: { |
| host: { |
| srcs: [ |
| "RuntimeInfo-host.cpp", |
| "VintfObjectRecovery.cpp", |
| ], |
| }, |
| android: { |
| srcs: [ |
| "RuntimeInfo-target.cpp", |
| ], |
| }, |
| recovery: { |
| srcs: [ |
| "VintfObjectRecovery.cpp", |
| ], |
| }, |
| }, |
| } |
| |
| cc_library_headers { |
| name: "libvintf_local_headers", |
| host_supported: true, |
| export_include_dirs: ["."], |
| visibility: [ |
| "//system/libvintf:__subpackages__", |
| ], |
| } |
| |
| cc_binary { |
| name: "vintf", |
| defaults: ["libvintf-defaults"], |
| shared_libs: [ |
| "libbase", |
| "libvintf", |
| ], |
| srcs: [ |
| "main.cpp", |
| ], |
| } |
| |
| cc_binary_host { |
| name: "checkvintf", |
| defaults: ["libvintf-defaults"], |
| static_libs: [ |
| "libaidlmetadata", |
| "libbase", |
| "libhidlmetadata", |
| "liblog", |
| "libvintf", |
| "libvintf_fcm_exclude", |
| "libutils", |
| "libtinyxml2", |
| ], |
| stl: "libc++_static", |
| srcs: [ |
| "check_vintf.cpp", |
| "HostFileSystem.cpp", |
| ], |
| local_include_dirs: ["include-host"], |
| } |
| |
| cc_library_static { |
| name: "libassemblevintf", |
| host_supported: true, |
| defaults: ["libvintf-defaults"], |
| shared_libs: [ |
| "libvintf", |
| "libbase", |
| ], |
| static_libs: [ |
| "libaidlmetadata", |
| "libvts_vintf_test_common", |
| ], |
| product_variables: { |
| release_aidl_use_unfrozen: { |
| cflags: ["-DAIDL_USE_UNFROZEN"], |
| }, |
| }, |
| srcs: [ |
| "AssembleVintf.cpp", |
| ], |
| export_include_dirs: ["include-test"], |
| } |
| |
| cc_binary_host { |
| name: "assemble_vintf", |
| defaults: ["libvintf-defaults"], |
| shared_libs: [ |
| "libvintf", |
| "libbase", |
| ], |
| static_libs: [ |
| "libaidlmetadata", |
| "libassemblevintf", |
| "libvts_vintf_test_common", |
| ], |
| srcs: [ |
| "assemble_vintf_main.cpp", |
| ], |
| } |
| |
| cc_defaults { |
| name: "libvintffm-defaults", |
| defaults: ["libvintf-defaults"], |
| host_supported: true, |
| export_include_dirs: [ |
| "include-host", |
| "include-test", |
| ], |
| target: { |
| android: { |
| enabled: false, |
| }, |
| }, |
| static_libs: [ |
| "libbase", |
| "liblog", |
| "libtinyxml2", |
| "libutils", |
| "libvintf", |
| ], |
| } |
| |
| cc_library_static { |
| name: "libvintffm", |
| defaults: ["libvintffm-defaults"], |
| srcs: [ |
| "HostFileSystem.cpp", |
| "VintfFm.cpp", |
| ], |
| } |
| |
| cc_binary_host { |
| name: "vintffm", |
| defaults: ["libvintffm-defaults"], |
| static_libs: [ |
| "libvintffm", |
| ], |
| srcs: [ |
| "VintfFmMain.cpp", |
| ], |
| } |
| |
| cc_library_static { |
| name: "libkernelconfigs", |
| defaults: ["libvintf-defaults"], |
| host_supported: true, |
| recovery_available: true, |
| srcs: [ |
| "KernelConfigs.cpp", |
| "KernelConfigParser.cpp", |
| ], |
| header_libs: [ |
| "libutils_headers", |
| ], |
| shared_libs: [ |
| "libbase", |
| "libz", |
| ], |
| export_include_dirs: [ |
| "include", |
| ], |
| local_include_dirs: [ |
| "include/vintf", |
| ], |
| } |