• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-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
16config("libhitrace_pub_config") {
17  visibility = [ ":*" ]
18
19  include_dirs = [ "include" ]
20}
21
22ohos_shared_library("libhitracechain") {
23  public_configs = [ ":libhitrace_pub_config" ]
24
25  deps = [ "//base/hiviewdfx/hitrace/frameworks/native:hitracechain_source" ]
26
27  external_deps = [ "hilog_native:libhilog" ]
28
29  output_extension = "so"
30  if (build_public_version) {
31    install_enable = true
32  } else {
33    install_enable = false
34  }
35
36  part_name = "hitrace_native"
37  subsystem_name = "hiviewdfx"
38}
39
40config("hitrace_meter_config") {
41  visibility = [ ":*" ]
42  include_dirs = [ "include/hitrace_meter" ]
43}
44
45ohos_static_library("hitrace_inner") {
46  sources = [ "src/hitrace_meter.cpp" ]
47  public_configs = [ ":hitrace_meter_config" ]
48  external_deps = [
49    "hilog_native:libhilog",
50    "init:libbeget_proxy",
51    "init:libbegetutil",
52  ]
53
54  part_name = "hitrace_native"
55  subsystem_name = "hiviewdfx"
56}
57
58ohos_shared_library("hitrace_meter") {
59  public_configs = [ ":hitrace_meter_config" ]
60  deps = [
61    ":hitrace_etc",
62    ":hitrace_inner",
63  ]
64  external_deps = [ "c_utils:utils" ]
65  include_dirs = [ "//commonlibrary/c_utils/base/include" ]
66  output_extension = "so"
67
68  part_name = "hitrace_native"
69  subsystem_name = "hiviewdfx"
70}
71
72ohos_prebuilt_etc("hitrace.para") {
73  source = "hitrace.para"
74  install_images = [
75    "system",
76    "updater",
77  ]
78  module_install_dir = "etc/param"
79  part_name = "hitrace_native"
80  subsystem_name = "hiviewdfx"
81}
82
83ohos_prebuilt_etc("hitrace.para.dac") {
84  source = "hitrace.para.dac"
85  install_images = [
86    "system",
87    "updater",
88  ]
89  module_install_dir = "etc/param"
90  part_name = "hitrace_native"
91  subsystem_name = "hiviewdfx"
92}
93
94group("hitrace_etc") {
95  deps = [
96    ":hitrace.para",
97    ":hitrace.para.dac",
98  ]
99}
100