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("//developtools/bytrace/bytrace.gni") 16 17config("bytrace_osal_inner_config") { 18 visibility = [ ":*" ] 19 include_dirs = [ 20 "./include", 21 "//base/hiviewdfx/hitrace/interfaces/native/innerkits/include/hitrace_meter", 22 ] 23} 24 25ohos_static_library("bytrace_osal_inner") { 26 sources = [ "./src/bytrace_osal.cpp" ] 27 public_configs = [ ":bytrace_osal_inner_config" ] 28 external_deps = [ "init:libbegetutil" ] 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 = [ "c_utils:utils" ] 44 45 include_dirs = [ 46 "${bytrace_path}/bin/include", 47 "//base/hiviewdfx/hitrace/interfaces/native/innerkits/include/hitrace_meter", 48 "//commonlibrary/c_utils/base/include", 49 "//third_party/zlib", 50 ] 51 subsystem_name = "developtools" 52 part_name = "bytrace" 53} 54 55ohos_prebuilt_etc("bytrace.cfg") { 56 source = "./config/bytrace.cfg" 57 relative_install_dir = "init" 58 subsystem_name = "developtools" 59 part_name = "bytrace" 60} 61 62ohos_executable("bytrace_example") { 63 sources = [ "example/bytrace_example.cpp" ] 64 external_deps = [ "hitrace_native:hitrace_meter" ] 65 install_enable = false 66 subsystem_name = "developtools" 67 part_name = "bytrace" 68} 69 70group("bytrace_target") { 71 deps = [ 72 ":bytrace", 73 ":bytrace_example", 74 ] 75} 76