1#
2# Copyright (C) 2016 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############# Build legacy drm service ############
18
19LOCAL_PATH := $(call my-dir)
20
21include $(CLEAR_VARS)
22
23include $(LOCAL_PATH)/common_default_service.mk
24LOCAL_MODULE := android.hardware.drm@1.0-service
25LOCAL_INIT_RC := android.hardware.drm@1.0-service.rc
26LOCAL_SRC_FILES := service.cpp
27
28include $(BUILD_EXECUTABLE)
29
30############# Build legacy drm lazy service ############
31
32include $(CLEAR_VARS)
33
34include $(LOCAL_PATH)/common_default_service.mk
35LOCAL_MODULE := android.hardware.drm@1.0-service-lazy
36LOCAL_OVERRIDES_MODULES := android.hardware.drm@1.0-service
37LOCAL_INIT_RC := android.hardware.drm@1.0-service-lazy.rc
38LOCAL_SRC_FILES := serviceLazy.cpp
39
40include $(BUILD_EXECUTABLE)
41
42############# Build legacy drm impl library ############
43
44include $(CLEAR_VARS)
45LOCAL_MODULE := android.hardware.drm@1.0-impl
46LOCAL_PROPRIETARY_MODULE := true
47LOCAL_MODULE_RELATIVE_PATH := hw
48LOCAL_SRC_FILES := \
49    DrmFactory.cpp \
50    DrmPlugin.cpp \
51    CryptoFactory.cpp \
52    CryptoPlugin.cpp \
53    LegacyPluginPath.cpp \
54    TypeConvert.cpp \
55
56LOCAL_SHARED_LIBRARIES := \
57    android.hardware.drm@1.0 \
58    android.hidl.memory@1.0 \
59    libcutils \
60    libhidlbase \
61    libhidlmemory \
62    liblog \
63    libstagefright_foundation \
64    libutils \
65
66LOCAL_STATIC_LIBRARIES := \
67    android.hardware.drm@1.0-helper \
68
69LOCAL_C_INCLUDES := \
70    frameworks/native/include \
71    frameworks/av/include
72
73# TODO: Some legacy DRM plugins only support 32-bit. They need to be migrated to
74# 64-bit. (b/18948909) Once all of a device's legacy DRM plugins support 64-bit,
75# that device can turn on TARGET_ENABLE_MEDIADRM_64 to build this impl as
76# 64-bit.
77ifneq ($(TARGET_ENABLE_MEDIADRM_64), true)
78LOCAL_32_BIT_ONLY := true
79endif
80
81include $(BUILD_SHARED_LIBRARY)
82