1# Copyright (c) 2022-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("../soc_perf.gni") 16 17config("socperf_server_config") { 18 include_dirs = [ 19 "core/include", 20 "server/include", 21 "${socperf_common}/include", 22 "${socperf_interfaces}/inner_api/socperf_client/include", 23 ] 24} 25 26ohos_shared_library("socperf_server") { 27 configs = [ ":socperf_server_config" ] 28 29 sources = [ 30 "${socperf_common}/src/socperf_log.cpp", 31 "core/src/socperf.cpp", 32 "core/src/socperf_handler.cpp", 33 "server/src/socperf_server.cpp", 34 "server/src/socperf_stub.cpp", 35 ] 36 37 deps = [ "//third_party/libxml2:xml2" ] 38 39 external_deps = [ 40 "c_utils:utils", 41 "eventhandler:libeventhandler", 42 "hilog:libhilog", 43 "hitrace:hitrace_meter", 44 "ipc:ipc_single", 45 "safwk:system_ability_fwk", 46 "samgr:samgr_proxy", 47 ] 48 49 defines = [] 50 if (customization_config_policy_enable) { 51 external_deps += [ "config_policy:configpolicy_util" ] 52 defines += [ "CUSTOMIZATION_CONFIG_POLICY_ENABLE" ] 53 } 54 55 shlib_type = "sa" 56 part_name = "soc_perf" 57 subsystem_name = "resourceschedule" 58} 59 60ohos_static_library("socperf_server_static") { 61 configs = [ ":socperf_server_config" ] 62 63 sources = [ 64 "${socperf_common}/src/socperf_log.cpp", 65 "core/src/socperf.cpp", 66 "core/src/socperf_handler.cpp", 67 "server/src/socperf_server.cpp", 68 "server/src/socperf_stub.cpp", 69 ] 70 71 deps = [ "//third_party/libxml2:xml2" ] 72 73 external_deps = [ 74 "c_utils:utils", 75 "eventhandler:libeventhandler", 76 "hilog:libhilog", 77 "hitrace:hitrace_meter", 78 "ipc:ipc_single", 79 "safwk:system_ability_fwk", 80 "samgr:samgr_proxy", 81 ] 82 83 defines = [] 84 if (customization_config_policy_enable) { 85 external_deps += [ "config_policy:configpolicy_util" ] 86 defines += [ "CUSTOMIZATION_CONFIG_POLICY_ENABLE" ] 87 } 88 89 part_name = "soc_perf" 90 subsystem_name = "resourceschedule" 91} 92