106f6ba60Sopenharmony_ci# Copyright (C) 2021 Huawei Device Co., Ltd.
206f6ba60Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
306f6ba60Sopenharmony_ci# you may not use this file except in compliance with the License.
406f6ba60Sopenharmony_ci# You may obtain a copy of the License at
506f6ba60Sopenharmony_ci#
606f6ba60Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
706f6ba60Sopenharmony_ci#
806f6ba60Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
906f6ba60Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
1006f6ba60Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1106f6ba60Sopenharmony_ci# See the License for the specific language governing permissions and
1206f6ba60Sopenharmony_ci# limitations under the License.
1306f6ba60Sopenharmony_ci
1406f6ba60Sopenharmony_ciimport("//build/ohos.gni")
1506f6ba60Sopenharmony_ciimport("../../../../build/config.gni")
1606f6ba60Sopenharmony_ci
1706f6ba60Sopenharmony_ci## Build so {{{
1806f6ba60Sopenharmony_ciconfig("config") {
1906f6ba60Sopenharmony_ci  visibility = [ ":*" ]
2006f6ba60Sopenharmony_ci
2106f6ba60Sopenharmony_ci  cflags = [
2206f6ba60Sopenharmony_ci    "-Wall",
2306f6ba60Sopenharmony_ci    "-Werror",
2406f6ba60Sopenharmony_ci    "-g3",
2506f6ba60Sopenharmony_ci    "-Wunused-variable",
2606f6ba60Sopenharmony_ci    "-Wno-unused-but-set-variable",
2706f6ba60Sopenharmony_ci  ]
2806f6ba60Sopenharmony_ci  cflags_cc = [ "-fexceptions" ]
2906f6ba60Sopenharmony_ci}
3006f6ba60Sopenharmony_ci
3106f6ba60Sopenharmony_ciconfig("public_config") {
3206f6ba60Sopenharmony_ci}
3306f6ba60Sopenharmony_ci
3406f6ba60Sopenharmony_ciohos_executable("SP_daemon") {
3506f6ba60Sopenharmony_ci  sources = [
3606f6ba60Sopenharmony_ci    "ByTrace.cpp",
3706f6ba60Sopenharmony_ci    "CPU.cpp",
3806f6ba60Sopenharmony_ci    "Capture.cpp",
3906f6ba60Sopenharmony_ci    "DDR.cpp",
4006f6ba60Sopenharmony_ci    "Dubai.cpp",
4106f6ba60Sopenharmony_ci    "FPS.cpp",
4206f6ba60Sopenharmony_ci    "GPU.cpp",
4306f6ba60Sopenharmony_ci    "GpuCounter.cpp",
4406f6ba60Sopenharmony_ci    "GpuCounterCallback.cpp",
4506f6ba60Sopenharmony_ci    "Network.cpp",
4606f6ba60Sopenharmony_ci    "Power.cpp",
4706f6ba60Sopenharmony_ci    "RAM.cpp",
4806f6ba60Sopenharmony_ci    "Temperature.cpp",
4906f6ba60Sopenharmony_ci    "client_control.cpp",
5006f6ba60Sopenharmony_ci    "control_call_cmd.cpp",
5106f6ba60Sopenharmony_ci    "editor_command.cpp",
5206f6ba60Sopenharmony_ci    "heartbeat.cpp",
5306f6ba60Sopenharmony_ci    "navigation.cpp",
5406f6ba60Sopenharmony_ci    "parse_click_complete_trace.cpp",
5506f6ba60Sopenharmony_ci    "parse_click_response_trace.cpp",
5606f6ba60Sopenharmony_ci    "parse_radar.cpp",
5706f6ba60Sopenharmony_ci    "parse_slide_fps_trace.cpp",
5806f6ba60Sopenharmony_ci    "profiler_fps.cpp",
5906f6ba60Sopenharmony_ci    "sdk_data_recv.cpp",
6006f6ba60Sopenharmony_ci    "smartperf_command.cpp",
6106f6ba60Sopenharmony_ci    "smartperf_main.cpp",
6206f6ba60Sopenharmony_ci    "sp_log.cpp",
6306f6ba60Sopenharmony_ci    "sp_profiler_factory.cpp",
6406f6ba60Sopenharmony_ci    "sp_server_socket.cpp",
6506f6ba60Sopenharmony_ci    "sp_task.cpp",
6606f6ba60Sopenharmony_ci    "sp_utils.cpp",
6706f6ba60Sopenharmony_ci    "stalling_rate_trace.cpp",
6806f6ba60Sopenharmony_ci    "startup_delay.cpp",
6906f6ba60Sopenharmony_ci  ]
7006f6ba60Sopenharmony_ci  include_dirs = [ "include" ]
7106f6ba60Sopenharmony_ci  configs = [ ":config" ]
7206f6ba60Sopenharmony_ci  deps = [ "//third_party/libpng:libpng" ]
7306f6ba60Sopenharmony_ci  subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}"
7406f6ba60Sopenharmony_ci  part_name = "${OHOS_PROFILER_PART_NAME}"
7506f6ba60Sopenharmony_ci  external_deps = [
7606f6ba60Sopenharmony_ci    "c_utils:utils",
7706f6ba60Sopenharmony_ci    "hilog:libhilog",
7806f6ba60Sopenharmony_ci    "hiview:libucollection_utility",
7906f6ba60Sopenharmony_ci    "image_framework:image_native",
8006f6ba60Sopenharmony_ci    "init:libbegetutil",
8106f6ba60Sopenharmony_ci    "window_manager:libdm",
8206f6ba60Sopenharmony_ci    "window_manager:libwm",
8306f6ba60Sopenharmony_ci  ]
8406f6ba60Sopenharmony_ci  defines = [
8506f6ba60Sopenharmony_ci    "HI_LOG_ENABLE",
8606f6ba60Sopenharmony_ci    "LOG_DOMAIN = 0xD004100",
8706f6ba60Sopenharmony_ci  ]
8806f6ba60Sopenharmony_ci}
8906f6ba60Sopenharmony_ci## Build so }}}
90