1 # 2 # Copyright (C) 2017 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 ######################################################################## 18 # Included by frameworks/base for MediaCas. Hidl HAL can't be linked as 19 # Java lib from frameworks because it has dependency on frameworks itself. 20 # 21 22 intermediates := $(TARGET_OUT_COMMON_GEN)/JAVA_LIBRARIES/android.hardware.cas-V1.0-java_intermediates 23 24 HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX) 25 HIDL_PATH := system/libhidl/transport/base/1.0 26 27 # 28 # Build types.hal (DebugInfo) 29 # 30 GEN := $(intermediates)/android/hidl/base/V1_0/DebugInfo.java 31 $(GEN): $(HIDL) 32 $(GEN): PRIVATE_HIDL := $(HIDL) 33 $(GEN): PRIVATE_DEPS := $(HIDL_PATH)/types.hal 34 $(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) 35 $(GEN): PRIVATE_CUSTOM_TOOL = \ 36 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ 37 -Ljava \ 38 -randroid.hidl:system/libhidl/transport \ 39 android.hidl.base@1.0::types.DebugInfo 40 41 $(GEN): $(HIDL_PATH)/types.hal 42 $(transform-generated-source) 43 LOCAL_GENERATED_SOURCES += $(GEN) 44 45 # 46 # Build IBase.hal 47 # 48 GEN := $(intermediates)/android/hidl/base/V1_0/IBase.java 49 $(GEN): $(HIDL) 50 $(GEN): PRIVATE_HIDL := $(HIDL) 51 $(GEN): PRIVATE_DEPS := $(HIDL_PATH)/IBase.hal 52 $(GEN): PRIVATE_DEPS += $(HIDL_PATH)/types.hal 53 $(GEN): $(HIDL_PATH)/types.hal 54 $(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) 55 $(GEN): PRIVATE_CUSTOM_TOOL = \ 56 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ 57 -Ljava \ 58 -randroid.hidl:system/libhidl/transport \ 59 android.hidl.base@1.0::IBase 60 61 $(GEN): $(HIDL_PATH)/IBase.hal 62 $(transform-generated-source) 63 LOCAL_GENERATED_SOURCES += $(GEN) 64 65 HIDL_PATH := hardware/interfaces/cas/1.0 66 67 # 68 # Build types.hal (HidlCasPluginDescriptor) 69 # 70 GEN := $(intermediates)/android/hardware/cas/V1_0/HidlCasPluginDescriptor.java 71 $(GEN): $(HIDL) 72 $(GEN): PRIVATE_HIDL := $(HIDL) 73 $(GEN): PRIVATE_DEPS := $(HIDL_PATH)/types.hal 74 $(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) 75 $(GEN): PRIVATE_CUSTOM_TOOL = \ 76 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ 77 -Ljava \ 78 -randroid.hardware:hardware/interfaces \ 79 -randroid.hidl:system/libhidl/transport \ 80 android.hardware.cas@1.0::types.HidlCasPluginDescriptor 81 82 $(GEN): $(HIDL_PATH)/types.hal 83 $(transform-generated-source) 84 LOCAL_GENERATED_SOURCES += $(GEN) 85 86 # 87 # Build types.hal (Status) 88 # 89 GEN := $(intermediates)/android/hardware/cas/V1_0/Status.java 90 $(GEN): $(HIDL) 91 $(GEN): PRIVATE_HIDL := $(HIDL) 92 $(GEN): PRIVATE_DEPS := $(HIDL_PATH)/types.hal 93 $(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) 94 $(GEN): PRIVATE_CUSTOM_TOOL = \ 95 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ 96 -Ljava \ 97 -randroid.hardware:hardware/interfaces \ 98 -randroid.hidl:system/libhidl/transport \ 99 android.hardware.cas@1.0::types.Status 100 101 $(GEN): $(HIDL_PATH)/types.hal 102 $(transform-generated-source) 103 LOCAL_GENERATED_SOURCES += $(GEN) 104 105 # 106 # Build ICas.hal 107 # 108 GEN := $(intermediates)/android/hardware/cas/V1_0/ICas.java 109 $(GEN): $(HIDL) 110 $(GEN): PRIVATE_HIDL := $(HIDL) 111 $(GEN): PRIVATE_DEPS := $(HIDL_PATH)/ICas.hal 112 $(GEN): PRIVATE_DEPS += $(HIDL_PATH)/types.hal 113 $(GEN): $(HIDL_PATH)/types.hal 114 $(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) 115 $(GEN): PRIVATE_CUSTOM_TOOL = \ 116 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ 117 -Ljava \ 118 -randroid.hardware:hardware/interfaces \ 119 -randroid.hidl:system/libhidl/transport \ 120 android.hardware.cas@1.0::ICas 121 122 $(GEN): $(HIDL_PATH)/ICas.hal 123 $(transform-generated-source) 124 LOCAL_GENERATED_SOURCES += $(GEN) 125 126 # 127 # Build ICasListener.hal 128 # 129 GEN := $(intermediates)/android/hardware/cas/V1_0/ICasListener.java 130 $(GEN): $(HIDL) 131 $(GEN): PRIVATE_HIDL := $(HIDL) 132 $(GEN): PRIVATE_DEPS := $(HIDL_PATH)/ICasListener.hal 133 $(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) 134 $(GEN): PRIVATE_CUSTOM_TOOL = \ 135 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ 136 -Ljava \ 137 -randroid.hardware:hardware/interfaces \ 138 -randroid.hidl:system/libhidl/transport \ 139 android.hardware.cas@1.0::ICasListener 140 141 $(GEN): $(HIDL_PATH)/ICasListener.hal 142 $(transform-generated-source) 143 LOCAL_GENERATED_SOURCES += $(GEN) 144 145 # 146 # Build IDescramblerBase.hal 147 # 148 GEN := $(intermediates)/android/hardware/cas/V1_0/IDescramblerBase.java 149 $(GEN): $(HIDL) 150 $(GEN): PRIVATE_HIDL := $(HIDL) 151 $(GEN): PRIVATE_DEPS := $(HIDL_PATH)/IDescramblerBase.hal 152 $(GEN): PRIVATE_DEPS += $(HIDL_PATH)/types.hal 153 $(GEN): $(HIDL_PATH)/types.hal 154 $(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) 155 $(GEN): PRIVATE_CUSTOM_TOOL = \ 156 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ 157 -Ljava \ 158 -randroid.hardware:hardware/interfaces \ 159 -randroid.hidl:system/libhidl/transport \ 160 android.hardware.cas@1.0::IDescramblerBase 161 162 $(GEN): $(HIDL_PATH)/IDescramblerBase.hal 163 $(transform-generated-source) 164 LOCAL_GENERATED_SOURCES += $(GEN) 165 166 # 167 # Build IMediaCasService.hal 168 # 169 GEN := $(intermediates)/android/hardware/cas/V1_0/IMediaCasService.java 170 $(GEN): $(HIDL) 171 $(GEN): PRIVATE_HIDL := $(HIDL) 172 $(GEN): PRIVATE_DEPS := $(HIDL_PATH)/IMediaCasService.hal 173 $(GEN): PRIVATE_DEPS += $(HIDL_PATH)/ICas.hal 174 $(GEN): $(HIDL_PATH)/ICas.hal 175 $(GEN): PRIVATE_DEPS += $(HIDL_PATH)/ICasListener.hal 176 $(GEN): $(HIDL_PATH)/ICasListener.hal 177 $(GEN): PRIVATE_DEPS += $(HIDL_PATH)/IDescramblerBase.hal 178 $(GEN): $(HIDL_PATH)/IDescramblerBase.hal 179 $(GEN): PRIVATE_DEPS += $(HIDL_PATH)/types.hal 180 $(GEN): $(HIDL_PATH)/types.hal 181 $(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) 182 $(GEN): PRIVATE_CUSTOM_TOOL = \ 183 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ 184 -Ljava \ 185 -randroid.hardware:hardware/interfaces \ 186 -randroid.hidl:system/libhidl/transport \ 187 android.hardware.cas@1.0::IMediaCasService 188 189 $(GEN): $(HIDL_PATH)/IMediaCasService.hal 190 $(transform-generated-source) 191 LOCAL_GENERATED_SOURCES += $(GEN) 192 193