1# Copyright (c) 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("hitrace_osal_inner_config") { 17 visibility = [ ":*" ] 18 include_dirs = [ 19 "./include", 20 "//base/hiviewdfx/hitrace/interfaces/native/innerkits/include/hitrace_meter", 21 ] 22} 23 24ohos_static_library("hitrace_osal_inner") { 25 sources = [ "./src/hitrace_osal.cpp" ] 26 public_configs = [ ":hitrace_osal_inner_config" ] 27 external_deps = [ "init:libbegetutil" ] 28 29 subsystem_name = "hiviewdfx" 30 part_name = "hitrace_native" 31} 32 33ohos_executable("hitrace") { 34 install_enable = true 35 sources = [ "./src/hitrace_cmd.cpp" ] 36 37 deps = [ 38 ":hitrace_osal_inner", 39 "//third_party/zlib:libz", 40 ] 41 42 external_deps = [ "c_utils:utils" ] 43 44 include_dirs = [ 45 "./include", 46 "//commonlibrary/c_utils/base/include", 47 "//third_party/zlib", 48 ] 49 subsystem_name = "hiviewdfx" 50 part_name = "hitrace_native" 51} 52 53ohos_prebuilt_etc("hitrace.cfg") { 54 source = "./config/hitrace.cfg" 55 relative_install_dir = "init" 56 subsystem_name = "hiviewdfx" 57 part_name = "hitrace_native" 58} 59 60ohos_executable("hitrace_example") { 61 sources = [ "example/hitrace_example.cpp" ] 62 63 external_deps = [ "hitrace_native:hitrace_meter" ] 64 install_enable = false 65 subsystem_name = "hiviewdfx" 66 part_name = "hitrace_native" 67} 68 69group("hitrace_target") { 70 deps = [ 71 ":hitrace", 72 ":hitrace_example", 73 ] 74} 75