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
16config("samgr_source_public") {
17  include_dirs = [
18    "../adapter",
19    "../registry",
20    "//commonlibrary/utils_lite/include",
21    "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/registry",
22    "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr",
23  ]
24}
25
26if (ohos_kernel_type == "liteos_m" || ohos_kernel_type == "uniproton") {
27  static_library("samgr_source") {
28    sources = [
29      "common.c",
30      "feature.c",
31      "iunknown.c",
32      "message.c",
33      "service.c",
34      "task_manager.c",
35    ]
36
37    public_configs = [ ":samgr_source_public" ]
38
39    public_deps = [
40      "//foundation/systemabilitymgr/samgr_lite/samgr/adapter:samgr_adapter",
41    ]
42
43    include_dirs =
44        [ "//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog_lite" ]
45
46    if (enable_ohos_systemabilitymgr_samgr_lite_rpc_mini) {
47      public_deps += [
48        "//foundation/communication/ipc/interfaces/innerkits/c/dbinder:dbinder",
49      ]
50    }
51  }
52}
53
54if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") {
55  source_set("samgr_source") {
56    sources = [
57      "common.c",
58      "feature.c",
59      "iunknown.c",
60      "message.c",
61      "service.c",
62      "task_manager.c",
63    ]
64
65    cflags = [
66      "-fPIC",
67      "-Wall",
68    ]
69
70    public_configs = [ ":samgr_source_public" ]
71
72    public_deps = [
73      "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
74      "//foundation/systemabilitymgr/samgr_lite/samgr/adapter:samgr_adapter",
75    ]
76
77    include_dirs = [ "//third_party/bounds_checking_function/include" ]
78  }
79}
80