• 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
16SUBSYSTEM_DIR = "//base/customization/enterprise_device_management"
17EDM_SA_ROOT = "$SUBSYSTEM_DIR/services/edm"
18EDM_SRC_PATH = "$EDM_SA_ROOT/src"
19JSONCPP_INCLUDE_DIR = "//third_party/jsoncpp/include"
20
21config("edm_config") {
22  cflags = [ "-Wno-error=implicit-fallthrough" ]
23  include_dirs = [
24    "//utils/native/base/include",
25    "include",
26    "include/utils",
27    "//utils/native/base:utils_config",
28    JSONCPP_INCLUDE_DIR,
29    "//foundation/appexecfwk/standard/interfaces/innerkits/appexecfwk_core/include/bundlemgr",
30    "$SUBSYSTEM_DIR/common/native/include",
31  ]
32}
33
34ohos_shared_library("edmservice") {
35  sources = [
36    "$EDM_SRC_PATH/admin.cpp",
37    "$EDM_SRC_PATH/admin_manager.cpp",
38    "$EDM_SRC_PATH/edm_permission.cpp",
39    "$EDM_SRC_PATH/enterprise_device_mgr_ability.cpp",
40    "$EDM_SRC_PATH/enterprise_device_mgr_stub.cpp",
41    "$EDM_SRC_PATH/iplugin.cpp",
42    "$EDM_SRC_PATH/permission_manager.cpp",
43    "$EDM_SRC_PATH/plugin_manager.cpp",
44    "$EDM_SRC_PATH/policy_manager.cpp",
45    "$EDM_SRC_PATH/super_admin.cpp",
46    "$EDM_SRC_PATH/utils/array_map_serializer.cpp",
47    "$EDM_SRC_PATH/utils/array_string_serializer.cpp",
48    "$EDM_SRC_PATH/utils/bool_serializer.cpp",
49    "$EDM_SRC_PATH/utils/func_code_utils.cpp",
50    "$EDM_SRC_PATH/utils/json_serializer.cpp",
51    "$EDM_SRC_PATH/utils/long_serializer.cpp",
52    "$EDM_SRC_PATH/utils/map_string_serializer.cpp",
53    "$EDM_SRC_PATH/utils/string_serializer.cpp",
54  ]
55  public_configs = [ ":edm_config" ]
56
57  defines = []
58
59  if (target_cpu == "arm64") {
60    defines += [ "_ARM64_" ]
61    print("defines _ARM64_")
62  }
63
64  external_deps = [
65    "ability_base:want",
66    "ability_runtime:app_manager",
67    "ability_runtime:intent",
68    "access_token:libaccesstoken_sdk",
69    "bundle_framework:appexecfwk_base",
70    "bundle_framework:appexecfwk_core",
71    "enterprise_device_management:edmservice_kits",
72    "ipc:ipc_core",
73    "os_account_standard:libaccountkits",
74    "permission_standard:libpermissionsdk_standard",
75    "safwk:system_ability_fwk",
76    "samgr_standard:samgr_proxy",
77    "startup_l2:syspara",
78  ]
79
80  if (is_standard_system) {
81    external_deps += [ "hiviewdfx_hilog_native:libhilog" ]
82  } else {
83    external_deps += [ "hilog:libhilog" ]
84  }
85
86  deps = [
87    "//third_party/jsoncpp:jsoncpp",
88    "//utils/native/base:utils",
89  ]
90
91  subsystem_name = "customization"
92  part_name = "enterprise_device_management"
93}
94