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