• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2020 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("../config.gni")
15
16if (!enable_ohos_distributedschedule_samgr_lite_rpc_mini) {
17  config("endpoint_public") {
18    include_dirs = [
19      "../samgr/adapter",
20      "//foundation/distributedschedule/samgr_lite/interfaces/kits/samgr",
21      "//foundation/distributedschedule/samgr_lite/interfaces/kits/registry",
22      "//utils/native/lite/include",
23      "//foundation/communication/ipc_lite/interfaces/kits",
24      "//third_party/bounds_checking_function/include",
25      "//base/security/permission/services/permission_lite/ipc_auth/include",
26    ]
27  }
28
29  config("endpoint_internal") {
30    include_dirs = [ "../samgr/registry" ]
31  }
32
33  source_set("endpoint_source") {
34    sources = [
35      "source/client_factory.c",
36      "source/default_client.c",
37      "source/endpoint.c",
38      "source/token_bucket.c",
39    ]
40
41    cflags = [
42      "-fPIC",
43      "-Wall",
44    ]
45
46    if (ohos_kernel_type == "linux") {
47      defines = [
48        "_GNU_SOURCE",
49        "LITE_LINUX_BINDER_IPC",
50      ]
51    }
52
53    configs += [ ":endpoint_internal" ]
54
55    public_configs = [ ":endpoint_public" ]
56
57    public_deps = [
58      "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
59      "//foundation/communication/ipc_lite:liteipc_adapter",
60      "//third_party/bounds_checking_function:libsec_shared",
61    ]
62  }
63
64  source_set("store_source") {
65    sources = [ "source/sa_store.c" ]
66
67    cflags = [
68      "-fPIC",
69      "-Wall",
70    ]
71
72    configs += [ ":endpoint_internal" ]
73
74    public_configs = [ ":endpoint_public" ]
75
76    public_deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
77  }
78} else {
79  defines = [ "MINI_SAMGR_LITE_RPC" ]
80  config("endpoint_public") {
81    include_dirs = [
82      "../samgr/adapter",
83      "//foundation/distributedschedule/samgr_lite/interfaces/kits/samgr",
84      "//foundation/distributedschedule/samgr_lite/interfaces/kits/registry",
85      "//utils/native/lite/include",
86      "//third_party/bounds_checking_function/include",
87      "//base/security/permission/services/permission_lite/ipc_auth/include",
88    ]
89  }
90
91  config("endpoint_internal") {
92    include_dirs = [
93      "./source",
94      "../samgr/registry",
95      "//foundation/distributedschedule/samgr_lite/samgr_server/source",
96      "//base/security/permission/interfaces/innerkits/permission_lite",
97      "//base/security/permission/services/permission_lite/pms_base/include",
98    ]
99  }
100
101  source_set("endpoint_source") {
102    sources = [
103      "source/client_factory.c",
104      "source/default_client_rpc.c",
105      "source/endpoint_rpc.c",
106      "source/token_bucket.c",
107    ]
108
109    cflags = [ "-Wall" ]
110
111    if (ohos_kernel_type == "linux") {
112      defines = [
113        "_GNU_SOURCE",
114        "LITE_LINUX_BINDER_IPC",
115      ]
116    }
117
118    configs += [ ":endpoint_internal" ]
119
120    public_configs = [ ":endpoint_public" ]
121
122    public_deps = [
123      "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_static",
124      "//foundation/communication/ipc/interfaces/innerkits/c/dbinder:dbinder",
125    ]
126  }
127
128  source_set("store_source") {
129    sources = [ "source/sa_store.c" ]
130
131    cflags = [ "-Wall" ]
132
133    configs += [ ":endpoint_internal" ]
134
135    public_configs = [ ":endpoint_public" ]
136    public_deps = [
137      "//foundation/communication/ipc/interfaces/innerkits/c/dbinder:dbinder",
138    ]
139  }
140}
141