blob: cbdab4ffe0c832977353cb174946cc5a9a00c0dd [file] [log] [blame]
Bill Peckham294ad242020-07-21 13:41:40 -07001// Copyright (C) 2016-2020 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
Bob Badourc22b35b2021-02-23 14:26:20 -080015package {
16 // See: http://go/android-license-faq
17 // A large-scale-change added 'default_applicable_licenses' to import
18 // all of the 'license_kinds' from "hardware_interfaces_license"
19 // to get the below license kinds:
20 // SPDX-license-identifier-Apache-2.0
21 default_applicable_licenses: ["hardware_interfaces_license"],
22}
23
Jiyong Park07770c72017-06-19 22:06:41 +090024cc_library_static {
25 name: "android.hardware.drm@1.0-helper",
Martijn Coenen14adc6e2017-06-20 08:56:12 -070026 vendor_available: true,
Jiyong Park07770c72017-06-19 22:06:41 +090027 defaults: ["hidl_defaults"],
28 srcs: [
29 "SharedLibrary.cpp",
30 ],
31 cflags: [
32 "-Werror",
33 "-Wextra",
34 "-Wall",
Edwin Wong989975e2021-03-08 18:46:42 -080035 "-Wthread-safety",
Jiyong Park07770c72017-06-19 22:06:41 +090036 ],
37 shared_libs: [
38 "liblog",
39 ],
40 header_libs: [
41 "libutils_headers",
42 ],
43 export_header_lib_headers: [
44 "libutils_headers",
45 ],
Edwin Wong989975e2021-03-08 18:46:42 -080046 export_include_dirs: ["include"],
Jiyong Park07770c72017-06-19 22:06:41 +090047}
Bill Peckham294ad242020-07-21 13:41:40 -070048
49soong_config_module_type {
50 name: "android_hardware_drm_1_0_multilib",
51 module_type: "cc_defaults",
52 config_namespace: "ANDROID",
53 bool_variables: ["TARGET_ENABLE_MEDIADRM_64"],
54 properties: ["compile_multilib"],
55}
56
57android_hardware_drm_1_0_multilib {
58 name: "android.hardware.drm@1.0-multilib-lib",
bohu17b4bcf2021-01-25 21:48:54 -080059 compile_multilib: "prefer32",
Bill Peckham294ad242020-07-21 13:41:40 -070060 soong_config_variables: {
61 TARGET_ENABLE_MEDIADRM_64: {
62 compile_multilib: "both",
Edwin Wong989975e2021-03-08 18:46:42 -080063 },
64 },
Bill Peckham294ad242020-07-21 13:41:40 -070065}
66
67android_hardware_drm_1_0_multilib {
68 name: "android.hardware.drm@1.0-multilib-exe",
bohu17b4bcf2021-01-25 21:48:54 -080069 compile_multilib: "prefer32",
Bill Peckham294ad242020-07-21 13:41:40 -070070 soong_config_variables: {
71 TARGET_ENABLE_MEDIADRM_64: {
72 compile_multilib: "first",
Edwin Wong989975e2021-03-08 18:46:42 -080073 },
74 },
Bill Peckham294ad242020-07-21 13:41:40 -070075}
76
77cc_defaults {
78 name: "android.hardware.drm@1.0-service-defaults",
79 proprietary: true,
80 relative_install_path: "hw",
81 include_dirs: ["hardware/interfaces/drm"],
82 header_libs: ["media_plugin_headers"],
83 static_libs: ["android.hardware.drm@1.0-helper"],
84
85 shared_libs: [
86 "android.hardware.drm@1.0",
87 "android.hidl.memory@1.0",
88 "libhidlbase",
89 "libhardware",
90 "liblog",
91 "libutils",
92 "libbinder",
93 ],
94}
95
96//############ Build legacy drm service ############
97
98cc_binary {
99 name: "android.hardware.drm@1.0-service",
100 defaults: [
101 "android.hardware.drm@1.0-multilib-exe",
Edwin Wong989975e2021-03-08 18:46:42 -0800102 "android.hardware.drm@1.0-service-defaults",
Bill Peckham294ad242020-07-21 13:41:40 -0700103 ],
104 init_rc: ["android.hardware.drm@1.0-service.rc"],
105 srcs: ["service.cpp"],
106}
107
108//############ Build legacy drm lazy service ############
109
110cc_binary {
111 name: "android.hardware.drm@1.0-service-lazy",
112 defaults: [
113 "android.hardware.drm@1.0-multilib-exe",
Edwin Wong989975e2021-03-08 18:46:42 -0800114 "android.hardware.drm@1.0-service-defaults",
Bill Peckham294ad242020-07-21 13:41:40 -0700115 ],
116 overrides: ["android.hardware.drm@1.0-service"],
117 init_rc: ["android.hardware.drm@1.0-service-lazy.rc"],
118 srcs: ["serviceLazy.cpp"],
119}
120
121//############ Build legacy drm impl library ############
122
123cc_library_shared {
124 name: "android.hardware.drm@1.0-impl",
125 defaults: ["android.hardware.drm@1.0-multilib-lib"],
126 proprietary: true,
127 relative_install_path: "hw",
128
129 include_dirs: [
130 "frameworks/native/include",
131 "frameworks/av/include",
132 ],
133
134 shared_libs: [
135 "android.hardware.drm@1.0",
136 "android.hidl.memory@1.0",
137 "libcutils",
138 "libhidlbase",
139 "libhidlmemory",
140 "liblog",
141 "libstagefright_foundation",
142 "libutils",
143 ],
144
145 static_libs: ["android.hardware.drm@1.0-helper"],
146
147 srcs: [
148 "DrmFactory.cpp",
149 "DrmPlugin.cpp",
150 "CryptoFactory.cpp",
151 "CryptoPlugin.cpp",
152 "LegacyPluginPath.cpp",
153 "TypeConvert.cpp",
154 ],
155}