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. 13import("//build/ohos.gni") 14import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") 15 16ohos_shared_library("liblight_interface_service_1.0") { 17 include_dirs = [ 18 "//drivers/hdf_core/adapter/uhdf2/include/hdi", 19 "//drivers/peripheral/light/interfaces/include/", 20 ] 21 sources = [ "light_interface_impl.cpp" ] 22 deps = [ "//drivers/peripheral/light/hal:hdi_light" ] 23 cflags = [ 24 "-Wall", 25 "-Wextra", 26 "-Werror", 27 "-fsigned-char", 28 "-fno-common", 29 "-fno-strict-aliasing", 30 ] 31 32 if (is_standard_system) { 33 external_deps = [ 34 "c_utils:utils", 35 "drivers_interface_light:light_idl_headers", 36 "hiviewdfx_hilog_native:libhilog", 37 ] 38 } else { 39 external_deps = [ "hilog:libhilog" ] 40 } 41 external_deps += [ "ipc:ipc_single" ] 42 43 install_images = [ chipset_base_dir ] 44 subsystem_name = "hdf" 45 part_name = "drivers_peripheral_light" 46} 47 48ohos_shared_library("liblight_driver") { 49 include_dirs = [ 50 "//drivers/hdf_core/adapter/uhdf2/ipc/include", 51 "//drivers/hdf_core/adapter/uhdf2/include/host", 52 "//drivers/hdf_core/adapter/uhdf2/include/hdi", 53 "//drivers/peripheral/light/interfaces/include/", 54 ] 55 sources = [ "light_interface_driver.cpp" ] 56 57 deps = [ 58 "//drivers/hdf_core/adapter/uhdf2/ipc:libhdf_ipc_adapter", 59 "//drivers/interface/light/v1_0:liblight_stub_1.0", 60 ] 61 62 cflags = [ 63 "-Wall", 64 "-Wextra", 65 "-Werror", 66 "-fsigned-char", 67 "-fno-common", 68 "-fno-strict-aliasing", 69 ] 70 71 if (is_standard_system) { 72 external_deps = [ 73 "c_utils:utils", 74 "hdf_core:libhdi", 75 "hiviewdfx_hilog_native:libhilog", 76 "ipc:ipc_single", 77 ] 78 } else { 79 external_deps = [ 80 "hilog:libhilog", 81 "ipc:ipc_single", 82 ] 83 } 84 85 install_images = [ chipset_base_dir ] 86 subsystem_name = "hdf" 87 part_name = "drivers_peripheral_light" 88} 89 90group("hdf_light_service") { 91 deps = [ 92 ":liblight_driver", 93 ":liblight_interface_service_1.0", 94 ] 95} 96