• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2020 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: ["Android-Apache-2.0"],
17}
18
19cc_defaults {
20    name: "audiocontrol_hal_default_trout",
21    defaults: [
22        "hidl_defaults",
23    ],
24    shared_libs: [
25        "android.hardware.automotive.audiocontrol@2.0",
26        "libbase",
27        "libhidlbase",
28        "liblog",
29        "libutils",
30    ],
31}
32
33genrule {
34    name: "AudioFocusControlProtoStub_h",
35    tools: [
36        "aprotoc",
37        "protoc-gen-grpc-cpp-plugin",
38    ],
39    cmd: "$(location aprotoc) -I$$(dirname $(in)) -Iexternal/protobuf/src --plugin=protoc-gen-grpc=$(location protoc-gen-grpc-cpp-plugin) $(in) --grpc_out=$(genDir) --cpp_out=$(genDir)",
40    srcs: [
41        "proto/AudioFocusControl.proto",
42    ],
43    out: [
44        "AudioFocusControl.pb.h",
45        "AudioFocusControl.grpc.pb.h",
46    ],
47}
48
49genrule {
50    name: "AudioFocusControlProtoStub_cc",
51    tools: [
52        "aprotoc",
53        "protoc-gen-grpc-cpp-plugin",
54    ],
55    cmd: "$(location aprotoc) -I$$(dirname $(in)) -Iexternal/protobuf/src --plugin=protoc-gen-grpc=$(location protoc-gen-grpc-cpp-plugin) $(in) --grpc_out=$(genDir) --cpp_out=$(genDir)",
56    srcs: [
57        "proto/AudioFocusControl.proto",
58    ],
59    out: [
60        "AudioFocusControl.pb.cc",
61        "AudioFocusControl.grpc.pb.cc",
62    ],
63}
64
65cc_library {
66    name: "android.hardware.automotive.audiocontrol-server.trout",
67    vendor: true,
68    defaults: ["audiocontrol_hal_default_trout"],
69    srcs: [
70        "AudioControlServer.cpp",
71    ],
72    generated_headers: [
73        "AudioFocusControlProtoStub_h",
74        "audio_policy_configuration_V7_0",
75    ],
76    generated_sources: [
77        "AudioFocusControlProtoStub_cc",
78        "audio_policy_configuration_V7_0",
79    ],
80    header_libs: ["libxsdc-utils"],
81    shared_libs: [
82        "android.hardware.automotive.audiocontrol-V1-ndk_platform",
83        "libgrpc++",
84        "libprotobuf-cpp-full",
85        "libbase",
86        "libbinder_ndk",
87        "libutils",
88        "liblog",
89        "libcutils",
90        "libxml2",
91    ],
92    cflags: [
93        "-Wno-unused-parameter",
94    ],
95}
96
97cc_binary {
98    name: "android.hardware.automotive.audiocontrol-service.trout",
99    relative_install_path: "hw",
100    init_rc: ["audiocontrol-trout.rc"],
101    vintf_fragments: ["audiocontrol-trout.xml"],
102    vendor: true,
103    generated_headers: ["audio_policy_configuration_V7_0"],
104    generated_sources: ["audio_policy_configuration_V7_0"],
105    header_libs: ["libxsdc-utils"],
106    shared_libs: [
107        "android.hardware.automotive.audiocontrol-server.trout",
108        "android.hardware.automotive.audiocontrol-V1-ndk_platform",
109        "android.hardware.automotive.utils.watchdog",
110        "android.automotive.watchdog-V2-ndk_platform",
111        "libbase",
112        "libbinder_ndk",
113        "libutils",
114        "liblog",
115        "libcutils",
116        "libxml2",
117    ],
118    srcs: [
119        "AudioControl.cpp",
120        "main.cpp",
121        "WatchdogClient.cpp"
122    ],
123    static_libs: [
124        "android.hardware.automotive.utils.vsockinfo",
125    ],
126}
127