1// 2// Copyright (C) 2018 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 17// *** THIS PACKAGE HAS SPECIAL LICENSING CONDITIONS. PLEASE 18// CONSULT THE OWNERS AND opensource-licensing@google.com BEFORE 19// DEPENDING ON IT IN YOUR PROJECT. *** 20package { 21 // See: http://go/android-license-faq 22 // A large-scale-change added 'default_applicable_licenses' to import 23 // all of the 'license_kinds' from "frameworks_av_license" 24 // to get the below license kinds: 25 // SPDX-license-identifier-Apache-2.0 26 // legacy_by_exception_only (by exception only) 27 default_applicable_licenses: ["frameworks_av_license"], 28} 29 30cc_defaults { 31 name: "clearkey_service_defaults", 32 vendor: true, 33 34 srcs: [ 35 "AesCtrDecryptor.cpp", 36 "Base64.cpp", 37 "Buffer.cpp", 38 "CreatePluginFactories.cpp", 39 "CryptoFactory.cpp", 40 "CryptoPlugin.cpp", 41 "DeviceFiles.cpp", 42 "DrmFactory.cpp", 43 "DrmPlugin.cpp", 44 "InitDataParser.cpp", 45 "JsonWebKey.cpp", 46 "MemoryFileSystem.cpp", 47 "Session.cpp", 48 "SessionLibrary.cpp", 49 ], 50 51 relative_install_path: "hw", 52 53 cflags: ["-Wall", "-Werror", "-Wthread-safety"], 54 55 shared_libs: [ 56 "android.hardware.drm@1.0", 57 "android.hardware.drm@1.1", 58 "android.hardware.drm@1.2", 59 "android.hardware.drm@1.3", 60 "android.hardware.drm@1.4", 61 "libbase", 62 "libbinder", 63 "libcrypto", 64 "libhidlbase", 65 "libhidlmemory", 66 "liblog", 67 "libprotobuf-cpp-lite", 68 "libutils", 69 ], 70 71 static_libs: [ 72 "libclearkeycommon", 73 "libclearkeydevicefiles-protos", 74 "libjsmn", 75 ], 76 77 local_include_dirs: ["include"], 78 79 export_static_lib_headers: ["libjsmn"], 80 81 sanitize: { 82 integer_overflow: true, 83 }, 84} 85cc_library_static { 86 name: "libclearkeydevicefiles-protos", 87 vendor: true, 88 89 proto: { 90 export_proto_headers: true, 91 type: "lite", 92 }, 93 srcs: ["protos/DeviceFiles.proto"], 94} 95 96cc_library { 97 name: "libclearkeyhidl", 98 defaults: ["clearkey_service_defaults"], 99} 100 101cc_binary { 102 name: "android.hardware.drm@1.2-service.clearkey", 103 defaults: ["clearkey_service_defaults"], 104 srcs: ["service.cpp"], 105 init_rc: ["android.hardware.drm@1.2-service.clearkey.rc"], 106 vintf_fragments: ["manifest_android.hardware.drm@1.2-service.clearkey.xml"], 107} 108 109cc_binary { 110 name: "android.hardware.drm@1.2-service-lazy.clearkey", 111 overrides: ["android.hardware.drm@1.2-service.clearkey"], 112 defaults: ["clearkey_service_defaults"], 113 srcs: ["serviceLazy.cpp"], 114 init_rc: ["android.hardware.drm@1.2-service-lazy.clearkey.rc"], 115 vintf_fragments: ["manifest_android.hardware.drm@1.2-service.clearkey.xml"], 116} 117 118cc_binary { 119 name: "android.hardware.drm@1.4-service.clearkey", 120 defaults: ["clearkey_service_defaults"], 121 srcs: ["service.cpp"], 122 init_rc: ["android.hardware.drm@1.4-service.clearkey.rc"], 123 vintf_fragments: ["manifest_android.hardware.drm@1.4-service.clearkey.xml"], 124} 125 126cc_binary { 127 name: "android.hardware.drm@1.4-service-lazy.clearkey", 128 overrides: ["android.hardware.drm@1.4-service.clearkey"], 129 defaults: ["clearkey_service_defaults"], 130 srcs: ["serviceLazy.cpp"], 131 init_rc: ["android.hardware.drm@1.4-service-lazy.clearkey.rc"], 132 vintf_fragments: ["manifest_android.hardware.drm@1.4-service.clearkey.xml"], 133} 134 135cc_fuzz { 136 name: "clearkeyV1.4_fuzzer", 137 vendor: true, 138 srcs: [ 139 "fuzzer/clearkeyV1.4_fuzzer.cpp", 140 ], 141 static_libs: [ 142 "libclearkeyhidl", 143 "libclearkeycommon", 144 "libclearkeydevicefiles-protos", 145 "libjsmn", 146 "libprotobuf-cpp-lite", 147 ], 148 shared_libs: [ 149 "android.hidl.allocator@1.0", 150 "android.hardware.drm@1.0", 151 "android.hardware.drm@1.1", 152 "android.hardware.drm@1.2", 153 "android.hardware.drm@1.3", 154 "android.hardware.drm@1.4", 155 "libcrypto", 156 "libhidlbase", 157 "libhidlmemory", 158 "liblog", 159 "libutils", 160 ], 161 fuzz_config: { 162 cc: [ 163 "android-media-fuzzing-reports@google.com", 164 ], 165 componentid: 155276, 166 }, 167} 168