1# Copyright (c) 2022 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("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") 16 17ohos_shared_library("libmotion_interface_service_1.0") { 18 include_dirs = [ "//drivers/peripheral/motion/interfaces/include/" ] 19 sources = [ "motion_impl.cpp" ] 20 cflags = [ 21 "-Wall", 22 "-Wextra", 23 "-Werror", 24 "-fsigned-char", 25 "-fno-common", 26 "-fno-strict-aliasing", 27 ] 28 29 if (is_standard_system) { 30 external_deps = [ 31 "c_utils:utils", 32 "drivers_interface_motion:motion_idl_headers", 33 "hdf_core:libhdf_ipc_adapter", 34 "hdf_core:libhdf_utils", 35 "hiviewdfx_hilog_native:libhilog", 36 "ipc:ipc_single", 37 ] 38 } 39 40 install_images = [ chipset_base_dir ] 41 subsystem_name = "hdf" 42 part_name = "drivers_peripheral_motion" 43} 44 45ohos_shared_library("libmotion_driver") { 46 include_dirs = [ "//drivers/peripheral/motion/interfaces/include/" ] 47 48 sources = [ "motion_interface_driver.cpp" ] 49 50 deps = [ "//drivers/interface/motion/v1_0:libmotion_stub_1.0" ] 51 52 cflags = [ 53 "-Wall", 54 "-Wextra", 55 "-Werror", 56 "-fsigned-char", 57 "-fno-common", 58 "-fno-strict-aliasing", 59 ] 60 61 if (is_standard_system) { 62 external_deps = [ 63 "c_utils:utils", 64 "hdf_core:libhdf_host", 65 "hdf_core:libhdf_ipc_adapter", 66 "hdf_core:libhdf_utils", 67 "hdf_core:libhdi", 68 "hiviewdfx_hilog_native:libhilog", 69 "ipc:ipc_single", 70 ] 71 } 72 73 install_images = [ chipset_base_dir ] 74 subsystem_name = "hdf" 75 part_name = "drivers_peripheral_motion" 76} 77 78group("hdi_motion_service") { 79 deps = [ 80 ":libmotion_driver", 81 ":libmotion_interface_service_1.0", 82 ] 83} 84