• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//
2// Copyright (C) 2016 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
17package {
18    // See: http://go/android-license-faq
19    default_applicable_licenses: ["Android-Apache-2.0"],
20}
21
22cc_library_shared {
23    // libvts_interfacespecification does not include or link any HIDL HAL driver.
24    // HIDL HAL drivers and profilers are defined as separated shared libraries
25    // in a respective hardware/interfaces/<hal name>/<version>/Android.bp file.
26    // libvts_interfacespecification is the driver for:
27    //   legacy HALs,
28    //   conventional HALs,
29    //   shared libraries,
30    //   and so on.
31    name: "libvts_interfacespecification",
32    generated_sources: ["libvts_interfacespecification_vts.driver_genc++"],
33    generated_headers: ["libvts_interfacespecification_vts.driver_genc++_headers"],
34    export_generated_headers: ["libvts_interfacespecification_vts.driver_genc++_headers"],
35    shared_libs: [
36        "libbase",
37        "libcutils",
38        "liblog",
39        "libdl",
40        "libandroid_runtime",
41        "libcamera_metadata",
42        "libvts_datatype",
43        "libvts_common",
44        "libvts_measurement",
45        "libvts_multidevice_proto",
46        "libprotobuf-cpp-full",
47    ],
48    static_libs: [
49        "libbluetooth-types",
50    ],
51    cflags: [
52        "-Wall",
53        "-Werror",
54        // These warnings are in code generated with vtsc
55        // b/31362043
56        "-Wno-unused-parameter",
57        "-Wno-unused-value",
58        "-Wno-duplicate-decl-specifier",
59    ],
60    proto: {
61        type: "full",
62    },
63    compile_multilib: "both",
64}
65
66cc_genrule {
67    name: "libvts_interfacespecification_vts.driver_genc++",
68    srcs: [
69        "lib/**/*",
70    ],
71    tools: [
72        "vtsc",
73    ],
74    out: [
75        "vts/libcutilsV1.vts.cpp",
76        "vts/libcV1.vts.cpp",
77        "vts/libmV1.vts.cpp",
78    ],
79    cmd: "mkdir -p $(genDir)/vts && " +
80        "cp $(in) $(genDir)/vts/ && " +
81        "$(location vtsc) -mDRIVER -tSOURCE -b$(genDir) vts/ $(genDir)/vts/",
82}
83
84cc_genrule {
85    name: "libvts_interfacespecification_vts.driver_genc++_headers",
86    srcs: [
87        "lib/**/*",
88    ],
89    tools: [
90        "vtsc",
91    ],
92    out: [
93        "vts/libcutilsV1.vts.h",
94        "vts/libcV1.vts.h",
95        "vts/libmV1.vts.h",
96    ],
97    cmd: "mkdir -p $(genDir)/vts && " +
98        "cp $(in) $(genDir)/vts/ && " +
99        "$(location vtsc) -mDRIVER -tHEADER -b$(genDir) vts/ $(genDir)/vts/",
100}
101