1# Copyright (c) 2021 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/adapter/uhdf2/uhdf.gni") 16group("uhdf_hidl_pkg") { 17 deps = [ ":libhdi" ] 18} 19 20config("libhdi_pub_config") { 21 visibility = [ ":*" ] 22 23 include_dirs = [ 24 "//utils/native/base/include", 25 "$hdf_framework_path/utils/include", 26 "$hdf_framework_path/core/shared/include", 27 "$hdf_uhdf_path/ipc/include", 28 "$hdf_uhdf_path/hdi/include", 29 "$hdf_uhdf_path/include/hdi", 30 "$hdf_uhdf_path/include/hdi/base", 31 "$hdf_uhdf_path/shared/include", 32 ] 33} 34if (defined(ohos_lite)) { 35 group("libhdi") { 36 deps = [] 37 } 38} else { 39 ohos_shared_library("libhdi") { 40 if (target_cpu == "arm64") { 41 defines = [ "__ARM64__" ] 42 } 43 44 include_dirs = [ 45 "$hdf_framework_path/core/sec/include", 46 "$hdf_framework_path/core/shared/include", 47 "$hdf_framework_path/core/host/include", 48 "$hdf_framework_path/core/manager/include", 49 "$hdf_uhdf_path/include/devhost", 50 "$hdf_uhdf_path/devhost/include", 51 "$hdf_uhdf_path/devmgr/include", 52 "$hdf_uhdf_path/host/include", 53 "$hdf_uhdf_path/manager/include", 54 "$hdf_uhdf_path/include/host", 55 ] 56 public_configs = [ ":libhdi_pub_config" ] 57 sources = [ 58 "$hdf_framework_path/core/shared/src/service_status.c", 59 "src/devmgr_client.c", 60 "src/hdf_load_hdi.c", 61 "src/hdi_smq_syncer.cpp", 62 "src/idevmgr_client.cpp", 63 "src/iservmgr_client.cpp", 64 "src/servmgr_client.c", 65 "src/servstat_listener.c", 66 "src/servstat_listener_stub.cpp", 67 ] 68 69 deps = [ 70 "$hdf_uhdf_path/ipc:libhdf_ipc_adapter", 71 "$hdf_uhdf_path/utils:libhdf_utils", 72 ] 73 74 if (is_standard_system) { 75 external_deps = [ 76 "hiviewdfx_hilog_native:libhilog", 77 "ipc:ipc_single", 78 "samgr_standard:samgr_proxy", 79 "utils_base:utils", 80 ] 81 } else { 82 external_deps = [ 83 "hilog:libhilog", 84 "ipc:ipc_single", 85 "samgr:samgr_proxy", 86 ] 87 } 88 89 cflags = [ 90 "-Wall", 91 "-Wextra", 92 "-Werror", 93 ] 94 95 install_images = [ chipset_base_dir ] 96 subsystem_name = "hdf" 97 part_name = "device_driver_framework" 98 } 99} 100