Yu Shan | 562c0f8 | 2022-08-04 17:10:38 -0700 | [diff] [blame] | 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 | |
| 17 | package { |
| 18 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 19 | } |
| 20 | |
| 21 | cc_binary { |
| 22 | name: "android.hardware.automotive.remoteaccess@V1-default-service", |
| 23 | vendor: true, |
| 24 | vintf_fragments: ["remoteaccess-default-service.xml"], |
| 25 | init_rc: ["remoteaccess-default-service.rc"], |
| 26 | relative_install_path: "hw", |
| 27 | srcs: ["src/RemoteAccessImpl.cpp"], |
| 28 | whole_static_libs: [ |
| 29 | "RemoteAccessService", |
| 30 | ], |
| 31 | shared_libs: [ |
Yu Shan | dc54b8c | 2022-09-14 17:48:15 -0700 | [diff] [blame] | 32 | "libbase", |
Yu Shan | 562c0f8 | 2022-08-04 17:10:38 -0700 | [diff] [blame] | 33 | "libbinder_ndk", |
| 34 | "liblog", |
| 35 | "libutils", |
Yu Shan | e297456 | 2022-08-10 18:37:03 -0700 | [diff] [blame] | 36 | "libgrpc++", |
| 37 | "libprotobuf-cpp-full", |
| 38 | ], |
Yu Shan | bc2ed2a | 2022-09-15 19:01:52 -0700 | [diff] [blame] | 39 | defaults: [ |
| 40 | "vhalclient_defaults", |
| 41 | ], |
Yu Shan | e297456 | 2022-08-10 18:37:03 -0700 | [diff] [blame] | 42 | cflags: [ |
| 43 | "-Wno-unused-parameter", |
Yu Shan | a725df4 | 2022-09-12 14:56:32 -0700 | [diff] [blame] | 44 | "-DGRPC_SERVICE_ADDRESS=\"localhost:50051\"", |
Yu Shan | 562c0f8 | 2022-08-04 17:10:38 -0700 | [diff] [blame] | 45 | ], |
| 46 | } |
| 47 | |
| 48 | cc_library { |
| 49 | name: "RemoteAccessService", |
Yu Shan | 4b2850f | 2022-09-20 18:52:07 -0700 | [diff] [blame] | 50 | vendor_available: true, |
Yu Shan | 562c0f8 | 2022-08-04 17:10:38 -0700 | [diff] [blame] | 51 | local_include_dirs: ["include"], |
| 52 | export_include_dirs: ["include"], |
| 53 | srcs: [ |
| 54 | "src/RemoteAccessService.cpp", |
| 55 | ], |
| 56 | whole_static_libs: [ |
| 57 | "android.hardware.automotive.remoteaccess-V1-ndk", |
Yu Shan | e297456 | 2022-08-10 18:37:03 -0700 | [diff] [blame] | 58 | "wakeup_client_protos", |
Yu Shan | bc2ed2a | 2022-09-15 19:01:52 -0700 | [diff] [blame] | 59 | "libvhalclient", |
| 60 | ], |
| 61 | defaults: [ |
| 62 | "vhalclient_defaults", |
Yu Shan | 562c0f8 | 2022-08-04 17:10:38 -0700 | [diff] [blame] | 63 | ], |
| 64 | shared_libs: [ |
Yu Shan | e297456 | 2022-08-10 18:37:03 -0700 | [diff] [blame] | 65 | "libbase", |
Yu Shan | 562c0f8 | 2022-08-04 17:10:38 -0700 | [diff] [blame] | 66 | "libbinder_ndk", |
Yu Shan | dc54b8c | 2022-09-14 17:48:15 -0700 | [diff] [blame] | 67 | "libcutils", |
Yu Shan | 562c0f8 | 2022-08-04 17:10:38 -0700 | [diff] [blame] | 68 | "liblog", |
| 69 | "libutils", |
Yu Shan | e297456 | 2022-08-10 18:37:03 -0700 | [diff] [blame] | 70 | "libgrpc++", |
| 71 | "libprotobuf-cpp-full", |
| 72 | ], |
| 73 | cflags: [ |
| 74 | "-Wno-unused-parameter", |
Yu Shan | 562c0f8 | 2022-08-04 17:10:38 -0700 | [diff] [blame] | 75 | ], |
| 76 | } |
Yu Shan | 4b2850f | 2022-09-20 18:52:07 -0700 | [diff] [blame] | 77 | |
| 78 | cc_fuzz { |
| 79 | name: "android.hardware.automotive.remoteaccess@V1-default-service.aidl_fuzzer", |
| 80 | srcs: ["fuzzer/fuzzer.cpp"], |
| 81 | whole_static_libs: [ |
| 82 | "RemoteAccessService", |
| 83 | ], |
| 84 | static_libs: [ |
| 85 | "libgtest", |
| 86 | "libgmock", |
| 87 | ], |
| 88 | shared_libs: [ |
| 89 | "libbase", |
| 90 | "libbinder_ndk", |
| 91 | "liblog", |
| 92 | "libutils", |
| 93 | "libgrpc++", |
| 94 | "libprotobuf-cpp-full", |
| 95 | ], |
| 96 | defaults: [ |
| 97 | "vhalclient_defaults", |
| 98 | "service_fuzzer_defaults", |
| 99 | ], |
| 100 | cflags: [ |
| 101 | "-Wno-unused-parameter", |
| 102 | "-DGRPC_SERVICE_ADDRESS=\"localhost:50051\"", |
| 103 | ], |
| 104 | fuzz_config: { |
| 105 | cc: [ |
| 106 | "shanyu@google.com", |
| 107 | ], |
| 108 | }, |
| 109 | } |