• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2023-2024 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")
15import("../config/common.gni")
16
17config("edm_commom_public_configs") {
18  include_dirs = [
19    "include",
20    "include/plugin_utils",
21  ]
22}
23
24ohos_shared_library("edm_commom") {
25  sources = [
26    "./src/bundle_manager_utils.cpp",
27    "./src/edm_data_ability_utils.cpp",
28    "./src/edm_sys_manager.cpp",
29    "./src/edm_utils.cpp",
30    "./src/plugin_utils/domain_filter_rule.cpp",
31    "./src/plugin_utils/firewall_rule.cpp",
32    "./src/plugin_utils/iptables_utils.cpp",
33    "./src/plugin_utils/message_parcel_utils.cpp",
34    "./src/plugin_utils/password_policy_utils.cpp",
35    "./src/security_report.cpp",
36    "./src/usb_device_id.cpp",
37    "./src/wifi_id.cpp",
38  ]
39
40  configs = [
41    ":edm_commom_public_configs",
42    "../../common/config:coverage_flags",
43  ]
44
45  public_configs = [ ":edm_commom_public_configs" ]
46
47  external_deps = [
48    "ability_base:zuri",
49    "bounds_checking_function:libsec_shared",
50    "bundle_framework:appexecfwk_core",
51    "cJSON:cjson",
52    "c_utils:utils",
53    "data_share:datashare_consumer",
54    "hilog:libhilog",
55    "ipc:ipc_core",
56    "samgr:samgr_proxy",
57  ]
58
59  defines = []
60  if (os_account_edm_enable) {
61    external_deps += [ "os_account:os_account_innerkits" ]
62    defines += [ "OS_ACCOUNT_EDM_ENABLE" ]
63  }
64
65  if (wifi_edm_enable) {
66    external_deps += [ "wifi:wifi_sdk" ]
67    defines += [ "WIFI_EDM_ENABLE" ]
68  }
69  if (!defined(global_parts_info) ||
70      defined(global_parts_info.security_security_guard)) {
71    external_deps += [ "security_guard:libsg_collect_sdk" ]
72    cflags_cc = [ "-DSECURITY_GUARDE_ENABLE" ]
73  }
74
75  sanitize = {
76    boundary_sanitize = true
77    cfi = true
78    cfi_cross_dso = true
79    debug = false
80    integer_overflow = true
81    ubsan = true
82  }
83  branch_protector_ret = "pac_ret"
84  innerapi_tags = [ "platformsdk" ]
85  subsystem_name = "customization"
86  part_name = "enterprise_device_management"
87}
88