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 "../utils/include", 24 ] 25 26 sources = [ "light_if_service.cpp" ] 27 deps = [ "../hal:hdi_light" ] 28 29 cflags = [ 30 "-Wall", 31 "-Wextra", 32 "-Werror", 33 "-fsigned-char", 34 "-fno-common", 35 "-fno-strict-aliasing", 36 ] 37 38 if (is_standard_system) { 39 external_deps = [ 40 "c_utils:utils", 41 "drivers_interface_light:light_idl_headers", 42 "hdf_core:libhdf_host", 43 "hilog:libhilog", 44 "hitrace:hitrace_meter", 45 ] 46 } else { 47 external_deps = [ "hilog:libhilog" ] 48 } 49 external_deps += [ "ipc:ipc_single" ] 50 51 install_images = [ chipset_base_dir ] 52 subsystem_name = "hdf" 53 part_name = "drivers_peripheral_light" 54} 55 56ohos_shared_library("liblight_driver") { 57 include_dirs = [ 58 "../interfaces/include/", 59 "../utils/include", 60 ] 61 sources = [ "light_if_driver.cpp" ] 62 63 cflags = [ 64 "-Wall", 65 "-Wextra", 66 "-Werror", 67 "-fsigned-char", 68 "-fno-common", 69 "-fno-strict-aliasing", 70 ] 71 72 if (is_standard_system) { 73 external_deps = [ 74 "c_utils:utils", 75 "drivers_interface_light:liblight_stub_1.0", 76 "hdf_core:libhdf_host", 77 "hdf_core:libhdf_ipc_adapter", 78 "hdf_core:libhdf_utils", 79 "hdf_core:libhdi", 80 "hilog:libhilog", 81 "ipc:ipc_single", 82 ] 83 } else { 84 external_deps = [ 85 "hilog:libhilog", 86 "ipc:ipc_single", 87 ] 88 } 89 90 shlib_type = "hdi" 91 install_images = [ chipset_base_dir ] 92 subsystem_name = "hdf" 93 part_name = "drivers_peripheral_light" 94} 95 96group("hdf_light_service") { 97 deps = [ 98 ":liblight_driver", 99 ":liblight_interface_service_1.0", 100 ] 101} 102