• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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")
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    "//commonlibrary/c_utils/base/include",
27    "$SUBSYSTEM_DIR/interfaces/innerkits/ipc_core/include",
28    "$SUBSYSTEM_DIR/interfaces/innerkits/libdbinder/include",
29    "$DBINDER_ROOT/dbinder_service/include",
30  ]
31}
32
33config("libdbinder_private_config") {
34  visibility = [ ":*" ]
35  cflags_cc = [
36    "-DLOG_TAG=\"libdbinder\"",
37    "-O2",
38  ]
39}
40
41ohos_shared_library("libdbinder") {
42  sanitize = {
43    integer_overflow = true
44  }
45  include_dirs = [
46    "$SUBSYSTEM_DIR/ipc/native/c/rpc/include",
47    "$SUBSYSTEM_DIR/utils/include",
48  ]
49  sources = [
50    "$DBINDER_ROOT/dbinder_service/src/dbinder_death_recipient.cpp",
51    "$DBINDER_ROOT/dbinder_service/src/dbinder_sa_death_recipient.cpp",
52    "$DBINDER_ROOT/dbinder_service/src/dbinder_service.cpp",
53    "$DBINDER_ROOT/dbinder_service/src/dbinder_service_stub.cpp",
54    "$DBINDER_ROOT/dbinder_service/src/socket/dbinder_remote_listener.cpp",
55  ]
56  public_configs = [ ":libdbinder_config" ]
57  configs = [ ":libdbinder_private_config" ]
58  deps = [ "$SUBSYSTEM_DIR/interfaces/innerkits/ipc_core:ipc_core" ]
59  external_deps = [
60    "c_utils:utils",
61    "dsoftbus:softbus_client",
62    "hilog:libhilog",
63  ]
64  subsystem_name = "communication"
65  part_name = "ipc"
66}
67