• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_binary {
97    name: "android.hardware.drm@1.2-service.clearkey",
98    defaults: ["clearkey_service_defaults"],
99    srcs: ["service.cpp"],
100    init_rc: ["android.hardware.drm@1.2-service.clearkey.rc"],
101    vintf_fragments: ["manifest_android.hardware.drm@1.2-service.clearkey.xml"],
102}
103
104cc_binary {
105    name: "android.hardware.drm@1.2-service-lazy.clearkey",
106    overrides: ["android.hardware.drm@1.2-service.clearkey"],
107    defaults: ["clearkey_service_defaults"],
108    srcs: ["serviceLazy.cpp"],
109    init_rc: ["android.hardware.drm@1.2-service-lazy.clearkey.rc"],
110    vintf_fragments: ["manifest_android.hardware.drm@1.2-service.clearkey.xml"],
111}
112
113cc_binary {
114    name: "android.hardware.drm@1.4-service.clearkey",
115    defaults: ["clearkey_service_defaults"],
116    srcs: ["service.cpp"],
117    init_rc: ["android.hardware.drm@1.4-service.clearkey.rc"],
118    vintf_fragments: ["manifest_android.hardware.drm@1.4-service.clearkey.xml"],
119}
120
121cc_binary {
122    name: "android.hardware.drm@1.4-service-lazy.clearkey",
123    overrides: ["android.hardware.drm@1.4-service.clearkey"],
124    defaults: ["clearkey_service_defaults"],
125    srcs: ["serviceLazy.cpp"],
126    init_rc: ["android.hardware.drm@1.4-service-lazy.clearkey.rc"],
127    vintf_fragments: ["manifest_android.hardware.drm@1.4-service.clearkey.xml"],
128}
129