1/*
2 * Copyright (C) 2019 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package {
18    // See: http://go/android-license-faq
19    // A large-scale-change added 'default_applicable_licenses' to import
20    // all of the 'license_kinds' from "frameworks_av_license"
21    // to get the below license kinds:
22    //   SPDX-license-identifier-Apache-2.0
23    default_applicable_licenses: ["frameworks_av_license"],
24}
25
26cc_library_static {
27    name: "libmediabenchmark_common",
28    defaults: [
29        "libmediabenchmark-defaults",
30        "libmediabenchmark_soft_sanitize_all-defaults",
31    ],
32
33    srcs: [
34        "BenchmarkCommon.cpp",
35        "Stats.cpp",
36        "utils/Timers.cpp",
37    ],
38
39    export_include_dirs: ["."],
40
41    ldflags: ["-Wl,-Bsymbolic"],
42}
43
44cc_defaults {
45    name: "libmediabenchmark_common-defaults",
46
47    defaults: [
48        "libmediabenchmark-defaults",
49    ],
50
51    static_libs: [
52        "libmediabenchmark_common",
53    ],
54}
55
56cc_defaults {
57    name: "libmediabenchmark-defaults",
58    sdk_version: "current",
59    stl: "c++_shared",
60
61    shared_libs: [
62        "libmediandk",
63        "liblog",
64    ],
65
66    cflags: [
67        "-Wall",
68        "-Werror",
69    ],
70}
71
72cc_library_static {
73    name: "libmediabenchmark_codec2_common",
74    defaults: [
75        "libmediabenchmark_codec2_common-defaults",
76    ],
77
78    srcs: [
79        "BenchmarkC2Common.cpp",
80        "BenchmarkCommon.cpp",
81        "Stats.cpp",
82        "utils/Timers.cpp",
83    ],
84
85    export_include_dirs: ["."],
86
87    ldflags: ["-Wl,-Bsymbolic"],
88}
89
90cc_defaults {
91    name: "libmediabenchmark_codec2_common-defaults",
92
93    defaults: [
94        "libcodec2-hidl-client-defaults",
95        "libmediabenchmark_soft_sanitize_all-defaults",
96    ],
97
98    include_dirs: [
99        "frameworks/av/media/codec2/hidl/client/include",
100    ],
101
102    shared_libs: [
103        "libcodec2_client",
104        "libmediandk",
105        "liblog",
106    ],
107
108    cflags: [
109        "-Wall",
110        "-Werror",
111    ],
112}
113
114// public dependency for native implementation
115// to be used by code under media/benchmark/* only
116cc_defaults {
117    name: "libmediabenchmark_soft_sanitize_all-defaults",
118
119    sanitize: {
120        misc_undefined: [
121            "unsigned-integer-overflow",
122            "signed-integer-overflow",
123        ],
124        cfi: true,
125    },
126}
127