• 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("../../../config.gni")
16
17SUBSYSTEM_DIR = "//foundation/communication/ipc"
18IPC_CORE_ROOT = "$SUBSYSTEM_DIR/ipc/native"
19DBINDER_ROOT = "$SUBSYSTEM_DIR/dbinder"
20
21config("libdbinder_config") {
22  visibility = [ ":*" ]
23  cflags = []
24  if (is_standard_system) {
25    cflags += [ "-DCONFIG_STANDARD_SYSTEM" ]
26  }
27  include_dirs = [
28    "$SUBSYSTEM_DIR/interfaces/innerkits/ipc_core/include",
29    "$SUBSYSTEM_DIR/interfaces/innerkits/libdbinder/include",
30    "$DBINDER_ROOT/dbinder_service/include",
31  ]
32}
33
34config("libdbinder_private_config") {
35  visibility = [ ":*" ]
36  cflags_cc = [
37    "-DLOG_TAG=\"libdbinder\"",
38    "-O2",
39  ]
40}
41
42ohos_shared_library("libdbinder") {
43  sanitize = {
44    integer_overflow = true
45  }
46  branch_protector_ret = "pac_ret"
47  include_dirs = [
48    "$SUBSYSTEM_DIR/ipc/native/c/rpc/include",
49    "$SUBSYSTEM_DIR/utils/include",
50  ]
51  sources = [
52    "$DBINDER_ROOT/dbinder_service/src/dbinder_death_recipient.cpp",
53    "$DBINDER_ROOT/dbinder_service/src/dbinder_sa_death_recipient.cpp",
54    "$DBINDER_ROOT/dbinder_service/src/dbinder_service.cpp",
55    "$DBINDER_ROOT/dbinder_service/src/dbinder_service_stub.cpp",
56    "$DBINDER_ROOT/dbinder_service/src/socket/dbinder_remote_listener.cpp",
57  ]
58
59  public_configs = [
60    ":libdbinder_config",
61    "$SUBSYSTEM_DIR/config:dsoftbus_header_deps_config",
62  ]
63
64  configs = [ ":libdbinder_private_config" ]
65  deps = [
66    "$IPC_CORE_ROOT/src/core:ipc_common",
67    "$SUBSYSTEM_DIR/interfaces/innerkits/ipc_core:ipc_core",
68  ]
69
70  external_deps = [
71    "c_utils:utils",
72    "ffrt:libffrt",
73    "hilog:libhilog",
74  ]
75
76  if (hiviewdfx_hisysevent_support) {
77    external_deps += [ "hisysevent:libhisysevent" ]
78  }
79
80  subsystem_name = "communication"
81  part_name = "ipc"
82}
83