1// 2// Copyright (C) 2021 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 16package { 17 default_applicable_licenses: ["Android-Apache-2.0"], 18} 19 20cc_defaults { 21 name: "android.hardware.vibrator-defaults.cs40l26", 22 cflags: [ 23 "-DATRACE_TAG=(ATRACE_TAG_VIBRATOR | ATRACE_TAG_HAL)", 24 "-DLOG_TAG=\"Vibrator\"", 25 ], 26} 27 28cc_defaults { 29 name: "VibratorHalCs40l26BinaryDefaults", 30 defaults: [ 31 "PixelVibratorBinaryDefaults", 32 "android.hardware.vibrator-defaults.cs40l26", 33 ], 34 include_dirs: [ 35 "external/tinyalsa/include", 36 ], 37 shared_libs: [ 38 "libcutils", 39 "libtinyalsa", 40 "libbase", 41 "libutils", 42 ], 43} 44 45cc_defaults { 46 name: "VibratorHalCs40l26TestDefaults", 47 defaults: [ 48 "PixelVibratorTestDefaults", 49 "VibratorCapoDefaults", 50 "android.hardware.vibrator-defaults.cs40l26", 51 ], 52 static_libs: [ 53 "libtinyalsa", 54 "android.hardware.vibrator-impl.cs40l26", 55 ], 56} 57 58cc_library { 59 name: "android.hardware.vibrator-impl.cs40l26", 60 defaults: [ 61 "VibratorHalCs40l26BinaryDefaults", 62 "VibratorCapoDefaults", 63 "haptics_feature_defaults", 64 ], 65 srcs: [ 66 "Vibrator.cpp", 67 "DspMemChunk.cpp", 68 ], 69 shared_libs: [ 70 "PixelVibratorFlagsL26", 71 ], 72 export_include_dirs: [ 73 ".", 74 ], 75 vendor_available: true, 76 visibility: [":__subpackages__"], 77} 78 79cc_binary { 80 name: "android.hardware.vibrator-service.cs40l26", 81 defaults: [ 82 "VibratorHalCs40l26BinaryDefaults", 83 "VibratorCapoDefaults", 84 ], 85 init_rc: ["android.hardware.vibrator-service.cs40l26.rc"], 86 vintf_fragments: ["android.hardware.vibrator-service.cs40l26.xml"], 87 srcs: ["service.cpp"], 88 shared_libs: [ 89 "android.hardware.vibrator-impl.cs40l26", 90 "PixelVibratorStats", 91 ], 92 proprietary: true, 93} 94 95cc_binary { 96 name: "android.hardware.vibrator-service.cs40l26-dual", 97 defaults: [ 98 "VibratorHalCs40l26BinaryDefaults", 99 "VibratorCapoDefaults", 100 ], 101 init_rc: ["android.hardware.vibrator-service.cs40l26-dual.rc"], 102 vintf_fragments: ["android.hardware.vibrator-service.cs40l26-dual.xml"], 103 srcs: ["service.cpp"], 104 shared_libs: [ 105 "android.hardware.vibrator-impl.cs40l26", 106 "PixelVibratorStats", 107 ], 108 cflags: ["-DVIBRATOR_NAME=\"dual\""], 109 proprietary: true, 110} 111 112aconfig_declarations { 113 name: "VibratorFlagsL26", 114 package: "vendor.vibrator.hal.flags", 115 container: "vendor", 116 exportable: true, 117 srcs: ["VibratorFlags.aconfig"], 118} 119 120cc_aconfig_library { 121 name: "PixelVibratorFlagsL26", 122 aconfig_declarations: "VibratorFlagsL26", 123 vendor_available: true, 124} 125 126java_aconfig_library { 127 name: "PixelVibratorFlagsL26_java", 128 aconfig_declarations: "VibratorFlagsL26", 129 mode: "exported", 130 visibility: ["//vendor:__subpackages__"], 131} 132 133filegroup { 134 name: "haptics_srcs", 135 srcs: [ 136 "service.cpp", 137 "Vibrator.cpp", 138 ], 139} 140 141filegroup { 142 name: "android.hardware.vibrator-service.cs40l26.xml", 143 srcs: ["android.hardware.vibrator-service.cs40l26.xml"], 144} 145 146filegroup { 147 name: "android.hardware.vibrator-service.cs40l26.rc", 148 srcs: ["android.hardware.vibrator-service.cs40l26.rc"], 149} 150