1# Copyright (c) 2021-2023 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("//foundation/ability/ability_base/ability_base.gni") 16import("//foundation/ability/ability_runtime/ability_runtime.gni") 17 18config("appmgr_sdk_config") { 19 include_dirs = [ 20 "include/appmgr", 21 "${ability_base_innerapi_path}/log/include", 22 "${ability_base_kits_path}/configuration/include", 23 "${ability_base_kits_path}/want/include", 24 "${ability_runtime_path}/interfaces/kits/native/ability/native", 25 "${ability_runtime_innerkits_path}/ability_manager/include", 26 "${bundlefwk_inner_api_path}/appexecfwk_base/include", 27 ] 28 defines = [] 29 if (ability_command_for_test) { 30 defines += [ "ABILITY_COMMAND_FOR_TEST" ] 31 } 32} 33 34config("appmgr_core_config") { 35 include_dirs = [ "include" ] 36 defines = [] 37 if (ability_command_for_test) { 38 defines += [ "ABILITY_COMMAND_FOR_TEST" ] 39 } 40} 41 42ohos_shared_library("app_manager") { 43 include_dirs = [ 44 "//third_party/json/include", 45 "${ability_runtime_path}/interfaces/kits/native/appkit/dfr", 46 "${ability_runtime_services_path}/appdfr/include", 47 "${ability_runtime_services_path}/appmgr/include", 48 "${ability_runtime_services_path}/common/include", 49 ] 50 51 sources = [ 52 "${ability_runtime_services_path}/appdfr/src/appfreeze_manager.cpp", 53 "src/appmgr/ability_controller_proxy.cpp", 54 "src/appmgr/ability_controller_stub.cpp", 55 "src/appmgr/ability_debug_response_proxy.cpp", 56 "src/appmgr/ability_debug_response_stub.cpp", 57 "src/appmgr/ability_foreground_state_observer_proxy.cpp", 58 "src/appmgr/ability_foreground_state_observer_stub.cpp", 59 "src/appmgr/ability_info_callback_proxy.cpp", 60 "src/appmgr/ability_info_callback_stub.cpp", 61 "src/appmgr/ability_state_data.cpp", 62 "src/appmgr/ams_mgr_proxy.cpp", 63 "src/appmgr/ams_mgr_stub.cpp", 64 "src/appmgr/app_debug_info.cpp", 65 "src/appmgr/app_debug_listener_proxy.cpp", 66 "src/appmgr/app_debug_listener_stub.cpp", 67 "src/appmgr/app_foreground_state_observer_proxy.cpp", 68 "src/appmgr/app_foreground_state_observer_stub.cpp", 69 "src/appmgr/app_launch_data.cpp", 70 "src/appmgr/app_malloc_info.cpp", 71 "src/appmgr/app_mgr_client.cpp", 72 "src/appmgr/app_mgr_proxy.cpp", 73 "src/appmgr/app_mgr_stub.cpp", 74 "src/appmgr/app_process_data.cpp", 75 "src/appmgr/app_record_id.cpp", 76 "src/appmgr/app_running_status_proxy.cpp", 77 "src/appmgr/app_running_status_stub.cpp", 78 "src/appmgr/app_scheduler_host.cpp", 79 "src/appmgr/app_scheduler_proxy.cpp", 80 "src/appmgr/app_service_manager.cpp", 81 "src/appmgr/app_state_callback_host.cpp", 82 "src/appmgr/app_state_callback_proxy.cpp", 83 "src/appmgr/app_state_data.cpp", 84 "src/appmgr/app_task_info.cpp", 85 "src/appmgr/application_state_observer_proxy.cpp", 86 "src/appmgr/application_state_observer_stub.cpp", 87 "src/appmgr/child_process_info.cpp", 88 "src/appmgr/child_scheduler_proxy.cpp", 89 "src/appmgr/child_scheduler_stub.cpp", 90 "src/appmgr/configuration_observer_proxy.cpp", 91 "src/appmgr/configuration_observer_stub.cpp", 92 "src/appmgr/fault_data.cpp", 93 "src/appmgr/page_state_data.cpp", 94 "src/appmgr/priority_object.cpp", 95 "src/appmgr/process_data.cpp", 96 "src/appmgr/process_info.cpp", 97 "src/appmgr/profile.cpp", 98 "src/appmgr/quick_fix_callback_proxy.cpp", 99 "src/appmgr/quick_fix_callback_stub.cpp", 100 "src/appmgr/render_process_info.cpp", 101 "src/appmgr/render_scheduler_host.cpp", 102 "src/appmgr/render_scheduler_proxy.cpp", 103 "src/appmgr/running_process_info.cpp", 104 "src/appmgr/start_specified_ability_response_proxy.cpp", 105 "src/appmgr/start_specified_ability_response_stub.cpp", 106 "src/appmgr/system_memory_attr.cpp", 107 ] 108 109 public_configs = [ 110 ":appmgr_core_config", 111 ":appmgr_sdk_config", 112 ] 113 114 defines = [ "AMS_LOG_TAG = \"AppexecfwkCore\"" ] 115 defines += [ "AMS_LOG_DOMAIN = 0xD001306" ] 116 cflags = [] 117 if (target_cpu == "arm") { 118 cflags += [ "-DBINDER_IPC_32BIT" ] 119 } 120 deps = [ "${ability_runtime_path}/utils/global/freeze:freeze_util" ] 121 122 external_deps = [ 123 "ability_base:configuration", 124 "ability_base:want", 125 "bundle_framework:appexecfwk_base", 126 "c_utils:utils", 127 "faultloggerd:libdfx_dumpcatcher", 128 "faultloggerd:libfaultloggerd", 129 "ffrt:libffrt", 130 "hilog:libhilog", 131 "hisysevent:libhisysevent", 132 "hitrace:hitrace_meter", 133 "init:libbegetutil", 134 "ipc:ipc_core", 135 "samgr:samgr_proxy", 136 ] 137 138 if (background_task_mgr_continuous_task_enable) { 139 defines += [ "BGTASKMGR_CONTINUOUS_TASK_ENABLE" ] 140 } 141 142 innerapi_tags = [ "platformsdk" ] 143 subsystem_name = "ability" 144 part_name = "ability_runtime" 145} 146