1# Copyright (c) 2022-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 14HDF_CORE_PATH = "../../../hdf_core" 15import("//build/ohos.gni") 16import("$HDF_CORE_PATH/adapter/uhdf2/uhdf.gni") 17 18ohos_shared_library("liblight_interface_service_1.0") { 19 include_dirs = [ 20 "../interfaces/include/", 21 ".", 22 "../interfaces/v1_0/", 23 ] 24 25 sources = [ "light_if_service.cpp" ] 26 deps = [ "../hal:hdi_light" ] 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 "c_utils:utils", 40 "drivers_interface_light:light_idl_headers", 41 "hdf_core:libhdf_host", 42 "hilog:libhilog", 43 "hitrace:hitrace_meter", 44 ] 45 } else { 46 external_deps = [ "hilog:libhilog" ] 47 } 48 external_deps += [ "ipc:ipc_single" ] 49 50 install_images = [ chipset_base_dir ] 51 subsystem_name = "hdf" 52 part_name = "drivers_peripheral_light" 53} 54 55ohos_shared_library("liblight_driver") { 56 include_dirs = [ "../interfaces/include/" ] 57 sources = [ "light_if_driver.cpp" ] 58 59 cflags = [ 60 "-Wall", 61 "-Wextra", 62 "-Werror", 63 "-fsigned-char", 64 "-fno-common", 65 "-fno-strict-aliasing", 66 ] 67 68 if (is_standard_system) { 69 external_deps = [ 70 "c_utils:utils", 71 "drivers_interface_light:liblight_stub_1.0", 72 "hdf_core:libhdf_host", 73 "hdf_core:libhdf_ipc_adapter", 74 "hdf_core:libhdf_utils", 75 "hdf_core:libhdi", 76 "hilog:libhilog", 77 "ipc:ipc_single", 78 ] 79 } else { 80 external_deps = [ 81 "hilog:libhilog", 82 "ipc:ipc_single", 83 ] 84 } 85 86 shlib_type = "hdi" 87 install_images = [ chipset_base_dir ] 88 subsystem_name = "hdf" 89 part_name = "drivers_peripheral_light" 90} 91 92group("hdf_light_service") { 93 deps = [ 94 ":liblight_driver", 95 ":liblight_interface_service_1.0", 96 ] 97} 98