1// DO NOT DEPEND ON THIS DIRECTLY
2// use libcodec2_soft-defaults instead
3package {
4    // See: http://go/android-license-faq
5    // A large-scale-change added 'default_applicable_licenses' to import
6    // all of the 'license_kinds' from "frameworks_av_license"
7    // to get the below license kinds:
8    //   SPDX-license-identifier-Apache-2.0
9    default_applicable_licenses: ["frameworks_av_license"],
10}
11
12cc_library {
13    name: "libcodec2_soft_common",
14    defaults: ["libcodec2-impl-defaults"],
15    vendor_available: true,
16
17    srcs: [
18        "SimpleC2Component.cpp",
19        "SimpleC2Interface.cpp",
20    ],
21
22    export_include_dirs: [
23        "include",
24    ],
25
26    export_shared_lib_headers: [
27        "libsfplugin_ccodec_utils",
28    ],
29
30    shared_libs: [
31        "libcutils", // for properties
32        "liblog", // for ALOG
33        "libsfplugin_ccodec_utils", // for ImageCopy
34        "libstagefright_foundation", // for Mutexed
35    ],
36
37    sanitize: {
38        misc_undefined: [
39            "unsigned-integer-overflow",
40            "signed-integer-overflow",
41        ],
42        cfi: true,
43    },
44
45    ldflags: ["-Wl,-Bsymbolic"],
46}
47
48filegroup {
49    name: "codec2_soft_exports",
50    srcs: ["exports.lds"],
51}
52
53// public dependency for software codec implementation
54// to be used by code under media/codecs/* only as its stability is not guaranteed
55cc_defaults {
56    name: "libcodec2_soft-defaults",
57    defaults: ["libcodec2-impl-defaults"],
58    vendor_available: true,
59    version_script: ":codec2_soft_exports",
60    export_shared_lib_headers: [
61        "libsfplugin_ccodec_utils",
62    ],
63
64    shared_libs: [
65        "libcodec2_soft_common",
66        "libcutils", // for properties
67        "liblog", // for ALOG
68        "libsfplugin_ccodec_utils", // for ImageCopy
69        "libstagefright_foundation", // for ColorUtils and MIME
70    ],
71
72    cflags: [
73        "-Wall",
74        "-Werror",
75    ],
76
77    ldflags: ["-Wl,-Bsymbolic"],
78}
79
80// public dependency for software codec implementation
81// to be used by code under media/codecs/* only
82cc_defaults {
83    name: "libcodec2_soft_sanitize_all-defaults",
84
85    sanitize: {
86        misc_undefined: [
87            "unsigned-integer-overflow",
88            "signed-integer-overflow",
89        ],
90        cfi: true,
91    },
92}
93
94// public dependency for software codec implementation
95// to be used by code under media/codecs/* only
96cc_defaults {
97    name: "libcodec2_soft_sanitize_signed-defaults",
98
99    sanitize: {
100        misc_undefined: [
101            "signed-integer-overflow",
102        ],
103    },
104}
105
106cc_defaults {
107    name: "libcodec2_soft_sanitize_cfi-defaults",
108
109    sanitize: {
110        cfi: true,
111        config: {
112            cfi_assembly_support: true,
113        },
114    },
115}
116
117// TEMP: used by cheets2 project - remove when no longer used
118cc_library {
119    name: "libcodec2_simple_component",
120    vendor_available: true,
121
122    srcs: [
123        "SimpleC2Interface.cpp",
124    ],
125
126    local_include_dirs: [
127        "include",
128    ],
129
130    export_include_dirs: [
131        "include",
132    ],
133
134    shared_libs: [
135        "libcodec2",
136        "libcodec2_vndk",
137        "libcutils",
138        "liblog",
139        "libstagefright_foundation",
140        "libutils",
141    ],
142
143    sanitize: {
144        misc_undefined: [
145            "unsigned-integer-overflow",
146            "signed-integer-overflow",
147        ],
148        cfi: true,
149    },
150
151    ldflags: ["-Wl,-Bsymbolic"],
152}
153