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 init_rc: ["remoteaccess-default-service.rc"], 55 vintf_fragment_modules: ["remoteaccess-default-service.xml"], 56 57} 58 59cc_binary { 60 name: "android.hardware.automotive.remoteaccess@V2-tcu-test-service", 61 defaults: ["remote-access-hal-defaults"], 62 init_rc: ["remoteaccess-tcu-test-service.rc"], 63 vintf_fragment_modules: ["remoteaccess-default-service.xml"], 64} 65 66vintf_fragment { 67 name: "remoteaccess-default-service.xml", 68 src: "remoteaccess-default-service.xml", 69 vendor: true, 70} 71 72cc_library { 73 name: "RemoteAccessService", 74 vendor_available: true, 75 local_include_dirs: ["include"], 76 export_include_dirs: ["include"], 77 srcs: [ 78 "src/RemoteAccessService.cpp", 79 ], 80 whole_static_libs: [ 81 "android.hardware.automotive.remoteaccess-V2-ndk", 82 "wakeup_client_protos", 83 "libvhalclient", 84 ], 85 defaults: [ 86 "vhalclient_defaults", 87 ], 88 shared_libs: [ 89 "libbase", 90 "libbinder_ndk", 91 "libcutils", 92 "liblog", 93 "libutils", 94 "libgrpc++", 95 "libprotobuf-cpp-full", 96 ], 97 cflags: [ 98 "-Wno-unused-parameter", 99 ], 100} 101 102cc_fuzz { 103 name: "[email protected]_fuzzer", 104 srcs: ["fuzzer/fuzzer.cpp"], 105 whole_static_libs: [ 106 "RemoteAccessService", 107 ], 108 static_libs: [ 109 "libgtest", 110 "libgmock", 111 ], 112 shared_libs: [ 113 "libbase", 114 "libbinder_ndk", 115 "liblog", 116 "libutils", 117 "libgrpc++", 118 "libprotobuf-cpp-full", 119 ], 120 defaults: [ 121 "vhalclient_defaults", 122 "service_fuzzer_defaults", 123 ], 124 cflags: [ 125 "-Wno-unused-parameter", 126 "-DGRPC_SERVICE_ADDRESS=\"localhost:50051\"", 127 ], 128 fuzz_config: { 129 cc: [ 130 "[email protected]", 131 ], 132 }, 133} 134