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