Bill Peckham | 294ad24 | 2020-07-21 13:41:40 -0700 | [diff] [blame] | 1 | // 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 | |
Jiyong Park | 07770c7 | 2017-06-19 22:06:41 +0900 | [diff] [blame] | 15 | cc_library_static { |
| 16 | name: "android.hardware.drm@1.0-helper", |
Martijn Coenen | 14adc6e | 2017-06-20 08:56:12 -0700 | [diff] [blame] | 17 | vendor_available: true, |
Jiyong Park | 07770c7 | 2017-06-19 22:06:41 +0900 | [diff] [blame] | 18 | defaults: ["hidl_defaults"], |
| 19 | srcs: [ |
| 20 | "SharedLibrary.cpp", |
| 21 | ], |
| 22 | cflags: [ |
| 23 | "-Werror", |
| 24 | "-Wextra", |
| 25 | "-Wall", |
| 26 | ], |
| 27 | shared_libs: [ |
| 28 | "liblog", |
| 29 | ], |
| 30 | header_libs: [ |
| 31 | "libutils_headers", |
| 32 | ], |
| 33 | export_header_lib_headers: [ |
| 34 | "libutils_headers", |
| 35 | ], |
| 36 | export_include_dirs : ["include"] |
| 37 | } |
Bill Peckham | 294ad24 | 2020-07-21 13:41:40 -0700 | [diff] [blame] | 38 | |
| 39 | soong_config_module_type { |
| 40 | name: "android_hardware_drm_1_0_multilib", |
| 41 | module_type: "cc_defaults", |
| 42 | config_namespace: "ANDROID", |
| 43 | bool_variables: ["TARGET_ENABLE_MEDIADRM_64"], |
| 44 | properties: ["compile_multilib"], |
| 45 | } |
| 46 | |
| 47 | android_hardware_drm_1_0_multilib { |
| 48 | name: "android.hardware.drm@1.0-multilib-lib", |
bohu | 17b4bcf | 2021-01-25 21:48:54 -0800 | [diff] [blame] | 49 | compile_multilib: "prefer32", |
Bill Peckham | 294ad24 | 2020-07-21 13:41:40 -0700 | [diff] [blame] | 50 | soong_config_variables: { |
| 51 | TARGET_ENABLE_MEDIADRM_64: { |
| 52 | compile_multilib: "both", |
| 53 | } |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | android_hardware_drm_1_0_multilib { |
| 58 | name: "android.hardware.drm@1.0-multilib-exe", |
bohu | 17b4bcf | 2021-01-25 21:48:54 -0800 | [diff] [blame] | 59 | compile_multilib: "prefer32", |
Bill Peckham | 294ad24 | 2020-07-21 13:41:40 -0700 | [diff] [blame] | 60 | soong_config_variables: { |
| 61 | TARGET_ENABLE_MEDIADRM_64: { |
| 62 | compile_multilib: "first", |
| 63 | } |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | cc_defaults { |
| 68 | name: "android.hardware.drm@1.0-service-defaults", |
| 69 | proprietary: true, |
| 70 | relative_install_path: "hw", |
| 71 | include_dirs: ["hardware/interfaces/drm"], |
| 72 | header_libs: ["media_plugin_headers"], |
| 73 | static_libs: ["android.hardware.drm@1.0-helper"], |
| 74 | |
| 75 | shared_libs: [ |
| 76 | "android.hardware.drm@1.0", |
| 77 | "android.hidl.memory@1.0", |
| 78 | "libhidlbase", |
| 79 | "libhardware", |
| 80 | "liblog", |
| 81 | "libutils", |
| 82 | "libbinder", |
| 83 | ], |
| 84 | } |
| 85 | |
| 86 | //############ Build legacy drm service ############ |
| 87 | |
| 88 | cc_binary { |
| 89 | name: "android.hardware.drm@1.0-service", |
| 90 | defaults: [ |
| 91 | "android.hardware.drm@1.0-multilib-exe", |
| 92 | "android.hardware.drm@1.0-service-defaults" |
| 93 | ], |
| 94 | init_rc: ["android.hardware.drm@1.0-service.rc"], |
| 95 | srcs: ["service.cpp"], |
| 96 | } |
| 97 | |
| 98 | //############ Build legacy drm lazy service ############ |
| 99 | |
| 100 | cc_binary { |
| 101 | name: "android.hardware.drm@1.0-service-lazy", |
| 102 | defaults: [ |
| 103 | "android.hardware.drm@1.0-multilib-exe", |
| 104 | "android.hardware.drm@1.0-service-defaults" |
| 105 | ], |
| 106 | overrides: ["android.hardware.drm@1.0-service"], |
| 107 | init_rc: ["android.hardware.drm@1.0-service-lazy.rc"], |
| 108 | srcs: ["serviceLazy.cpp"], |
| 109 | } |
| 110 | |
| 111 | //############ Build legacy drm impl library ############ |
| 112 | |
| 113 | cc_library_shared { |
| 114 | name: "android.hardware.drm@1.0-impl", |
| 115 | defaults: ["android.hardware.drm@1.0-multilib-lib"], |
| 116 | proprietary: true, |
| 117 | relative_install_path: "hw", |
| 118 | |
| 119 | include_dirs: [ |
| 120 | "frameworks/native/include", |
| 121 | "frameworks/av/include", |
| 122 | ], |
| 123 | |
| 124 | shared_libs: [ |
| 125 | "android.hardware.drm@1.0", |
| 126 | "android.hidl.memory@1.0", |
| 127 | "libcutils", |
| 128 | "libhidlbase", |
| 129 | "libhidlmemory", |
| 130 | "liblog", |
| 131 | "libstagefright_foundation", |
| 132 | "libutils", |
| 133 | ], |
| 134 | |
| 135 | static_libs: ["android.hardware.drm@1.0-helper"], |
| 136 | |
| 137 | srcs: [ |
| 138 | "DrmFactory.cpp", |
| 139 | "DrmPlugin.cpp", |
| 140 | "CryptoFactory.cpp", |
| 141 | "CryptoPlugin.cpp", |
| 142 | "LegacyPluginPath.cpp", |
| 143 | "TypeConvert.cpp", |
| 144 | ], |
| 145 | } |