1/* 2 * Copyright (C) 2022 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 default_team: "trendy_team_aaos_framework", 19 default_applicable_licenses: ["Android-Apache-2.0"], 20} 21 22cc_defaults { 23 name: "remote-access-hal-defaults", 24 vendor: true, 25 relative_install_path: "hw", 26 srcs: [ 27 "src/RemoteAccessImpl.cpp", 28 ], 29 whole_static_libs: [ 30 "RemoteAccessService", 31 ], 32 static_libs: [ 33 "BindToDeviceSocketMutatorLib", 34 ], 35 shared_libs: [ 36 "libbinder_ndk", 37 "libutils", 38 "libprotobuf-cpp-full", 39 ], 40 defaults: [ 41 "vhalclient_defaults", 42 "BindToDeviceSocketMutatorDefaults", 43 ], 44 cflags: [ 45 // This is already included in BindToDeviceSocketMutatorDefaults but 46 // might be overridden by vhalclient_defaults. 47 "-Wno-unused-parameter", 48 ], 49} 50 51cc_binary { 52 name: "android.hardware.automotive.remoteaccess@V2-default-service", 53 defaults: ["remote-access-hal-defaults"], 54 vintf_fragments: ["remoteaccess-default-service.xml"], 55 init_rc: ["remoteaccess-default-service.rc"], 56} 57 58cc_binary { 59 name: "android.hardware.automotive.remoteaccess@V2-tcu-test-service", 60 defaults: ["remote-access-hal-defaults"], 61 vintf_fragments: ["remoteaccess-default-service.xml"], 62 init_rc: ["remoteaccess-tcu-test-service.rc"], 63} 64 65cc_library { 66 name: "RemoteAccessService", 67 vendor_available: true, 68 local_include_dirs: ["include"], 69 export_include_dirs: ["include"], 70 srcs: [ 71 "src/RemoteAccessService.cpp", 72 ], 73 whole_static_libs: [ 74 "android.hardware.automotive.remoteaccess-V2-ndk", 75 "wakeup_client_protos", 76 "libvhalclient", 77 ], 78 defaults: [ 79 "vhalclient_defaults", 80 ], 81 shared_libs: [ 82 "libbase", 83 "libbinder_ndk", 84 "libcutils", 85 "liblog", 86 "libutils", 87 "libgrpc++", 88 "libprotobuf-cpp-full", 89 ], 90 cflags: [ 91 "-Wno-unused-parameter", 92 ], 93} 94 95cc_fuzz { 96 name: "android.hardware.automotive.remoteaccess@V2-default-service.aidl_fuzzer", 97 srcs: ["fuzzer/fuzzer.cpp"], 98 whole_static_libs: [ 99 "RemoteAccessService", 100 ], 101 static_libs: [ 102 "libgtest", 103 "libgmock", 104 ], 105 shared_libs: [ 106 "libbase", 107 "libbinder_ndk", 108 "liblog", 109 "libutils", 110 "libgrpc++", 111 "libprotobuf-cpp-full", 112 ], 113 defaults: [ 114 "vhalclient_defaults", 115 "service_fuzzer_defaults", 116 ], 117 cflags: [ 118 "-Wno-unused-parameter", 119 "-DGRPC_SERVICE_ADDRESS=\"localhost:50051\"", 120 ], 121 fuzz_config: { 122 cc: [ 123 "shanyu@google.com", 124 ], 125 }, 126} 127