• 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("//base/customization/enterprise_device_management/edm.gni")
15import("//build/ohos.gni")
16
17config("edm_config") {
18  cflags = [ "-Wno-error=implicit-fallthrough" ]
19  include_dirs = [
20    "include",
21    "include/utils",
22    "include/connection",
23    JSONCPP_INCLUDE_DIR,
24    "$SUBSYSTEM_DIR/common/native/include",
25    "$SUBSYSTEM_DIR/framework/extension/include",
26  ]
27}
28
29ohos_shared_library("edmservice") {
30  sources = [
31    "$EDM_SRC_PATH/ability_manager_death_recipient.cpp",
32    "$EDM_SRC_PATH/admin.cpp",
33    "$EDM_SRC_PATH/admin_manager.cpp",
34    "$EDM_SRC_PATH/connection/enterprise_admin_connection.cpp",
35    "$EDM_SRC_PATH/connection/enterprise_admin_proxy.cpp",
36    "$EDM_SRC_PATH/connection/enterprise_bundle_connection.cpp",
37    "$EDM_SRC_PATH/connection/enterprise_conn_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    "$SUBSYSTEM_DIR/common/native/src/edm_sys_manager.cpp",
55  ]
56  public_configs = [
57    ":edm_config",
58    "//base/customization/enterprise_device_management/common/config:coverage_flags",
59  ]
60
61  defines = []
62
63  if (target_cpu == "arm64") {
64    defines += [ "_ARM64_" ]
65    print("defines _ARM64_")
66  }
67
68  external_deps = [
69    "ability_base:want",
70    "ability_runtime:ability_manager",
71    "access_token:libaccesstoken_sdk",
72    "bundle_framework:appexecfwk_base",
73    "bundle_framework:appexecfwk_core",
74    "c_utils:utils",
75    "common_event_service:cesfwk_innerkits",
76    "ipc:ipc_core",
77    "os_account:os_account_innerkits",
78    "safwk:system_ability_fwk",
79    "samgr:samgr_proxy",
80  ]
81
82  if (is_standard_system) {
83    external_deps += [ "hiviewdfx_hilog_native:libhilog" ]
84  } else {
85    external_deps += [ "hilog:libhilog" ]
86  }
87
88  deps = [
89    "$EDM_INNERKITS_PATH:edmservice_kits",
90    "//third_party/jsoncpp:jsoncpp",
91  ]
92
93  subsystem_name = "customization"
94  part_name = "enterprise_device_management"
95}
96