• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 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
16config("device_security_level_sdk_config") {
17  include_dirs = [ "include" ]
18}
19
20group("fwk_group") {
21  if (os_level == "standard") {
22    deps = [ ":dslm_sdk" ]
23  } else if (os_level == "small") {
24    deps = [ ":dslm_sdk_small" ]
25  }
26}
27
28if (os_level == "standard") {
29  ohos_shared_library("dslm_sdk") {
30    sources = [
31      "src/standard/device_security_info.cpp",
32      "src/standard/device_security_level_callback_helper.cpp",
33      "src/standard/device_security_level_callback_stub.cpp",
34      "src/standard/device_security_level_loader.cpp",
35      "src/standard/device_security_level_proxy.cpp",
36    ]
37
38    include_dirs = [
39      "../../services/include",
40      "../../common/include",
41    ]
42
43    configs = [ "../../common:common_configs" ]
44
45    public_configs = [ ":device_security_level_sdk_config" ]
46
47    external_deps = [
48      "c_utils:utils",
49      "hilog:libhilog",
50      "ipc:ipc_core",
51      "samgr:samgr_proxy",
52    ]
53
54    part_name = "device_security_level"
55    subsystem_name = "security"
56  }
57} else if (os_level == "small") {
58  ohos_shared_library("dslm_sdk_small") {
59    sources = [
60      "src/lite/device_security_info.c",
61      "src/lite/device_security_level_proxy.c",
62    ]
63
64    include_dirs = [
65      "../../services/include",
66      "../../common/include",
67    ]
68
69    configs = [
70      "../../common:common_configs",
71      "../../common:common_lite_configs",
72    ]
73
74    public_configs = [ ":device_security_level_sdk_config" ]
75
76    deps = [
77      "../../baselib/utils:utils_static",
78      "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
79      "//foundation/communication/ipc/interfaces/innerkits/c/ipc:ipc_single",
80      "//foundation/systemabilitymgr/samgr_lite/samgr:samgr",
81    ]
82
83    part_name = "device_security_level"
84    subsystem_name = "security"
85  }
86
87  group("dslm_sdk") {
88  }
89}
90