1# Copyright (c) 2021-2023 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/ohos.gni") 15import("../sensor.gni") 16 17ohos_shared_library("libhdi_sensor_impl") { 18 include_dirs = [ 19 "../interfaces/include/", 20 "../interfaces/v1_0", 21 "../utils/include", 22 "../hal/include", 23 ] 24 25 sources = [ "sensor_impl.cpp" ] 26 deps = [ "../hal:hdi_sensor" ] 27 28 cflags = [ 29 "-Wall", 30 "-Wextra", 31 "-Werror", 32 "-fsigned-char", 33 "-fno-common", 34 "-fno-strict-aliasing", 35 ] 36 37 if (is_standard_system) { 38 external_deps = [ 39 "drivers_interface_sensor:libsensor_stub_2.0", 40 "hdf_core:libhdf_host", 41 "hdf_core:libhdf_utils", 42 "hilog:libhilog", 43 "hitrace:hitrace_meter", 44 "ipc:ipc_single", 45 ] 46 if (c_utils_enable) { 47 external_deps += [ "c_utils:utils" ] 48 } 49 } else { 50 external_deps = [ 51 "hdf_core:libhdf_utils", 52 "hilog:libhilog", 53 "ipc:ipc_single", 54 ] 55 } 56 57 install_images = [ chipset_base_dir ] 58 subsystem_name = "hdf" 59 part_name = "drivers_peripheral_sensor" 60} 61