Home | History | Annotate | Download | only in hidl
      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 cc_defaults {
     18     name: "clearkey_service_defaults",
     19     vendor: true,
     20 
     21     srcs: [
     22         "AesCtrDecryptor.cpp",
     23         "Base64.cpp",
     24         "Buffer.cpp",
     25         "CreatePluginFactories.cpp",
     26         "CryptoFactory.cpp",
     27         "CryptoPlugin.cpp",
     28         "DeviceFiles.cpp",
     29         "DrmFactory.cpp",
     30         "DrmPlugin.cpp",
     31         "InitDataParser.cpp",
     32         "JsonWebKey.cpp",
     33         "MemoryFileSystem.cpp",
     34         "Session.cpp",
     35         "SessionLibrary.cpp",
     36     ],
     37 
     38     relative_install_path: "hw",
     39 
     40     cflags: ["-Wall", "-Werror"],
     41 
     42     shared_libs: [
     43         "android.hardware.drm (a] 1.0",
     44         "android.hardware.drm (a] 1.1",
     45         "android.hardware.drm (a] 1.2",
     46         "libbase",
     47         "libbinder",
     48         "libcrypto",
     49         "libhidlbase",
     50         "libhidlmemory",
     51         "libhidltransport",
     52         "liblog",
     53         "libprotobuf-cpp-lite",
     54         "libutils",
     55     ],
     56 
     57     static_libs: [
     58         "libclearkeycommon",
     59         "libclearkeydevicefiles-protos",
     60         "libjsmn",
     61     ],
     62 
     63     local_include_dirs: ["include"],
     64 
     65     export_static_lib_headers: ["libjsmn"],
     66 
     67     sanitize: {
     68         integer_overflow: true,
     69     },
     70 }
     71 cc_library_static {
     72     name: "libclearkeydevicefiles-protos",
     73     vendor: true,
     74 
     75     proto: {
     76         export_proto_headers: true,
     77         type: "lite",
     78     },
     79     srcs: ["protos/DeviceFiles.proto"],
     80 }
     81 cc_binary {
     82     name: "android.hardware.drm (a] 1.2-service.clearkey",
     83     defaults: ["clearkey_service_defaults"],
     84     srcs: ["service.cpp"],
     85     init_rc: ["android.hardware.drm (a] 1.2-service.clearkey.rc"],
     86 }
     87 cc_binary {
     88     name: "android.hardware.drm (a] 1.2-service-lazy.clearkey",
     89     overrides: ["android.hardware.drm (a] 1.2-service.clearkey"],
     90     defaults: ["clearkey_service_defaults"],
     91     srcs: ["serviceLazy.cpp"],
     92     init_rc: ["android.hardware.drm (a] 1.2-service-lazy.clearkey.rc"],
     93 }
     94