• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-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
14import("//build/ohos.gni")
15import("./../uhdf.gni")
16
17hdf_framework_path = "./../../../framework"
18hdf_interface_path = "./../../../interfaces"
19
20config("libhdf_ipc_adapter_pub_config") {
21  visibility = [ ":*" ]
22
23  include_dirs = [
24    "$hdf_interface_path/inner_api/ipc",
25    "$hdf_interface_path/inner_api/core",
26    "$hdf_uhdf_path/utils/include",
27  ]
28}
29if (defined(ohos_lite)) {
30  group("libhdf_ipc_adapter") {
31    deps = []
32  }
33} else {
34  ohos_shared_library("libhdf_ipc_adapter") {
35    branch_protector_ret = "pac_ret"
36    include_dirs = [
37      "include",
38      "$hdf_framework_path/utils/include",
39      "$hdf_framework_path/core/shared/include",
40    ]
41
42    public_configs = [ ":libhdf_ipc_adapter_pub_config" ]
43
44    sources = [
45      "src/hdf_dump.cpp",
46      "src/hdf_remote_adapter.cpp",
47      "src/hdf_remote_service.c",
48      "src/hdf_sbuf_impl_hipc.cpp",
49    ]
50
51    if (is_standard_system) {
52      deps = [ "../pub_utils:libpub_utils" ]
53      external_deps = [
54        "c_utils:utils",
55        "hilog:libhilog",
56        "ipc:ipc_single",
57        "samgr:samgr_proxy",
58      ]
59
60      if (hicollie_enabled) {
61        external_deps += [ "hicollie:libhicollie" ]
62      }
63    } else {
64      external_deps = [
65        "hilog:libhilog",
66        "ipc:ipc_single",
67        "samgr:samgr_proxy",
68      ]
69    }
70
71    if (build_selinux) {
72      cflags = [ "-DWITH_SELINUX" ]
73    }
74
75    innerapi_tags = [
76      "chipsetsdk_sp",
77      "platformsdk_indirect",
78    ]
79    install_images = [
80      system_base_dir,
81      updater_base_dir,
82    ]
83    subsystem_name = "hdf"
84    part_name = "hdf_core"
85  }
86}
87