1# Copyright (C) 2023 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("//foundation/multimedia/av_codec/config.gni")
16
17config("av_codec_service_log_dfx_public_config") {
18  cflags = [ "-DOHOS_AV_CODEC_LOG_DFX" ]
19  include_dirs = [ "$av_codec_root_dir/services/dfx/include" ]
20}
21
22ohos_shared_library("av_codec_service_dfx") {
23  branch_protector_ret = "pac_ret"
24  install_enable = true
25
26  sanitize = av_codec_sanitize
27
28  sources = [
29    "avcodec_dump_utils.cpp",
30    "avcodec_sysevent.cpp",
31    "avcodec_trace.cpp",
32    "avcodec_xcollie.cpp",
33  ]
34
35  include_dirs = [
36    "./include",
37    "$av_codec_root_dir/interfaces/inner_api/native",
38    "$av_codec_root_dir/interfaces/kits/c",
39  ]
40
41  defines = []
42  defines += av_codec_defines
43
44  cflags = [
45    "-std=c++17",
46    "-fno-rtti",
47    "-fno-exceptions",
48    "-Wall",
49    "-fno-common",
50    "-fstack-protector-strong",
51    "-Wshadow",
52    "-FPIC",
53    "-FS",
54    "-O2",
55    "-D_FORTIFY_SOURCE=2",
56    "-fvisibility=hidden",
57    "-Wformat=2",
58    "-Wfloat-equal",
59    "-Wdate-time",
60    "-Werror",
61    "-Wextra",
62    "-Wimplicit-fallthrough",
63    "-Wsign-compare",
64    "-Wunused-parameter",
65  ]
66
67  external_deps = [
68    "c_utils:utils",
69    "hicollie:libhicollie",
70    "hidumper:lib_dump_usage",
71    "hilog:libhilog",
72    "hisysevent:libhisysevent",
73    "hitrace:hitrace_meter",
74    "init:libbegetutil",
75    "media_foundation:media_foundation",
76  ]
77
78  subsystem_name = "multimedia"
79  part_name = "av_codec"
80}
81