• 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  include_dirs = [
43    "$SUBSYSTEM_DIR/ipc/native/c/rpc/include",
44    "$SUBSYSTEM_DIR/utils/include",
45  ]
46  sources = [
47    "$DBINDER_ROOT/dbinder_service/src/dbinder_death_recipient.cpp",
48    "$DBINDER_ROOT/dbinder_service/src/dbinder_sa_death_recipient.cpp",
49    "$DBINDER_ROOT/dbinder_service/src/dbinder_service.cpp",
50    "$DBINDER_ROOT/dbinder_service/src/dbinder_service_stub.cpp",
51    "$DBINDER_ROOT/dbinder_service/src/socket/dbinder_remote_listener.cpp",
52  ]
53  public_configs = [ ":libdbinder_config" ]
54  configs = [ ":libdbinder_private_config" ]
55  deps = [ "$SUBSYSTEM_DIR/interfaces/innerkits/ipc_core:ipc_core" ]
56  external_deps = [
57    "c_utils:utils",
58    "dsoftbus:softbus_client",
59    "hiviewdfx_hilog_native:libhilog",
60  ]
61  subsystem_name = "communication"
62  part_name = "ipc"
63}
64