1// Copyright (C) 2018 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    // See: http://go/android-license-faq
17    // A large-scale-change added 'default_applicable_licenses' to import
18    // all of the 'license_kinds' from "frameworks_native_license"
19    // to get the below license kinds:
20    //   SPDX-license-identifier-Apache-2.0
21    default_applicable_licenses: ["frameworks_native_license"],
22}
23
24cc_defaults {
25    name: "libvibrator_defaults",
26
27    cflags: [
28        "-Wall",
29        "-Werror",
30        "-Wno-missing-field-initializers",
31        "-Wno-unused-variable",
32        "-Wno-unused-parameter",
33    ],
34
35    export_include_dirs: ["include"],
36
37    host_supported: true,
38    target: {
39        darwin: {
40            enabled: false,
41        },
42    },
43}
44
45cc_library {
46    name: "libvibrator",
47    defaults: ["libvibrator_defaults"],
48
49    shared_libs: [
50        "libbinder",
51        "liblog",
52        "libutils",
53    ],
54
55    whole_static_libs: [
56        "libvibratorutils",
57    ],
58
59    header_libs: [
60        "libaudio_system_headers",
61    ],
62
63    aidl: {
64        include_dirs: ["frameworks/base/core/java"],
65        local_include_dirs: ["include/"],
66        export_aidl_headers: true,
67    },
68
69    srcs: [
70        ":libvibrator_aidl",
71        "ExternalVibration.cpp",
72    ],
73}
74
75cc_library {
76    name: "libvibratorutils",
77    defaults: ["libvibrator_defaults"],
78
79    vendor_available: true,
80    double_loadable: true,
81
82    shared_libs: [
83        "libutils",
84    ],
85
86    srcs: [
87        "ExternalVibrationUtils.cpp",
88    ],
89
90    visibility: [
91        "//frameworks/native/libs/vibrator",
92        "//frameworks/av/media/libeffects/hapticgenerator",
93    ],
94}
95