1// 2// Copyright (C) 2020 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 16cc_library { 17 name: "android.hardware.sensors@2.0-Google-IIO-Subhal", 18 vendor: true, 19 srcs: [ 20 "iio_utils.cpp", 21 "MultiPoll.cpp", 22 "Sensor.cpp", 23 "SensorsSubHal.cpp", 24 "SensorThread.cpp", 25 ], 26 header_libs: [ 27 "android.hardware.sensors@2.0-multihal.header", 28 ], 29 shared_libs: [ 30 "android.hardware.sensors@1.0", 31 "android.hardware.sensors@2.0", 32 "android.hardware.sensors@2.0-ScopedWakelock", 33 "libcutils", 34 "libfmq", 35 "libhardware", 36 "libhidlbase", 37 "liblog", 38 "libbase", 39 "libpower", 40 "libutils", 41 ], 42 static_libs: [ 43 "android.hardware.sensors@2.X-multihal", 44 "libxml2", 45 ], 46 cflags: [ 47 "-Wall", 48 "-Wextra", 49 "-Werror", 50 ], 51 generated_sources: ["sensor_hal_configuration_V1_0"], 52 generated_headers: ["sensor_hal_configuration_V1_0"], 53} 54 55cc_test_host { 56 name: "android.hardware.sensors@2.0-Google-IIO-Subhal_test", 57 srcs: [ 58 "iio_utils.cpp", 59 "tests/IioUtilsTest.cpp", 60 ], 61 static_libs: [ 62 "libgtest", 63 "android.hardware.sensors@1.0", 64 "android.hardware.sensors@2.0", 65 ], 66 shared_libs: [ 67 "libbase", 68 "liblog", 69 ], 70} 71 72cc_test_host { 73 name: "android.hardware.sensors@2.0-Google-IIO-Subhal_test-MultiPoll", 74 srcs: [ 75 "MultiPoll.cpp", 76 "tests/MultiPoll.cpp" 77 ], 78 static_libs: [ 79 "libgtest", 80 "android.hardware.sensors@1.0", 81 "android.hardware.sensors@2.0", 82 ], 83 shared_libs: [ 84 "libbase", 85 "liblog", 86 ], 87} 88 89