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 17LOCAL_PATH := $(call my-dir) 18 19# DEVICE_FRAMEWORK_MANIFEST_FILE is a device-specific framework manifest file 20# that installed to the system image. HALs entries should be written to 21# DEVICE_FRAMEWORK_MANIFEST_FILE or PRODUCT_MANIFEST_FILES depend on the path of 22# the module. It is recommended that such device-specific modules to be 23# installed on product partition. 24 25SYSTEM_MANIFEST_INPUT_FILES := $(LOCAL_PATH)/manifest.xml 26ifdef DEVICE_FRAMEWORK_MANIFEST_FILE 27 SYSTEM_MANIFEST_INPUT_FILES += $(DEVICE_FRAMEWORK_MANIFEST_FILE) 28endif 29 30SYSTEM_EXT_MANIFEST_INPUT_FILES := $(LOCAL_PATH)/system_ext_manifest.default.xml 31ifdef SYSTEM_EXT_MANIFEST_FILES 32 SYSTEM_EXT_MANIFEST_INPUT_FILES += $(SYSTEM_EXT_MANIFEST_FILES) 33endif 34 35# VNDK Version in device compatibility matrix and framework manifest 36ifeq ($(BOARD_VNDK_VERSION),current) 37VINTF_VNDK_VERSION := $(PLATFORM_VNDK_VERSION) 38else 39VINTF_VNDK_VERSION := $(BOARD_VNDK_VERSION) 40endif 41 42# Device Compatibility Matrix 43ifdef DEVICE_MATRIX_FILE 44DEVICE_MATRIX_INPUT_FILE := $(DEVICE_MATRIX_FILE) 45else 46DEVICE_MATRIX_INPUT_FILE := $(LOCAL_PATH)/device_compatibility_matrix.default.xml 47endif 48 49include $(CLEAR_VARS) 50LOCAL_MODULE := vendor_compatibility_matrix.xml 51LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 52LOCAL_LICENSE_CONDITIONS := notice 53LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE 54LOCAL_MODULE_STEM := compatibility_matrix.xml 55LOCAL_MODULE_CLASS := ETC 56LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/vintf 57 58GEN := $(local-generated-sources-dir)/compatibility_matrix.xml 59 60$(GEN): PRIVATE_VINTF_VNDK_VERSION := $(VINTF_VNDK_VERSION) 61$(GEN): PRIVATE_DEVICE_MATRIX_INPUT_FILE := $(DEVICE_MATRIX_INPUT_FILE) 62$(GEN): $(DEVICE_MATRIX_INPUT_FILE) $(HOST_OUT_EXECUTABLES)/assemble_vintf 63 REQUIRED_VNDK_VERSION=$(PRIVATE_VINTF_VNDK_VERSION) \ 64 BOARD_SYSTEMSDK_VERSIONS="$(BOARD_SYSTEMSDK_VERSIONS)" \ 65 $(HOST_OUT_EXECUTABLES)/assemble_vintf \ 66 -i $(call normalize-path-list,$(PRIVATE_DEVICE_MATRIX_INPUT_FILE)) \ 67 -o $@ 68 69LOCAL_PREBUILT_MODULE_FILE := $(GEN) 70include $(BUILD_PREBUILT) 71 72# System Manifest 73include $(CLEAR_VARS) 74LOCAL_MODULE := system_manifest.xml 75LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 76LOCAL_LICENSE_CONDITIONS := notice 77LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE 78LOCAL_MODULE_STEM := manifest.xml 79LOCAL_MODULE_CLASS := ETC 80LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/vintf 81 82GEN := $(local-generated-sources-dir)/manifest.xml 83 84$(GEN): PRIVATE_SYSTEM_MANIFEST_INPUT_FILES := $(SYSTEM_MANIFEST_INPUT_FILES) 85$(GEN): $(SYSTEM_MANIFEST_INPUT_FILES) $(HOST_OUT_EXECUTABLES)/assemble_vintf 86 PLATFORM_SYSTEMSDK_VERSIONS="$(PLATFORM_SYSTEMSDK_VERSIONS)" \ 87 $(HOST_OUT_EXECUTABLES)/assemble_vintf \ 88 -i $(call normalize-path-list,$(PRIVATE_SYSTEM_MANIFEST_INPUT_FILES)) \ 89 -o $@ 90 91LOCAL_PREBUILT_MODULE_FILE := $(GEN) 92include $(BUILD_PREBUILT) 93 94# Product Manifest 95ifneq ($(PRODUCT_MANIFEST_FILES),) 96include $(CLEAR_VARS) 97LOCAL_MODULE := product_manifest.xml 98LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 99LOCAL_LICENSE_CONDITIONS := notice 100LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE 101LOCAL_MODULE_STEM := manifest.xml 102LOCAL_MODULE_CLASS := ETC 103LOCAL_PRODUCT_MODULE := true 104LOCAL_MODULE_RELATIVE_PATH := vintf 105GEN := $(local-generated-sources-dir)/manifest.xml 106$(GEN): PRIVATE_PRODUCT_MANIFEST_FILES := $(PRODUCT_MANIFEST_FILES) 107$(GEN): $(PRODUCT_MANIFEST_FILES) $(HOST_OUT_EXECUTABLES)/assemble_vintf 108 $(HOST_OUT_EXECUTABLES)/assemble_vintf \ 109 -i $(call normalize-path-list,$(PRIVATE_PRODUCT_MANIFEST_FILES)) \ 110 -o $@ 111 112LOCAL_PREBUILT_MODULE_FILE := $(GEN) 113include $(BUILD_PREBUILT) 114endif 115 116# System_ext Manifest 117include $(CLEAR_VARS) 118LOCAL_MODULE := system_ext_manifest.xml 119LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 120LOCAL_LICENSE_CONDITIONS := notice 121LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE 122LOCAL_MODULE_STEM := manifest.xml 123LOCAL_MODULE_CLASS := ETC 124LOCAL_SYSTEM_EXT_MODULE := true 125LOCAL_MODULE_RELATIVE_PATH := vintf 126GEN := $(local-generated-sources-dir)/manifest.xml 127$(GEN): PRIVATE_SYSTEM_EXT_MANIFEST_FILES := $(SYSTEM_EXT_MANIFEST_INPUT_FILES) 128$(GEN): PRIVATE_VINTF_VNDK_VERSION := $(VINTF_VNDK_VERSION) 129$(GEN): $(SYSTEM_EXT_MANIFEST_INPUT_FILES) $(HOST_OUT_EXECUTABLES)/assemble_vintf 130 PROVIDED_VNDK_VERSIONS="$(PRIVATE_VINTF_VNDK_VERSION) $(PRODUCT_EXTRA_VNDK_VERSIONS)" \ 131 $(HOST_OUT_EXECUTABLES)/assemble_vintf \ 132 -i $(call normalize-path-list,$(PRIVATE_SYSTEM_EXT_MANIFEST_FILES)) \ 133 -o $@ 134 135LOCAL_PREBUILT_MODULE_FILE := $(GEN) 136include $(BUILD_PREBUILT) 137 138VINTF_VNDK_VERSION := 139SYSTEM_MANIFEST_INPUT_FILES := 140SYSTEM_EXT_MANIFEST_INPUT_FILES := 141DEVICE_MATRIX_INPUT_FILE := 142PRODUCT_MANIFEST_INPUT_FILES := 143 144VINTF_FRAMEWORK_MANIFEST_FROZEN_DIR := $(LOCAL_PATH)/frozen 145