1// 2// Copyright (C) 2019 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_defaults { 17 name: "android.hardware.sensors@2.X-fakesubhal-defaults", 18 srcs: [ 19 "fake_subhal/*.cpp", 20 ], 21 header_libs: [ 22 "android.hardware.sensors@2.0-multihal.header", 23 "android.hardware.sensors@2.X-shared-utils", 24 ], 25 export_include_dirs: ["fake_subhal"], 26 shared_libs: [ 27 "android.hardware.sensors@1.0", 28 "android.hardware.sensors@2.0", 29 "android.hardware.sensors@2.0-ScopedWakelock", 30 "android.hardware.sensors@2.1", 31 "libcutils", 32 "libfmq", 33 "libhardware", 34 "libhidlbase", 35 "liblog", 36 "libpower", 37 "libutils", 38 ], 39 static_libs: [ 40 "android.hardware.sensors@1.0-convert", 41 "android.hardware.sensors@2.X-multihal", 42 ], 43 cflags: [ 44 "-DLOG_TAG=\"FakeSubHal\"", 45 ], 46} 47 48cc_library { 49 name: "android.hardware.sensors@2.X-fakesubhal-config1", 50 vendor: true, 51 defaults: ["android.hardware.sensors@2.X-fakesubhal-defaults"], 52 cflags: [ 53 "-DSUB_HAL_VERSION_2_0", 54 "-DSUPPORT_CONTINUOUS_SENSORS", 55 "-DSUB_HAL_NAME=\"FakeSubHal-Continuous\"", 56 ], 57} 58 59cc_library { 60 name: "android.hardware.sensors@2.X-fakesubhal-config2", 61 vendor: true, 62 defaults: ["android.hardware.sensors@2.X-fakesubhal-defaults"], 63 cflags: [ 64 "-DSUB_HAL_VERSION_2_0", 65 "-DSUPPORT_ON_CHANGE_SENSORS", 66 "-DSUB_HAL_NAME=\"FakeSubHal-OnChange\"", 67 ], 68} 69 70cc_library { 71 name: "android.hardware.sensors@2.X-fakesubhal-config3", 72 vendor: true, 73 defaults: ["android.hardware.sensors@2.X-fakesubhal-defaults"], 74 cflags: [ 75 "-DSUPPORT_ON_CHANGE_SENSORS", 76 "-DSUB_HAL_NAME=\"FakeSubHal-OnChange\"", 77 ], 78} 79 80cc_test_library { 81 name: "android.hardware.sensors@2.X-fakesubhal-unittest", 82 vendor_available: true, 83 defaults: ["android.hardware.sensors@2.X-fakesubhal-defaults"], 84 cflags: [ 85 "-DSUPPORT_ON_CHANGE_SENSORS", 86 "-DSUPPORT_CONTINUOUS_SENSORS", 87 "-DSUB_HAL_NAME=\"FakeSubHal-Test\"", 88 ], 89} 90 91cc_test { 92 name: "android.hardware.sensors@2.X-halproxy-unit-tests", 93 srcs: [ 94 "HalProxy_test.cpp", 95 "ScopedWakelock_test.cpp", 96 ], 97 vendor: true, 98 header_libs: [ 99 "android.hardware.sensors@2.X-shared-utils", 100 ], 101 static_libs: [ 102 "android.hardware.sensors@1.0-convert", 103 "android.hardware.sensors@2.0-ScopedWakelock.testlib", 104 "android.hardware.sensors@2.X-multihal", 105 "android.hardware.sensors@2.X-fakesubhal-unittest", 106 ], 107 shared_libs: [ 108 "android.hardware.sensors@1.0", 109 "android.hardware.sensors@2.0", 110 "android.hardware.sensors@2.1", 111 "libbase", 112 "libcutils", 113 "libfmq", 114 "libhardware", 115 "libhidlbase", 116 "liblog", 117 "libpower", 118 "libutils", 119 ], 120 test_suites: ["device-tests"], 121 cflags: [ 122 "-DLOG_TAG=\"HalProxyUnitTests\"", 123 ], 124} 125