1//
2// libmediadrm
3//
4
5package {
6    // See: http://go/android-license-faq
7    // A large-scale-change added 'default_applicable_licenses' to import
8    // all of the 'license_kinds' from "frameworks_av_license"
9    // to get the below license kinds:
10    //   SPDX-license-identifier-Apache-2.0
11    default_applicable_licenses: ["frameworks_av_license"],
12}
13
14cc_library_headers {
15    name: "libmediadrm_headers",
16
17    export_include_dirs: [
18        "interface"
19    ],
20
21}
22
23cc_library {
24    name: "libmediadrm",
25
26    srcs: [
27        "DrmPluginPath.cpp",
28        "DrmSessionManager.cpp",
29        "SharedLibrary.cpp",
30        "DrmHal.cpp",
31        "DrmHalHidl.cpp",
32        "DrmHalAidl.cpp",
33        "CryptoHal.cpp",
34        "CryptoHalHidl.cpp",
35        "CryptoHalAidl.cpp",
36        "DrmUtils.cpp",
37        "DrmHalListener.cpp",
38        "DrmStatus.cpp",
39        "DrmMetricsLogger.cpp",
40    ],
41
42    local_include_dirs: [
43        "include",
44        "interface"
45    ],
46
47    export_include_dirs: [
48        "include"
49    ],
50
51    header_libs: [
52        "libmedia_headers",
53    ],
54
55    shared_libs: [
56        "libbinder_ndk",
57        "libcutils",
58        "libdl",
59        "liblog",
60        "libmedia",
61        "libmediadrmmetrics_lite",
62        "libmediametrics#1",
63        "libmediautils",
64        "libstagefright_foundation",
65        "libutils",
66        "android.hardware.drm@1.0",
67        "android.hardware.drm@1.1",
68        "android.hardware.drm@1.2",
69        "android.hardware.drm@1.3",
70        "android.hardware.drm@1.4",
71        "libhidlallocatorutils",
72        "libhidlbase",
73        "android.hardware.drm-V1-ndk",
74    ],
75
76    static_libs: [
77        "resourcemanager_aidl_interface-ndk",
78        "libaidlcommonsupport",
79        "libjsoncpp",
80    ],
81
82    export_shared_lib_headers: [
83        "android.hardware.drm@1.0",
84        "android.hardware.drm@1.1",
85        "android.hardware.drm@1.2",
86        "android.hardware.drm@1.4",
87    ],
88
89    cflags: [
90        "-Werror",
91        "-Wall",
92    ],
93}
94
95// This is the version of the drm metrics configured for protobuf lite.
96cc_library_shared {
97    name: "libmediadrmmetrics_lite",
98    srcs: [
99        "DrmMetrics.cpp",
100        "PluginMetricsReporting.cpp",
101        "protos/metrics.proto",
102    ],
103
104    local_include_dirs: [
105        "include"
106    ],
107
108    proto: {
109        export_proto_headers: true,
110        type: "lite",
111    },
112    header_libs: [
113        "libmedia_headers",
114    ],
115    shared_libs: [
116        "android.hardware.drm@1.0",
117        "android.hardware.drm@1.1",
118        "android.hardware.drm@1.2",
119        "liblog",
120        "libmediametrics",
121        "libprotobuf-cpp-lite",
122        "libutils",
123    ],
124    cflags: [
125        // Suppress unused parameter and no error options. These cause problems
126        // with the when using the map type in a proto definition.
127        "-Wno-unused-parameter",
128    ],
129}
130
131// This is the version of the drm metrics library configured for full protobuf.
132cc_library_shared {
133    name: "libmediadrmmetrics_full",
134    srcs: [
135        "DrmMetrics.cpp",
136        "PluginMetricsReporting.cpp",
137        "protos/metrics.proto",
138    ],
139
140    local_include_dirs: [
141        "include"
142    ],
143
144    proto: {
145        export_proto_headers: true,
146        type: "full",
147    },
148    header_libs: [
149        "libmedia_headers",
150    ],
151    shared_libs: [
152        "android.hardware.drm@1.0",
153        "android.hardware.drm@1.1",
154        "android.hardware.drm@1.2",
155        "libbase",
156        "liblog",
157        "libmediametrics",
158        "libprotobuf-cpp-full",
159        "libstagefright_foundation",
160        "libutils",
161    ],
162    cflags: [
163        // Suppress unused parameter and no error options. These cause problems
164        // when using the map type in a proto definition.
165        "-Wno-unused-parameter",
166    ],
167}
168
169cc_library_shared {
170    name: "libmediadrmmetrics_consumer",
171    srcs: [
172        "DrmMetricsConsumer.cpp",
173    ],
174
175    shared_libs: [
176        "android.hardware.drm@1.0",
177        "android.hardware.drm@1.1",
178        "android.hardware.drm@1.2",
179        "libbinder",
180        "libhidlbase",
181        "liblog",
182        "libmediadrm",
183        "libmediadrmmetrics_full",
184        "libutils",
185    ],
186
187    header_libs: [
188        "libmediametrics_headers",
189        "libstagefright_foundation_headers",
190        "libmedia_headers",
191    ],
192}
193