blob: af1c076e0ddf2dd2807403762514f14fdb108a34 [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",
35 ],
36 shared_libs: [
37 "liblog",
38 ],
39 header_libs: [
40 "libutils_headers",
41 ],
42 export_header_lib_headers: [
43 "libutils_headers",
44 ],
45 export_include_dirs : ["include"]
46}
Bill Peckham294ad242020-07-21 13:41:40 -070047
48soong_config_module_type {
49 name: "android_hardware_drm_1_0_multilib",
50 module_type: "cc_defaults",
51 config_namespace: "ANDROID",
52 bool_variables: ["TARGET_ENABLE_MEDIADRM_64"],
53 properties: ["compile_multilib"],
54}
55
56android_hardware_drm_1_0_multilib {
57 name: "android.hardware.drm@1.0-multilib-lib",
bohu17b4bcf2021-01-25 21:48:54 -080058 compile_multilib: "prefer32",
Bill Peckham294ad242020-07-21 13:41:40 -070059 soong_config_variables: {
60 TARGET_ENABLE_MEDIADRM_64: {
61 compile_multilib: "both",
62 }
63 }
64}
65
66android_hardware_drm_1_0_multilib {
67 name: "android.hardware.drm@1.0-multilib-exe",
bohu17b4bcf2021-01-25 21:48:54 -080068 compile_multilib: "prefer32",
Bill Peckham294ad242020-07-21 13:41:40 -070069 soong_config_variables: {
70 TARGET_ENABLE_MEDIADRM_64: {
71 compile_multilib: "first",
72 }
73 }
74}
75
76cc_defaults {
77 name: "android.hardware.drm@1.0-service-defaults",
78 proprietary: true,
79 relative_install_path: "hw",
80 include_dirs: ["hardware/interfaces/drm"],
81 header_libs: ["media_plugin_headers"],
82 static_libs: ["android.hardware.drm@1.0-helper"],
83
84 shared_libs: [
85 "android.hardware.drm@1.0",
86 "android.hidl.memory@1.0",
87 "libhidlbase",
88 "libhardware",
89 "liblog",
90 "libutils",
91 "libbinder",
92 ],
93}
94
95//############ Build legacy drm service ############
96
97cc_binary {
98 name: "android.hardware.drm@1.0-service",
99 defaults: [
100 "android.hardware.drm@1.0-multilib-exe",
101 "android.hardware.drm@1.0-service-defaults"
102 ],
103 init_rc: ["android.hardware.drm@1.0-service.rc"],
104 srcs: ["service.cpp"],
105}
106
107//############ Build legacy drm lazy service ############
108
109cc_binary {
110 name: "android.hardware.drm@1.0-service-lazy",
111 defaults: [
112 "android.hardware.drm@1.0-multilib-exe",
113 "android.hardware.drm@1.0-service-defaults"
114 ],
115 overrides: ["android.hardware.drm@1.0-service"],
116 init_rc: ["android.hardware.drm@1.0-service-lazy.rc"],
117 srcs: ["serviceLazy.cpp"],
118}
119
120//############ Build legacy drm impl library ############
121
122cc_library_shared {
123 name: "android.hardware.drm@1.0-impl",
124 defaults: ["android.hardware.drm@1.0-multilib-lib"],
125 proprietary: true,
126 relative_install_path: "hw",
127
128 include_dirs: [
129 "frameworks/native/include",
130 "frameworks/av/include",
131 ],
132
133 shared_libs: [
134 "android.hardware.drm@1.0",
135 "android.hidl.memory@1.0",
136 "libcutils",
137 "libhidlbase",
138 "libhidlmemory",
139 "liblog",
140 "libstagefright_foundation",
141 "libutils",
142 ],
143
144 static_libs: ["android.hardware.drm@1.0-helper"],
145
146 srcs: [
147 "DrmFactory.cpp",
148 "DrmPlugin.cpp",
149 "CryptoFactory.cpp",
150 "CryptoPlugin.cpp",
151 "LegacyPluginPath.cpp",
152 "TypeConvert.cpp",
153 ],
154}