• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2021 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("../bytrace.gni")
16
17config("bytrace_osal_inner_config") {
18  visibility = [ ":*" ]
19  include_dirs = [ "./include" ]
20}
21
22ohos_static_library("bytrace_osal_inner") {
23  sources = [ "./src/bytrace_osal.cpp" ]
24  public_configs = [ ":bytrace_osal_inner_config" ]
25  external_deps = [
26    "hitrace:hitrace_meter",
27    "init:libbegetutil",
28  ]
29
30  subsystem_name = "developtools"
31  part_name = "bytrace"
32}
33
34ohos_executable("bytrace") {
35  install_enable = true
36  sources = [ "./src/bytrace_cmd.cpp" ]
37
38  deps = [
39    ":bytrace_osal_inner",
40    "//third_party/zlib:libz",
41  ]
42
43  external_deps = [
44    "c_utils:utils",
45    "hitrace:hitrace_meter",
46  ]
47
48  include_dirs = [
49    "${bytrace_path}/bin/include",
50    "//third_party/zlib",
51  ]
52  subsystem_name = "developtools"
53  part_name = "bytrace"
54}
55
56ohos_prebuilt_etc("bytrace.cfg") {
57  source = "./config/bytrace.cfg"
58  relative_install_dir = "init"
59  subsystem_name = "developtools"
60  part_name = "bytrace"
61}
62
63ohos_executable("bytrace_example") {
64  sources = [ "example/bytrace_example.cpp" ]
65  external_deps = [ "hitrace:hitrace_meter" ]
66  install_enable = false
67  subsystem_name = "developtools"
68  part_name = "bytrace"
69}
70
71group("bytrace_target") {
72  deps = [
73    ":bytrace",
74    ":bytrace_example",
75  ]
76}
77