Yifan Hong | 7a6956e | 2021-11-08 23:52:44 -0800 | [diff] [blame] | 1 | // Copyright (C) 2021 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 | |
| 15 | package { |
| 16 | // See: http://go/android-license-faq |
| 17 | // A large-scale-change added 'default_applicable_licenses' to import |
| 18 | // all of the 'license_kinds' from "hardware_interfaces_license" |
| 19 | // to get the below license kinds: |
| 20 | // SPDX-license-identifier-Apache-2.0 |
| 21 | default_applicable_licenses: ["hardware_interfaces_license"], |
| 22 | } |
| 23 | |
| 24 | cc_defaults { |
| 25 | name: "libhealthshim_defaults", |
| 26 | host_supported: true, // for testing |
Steven Moreland | 738d3d5 | 2022-01-07 22:15:32 +0000 | [diff] [blame] | 27 | target: { |
| 28 | darwin: { |
| 29 | enabled: false, |
| 30 | }, |
| 31 | }, |
Yifan Hong | 7a6956e | 2021-11-08 23:52:44 -0800 | [diff] [blame] | 32 | cflags: [ |
| 33 | "-Wall", |
| 34 | "-Werror", |
| 35 | ], |
| 36 | static_libs: [ |
Jack Wu | 3356161 | 2022-11-24 12:10:55 +0800 | [diff] [blame^] | 37 | "android.hardware.health-V2-ndk", |
Yifan Hong | 7a6956e | 2021-11-08 23:52:44 -0800 | [diff] [blame] | 38 | "android.hardware.health-translate-ndk", |
| 39 | "android.hardware.health@1.0", |
| 40 | "android.hardware.health@2.0", |
| 41 | ], |
| 42 | shared_libs: [ |
| 43 | // These can be expected from the device or from host. |
| 44 | "libbase", |
| 45 | "libbinder_ndk", |
| 46 | "libcutils", |
| 47 | "libhidlbase", |
| 48 | "liblog", |
| 49 | "libutils", |
| 50 | ], |
| 51 | } |
| 52 | |
| 53 | // Shim library that wraps a HIDL IHealth object into an AIDL IHealth object. |
| 54 | cc_library_static { |
| 55 | name: "libhealthshim", |
| 56 | defaults: ["libhealthshim_defaults"], |
| 57 | recovery_available: true, |
| 58 | srcs: [ |
| 59 | "shim.cpp", |
| 60 | ], |
| 61 | export_include_dirs: [ |
| 62 | "include", |
| 63 | ], |
| 64 | } |
| 65 | |
| 66 | cc_test { |
| 67 | name: "libhealthshim_test", |
| 68 | defaults: ["libhealthshim_defaults"], |
| 69 | static_libs: [ |
| 70 | "libhealthshim", |
| 71 | "libgmock", |
| 72 | ], |
Chih-Hung Hsieh | ad1bf31 | 2022-02-17 21:56:13 -0800 | [diff] [blame] | 73 | tidy_timeout_srcs: [ |
| 74 | "test.cpp", |
| 75 | ], |
Yifan Hong | 7a6956e | 2021-11-08 23:52:44 -0800 | [diff] [blame] | 76 | srcs: [ |
| 77 | "test.cpp", |
| 78 | ], |
| 79 | test_suites: ["general-tests"], |
| 80 | test_options: { |
| 81 | unit_test: true, |
| 82 | }, |
| 83 | } |