2017-12-14 00:01:19 +01:00
|
|
|
#
|
|
|
|
# Copyright (C) 2017 The Android Open Source Project
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
#
|
|
|
|
|
|
|
|
LOCAL_PATH := $(call my-dir)
|
|
|
|
|
2018-01-23 23:34:41 +01:00
|
|
|
BUILD_FRAMEWORK_COMPATIBILITY_MATRIX := $(LOCAL_PATH)/compatibility_matrix.mk
|
2019-01-22 23:27:50 +01:00
|
|
|
my_empty_manifest := $(LOCAL_PATH)/manifest.empty.xml
|
2018-01-23 23:34:41 +01:00
|
|
|
|
2019-01-22 23:27:50 +01:00
|
|
|
# System Compatibility Matrix (common to all FCM versions)
|
2017-12-14 00:01:19 +01:00
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
2018-04-25 23:36:00 +02:00
|
|
|
include $(LOCAL_PATH)/clear_vars.mk
|
2018-03-23 20:03:33 +01:00
|
|
|
LOCAL_MODULE := framework_compatibility_matrix.device.xml
|
2021-02-13 05:13:01 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
|
|
|
LOCAL_LICENSE_CONDITIONS := notice
|
|
|
|
LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE
|
2018-03-29 19:51:48 +02:00
|
|
|
LOCAL_MODULE_STEM := compatibility_matrix.device.xml
|
|
|
|
# define LOCAL_MODULE_CLASS for local-generated-sources-dir.
|
2018-03-23 20:03:33 +01:00
|
|
|
LOCAL_MODULE_CLASS := ETC
|
2019-01-22 23:27:50 +01:00
|
|
|
LOCAL_MODULE_RELATIVE_PATH := vintf
|
2018-03-23 20:03:33 +01:00
|
|
|
|
|
|
|
ifndef DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE
|
|
|
|
LOCAL_SRC_FILES := compatibility_matrix.empty.xml
|
|
|
|
else
|
|
|
|
|
2020-10-08 19:16:32 +02:00
|
|
|
# DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE specifies absolute paths
|
2018-03-23 20:03:33 +01:00
|
|
|
LOCAL_GENERATED_SOURCES := $(DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE)
|
|
|
|
|
|
|
|
# Enforce that DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE does not specify required HALs
|
|
|
|
# by checking it against an empty manifest. But the empty manifest needs to contain
|
|
|
|
# BOARD_SEPOLICY_VERS to be compatible with DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE.
|
|
|
|
my_gen_check_manifest := $(local-generated-sources-dir)/manifest.check.xml
|
2019-01-22 23:27:50 +01:00
|
|
|
$(my_gen_check_manifest): PRIVATE_SRC_FILE := $(my_empty_manifest)
|
|
|
|
$(my_gen_check_manifest): $(my_empty_manifest) $(HOST_OUT_EXECUTABLES)/assemble_vintf
|
2018-03-23 20:03:33 +01:00
|
|
|
BOARD_SEPOLICY_VERS=$(BOARD_SEPOLICY_VERS) \
|
2018-03-29 19:57:12 +02:00
|
|
|
VINTF_IGNORE_TARGET_FCM_VERSION=true \
|
2018-03-23 20:03:33 +01:00
|
|
|
$(HOST_OUT_EXECUTABLES)/assemble_vintf -i $(PRIVATE_SRC_FILE) -o $@
|
|
|
|
|
|
|
|
LOCAL_GEN_FILE_DEPENDENCIES += $(my_gen_check_manifest)
|
|
|
|
LOCAL_ASSEMBLE_VINTF_FLAGS += -c "$(my_gen_check_manifest)"
|
|
|
|
|
|
|
|
my_gen_check_manifest :=
|
|
|
|
|
|
|
|
endif # DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE
|
|
|
|
|
2018-01-23 23:34:41 +01:00
|
|
|
LOCAL_ADD_VBMETA_VERSION := true
|
|
|
|
LOCAL_ASSEMBLE_VINTF_ENV_VARS := \
|
2018-02-02 21:47:48 +01:00
|
|
|
POLICYVERS \
|
|
|
|
PLATFORM_SEPOLICY_VERSION \
|
|
|
|
PLATFORM_SEPOLICY_COMPAT_VERSIONS
|
2017-12-14 00:01:19 +01:00
|
|
|
|
2018-01-23 23:34:41 +01:00
|
|
|
include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
|
2017-12-14 00:01:19 +01:00
|
|
|
|
2019-01-22 23:27:50 +01:00
|
|
|
# Product Compatibility Matrix
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
include $(LOCAL_PATH)/clear_vars.mk
|
|
|
|
LOCAL_MODULE := product_compatibility_matrix.xml
|
2021-02-13 05:13:01 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
|
|
|
LOCAL_LICENSE_CONDITIONS := notice
|
|
|
|
LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE
|
2019-01-22 23:27:50 +01:00
|
|
|
|
|
|
|
ifndef DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE
|
|
|
|
my_framework_matrix_deps :=
|
|
|
|
include $(BUILD_PHONY_PACKAGE)
|
|
|
|
else # DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE
|
|
|
|
|
|
|
|
LOCAL_MODULE_STEM := compatibility_matrix.xml
|
|
|
|
LOCAL_PRODUCT_MODULE := true
|
|
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
LOCAL_MODULE_RELATIVE_PATH := vintf
|
|
|
|
|
2020-10-08 19:16:32 +02:00
|
|
|
# DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE specifies absolute paths
|
2019-01-22 23:27:50 +01:00
|
|
|
LOCAL_GENERATED_SOURCES := $(DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE)
|
|
|
|
|
|
|
|
# Enforce that DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE does not specify required HALs
|
|
|
|
# by checking it against an empty manifest.
|
|
|
|
LOCAL_GEN_FILE_DEPENDENCIES += $(my_empty_manifest)
|
|
|
|
LOCAL_ASSEMBLE_VINTF_FLAGS += -c "$(my_empty_manifest)"
|
|
|
|
|
|
|
|
my_framework_matrix_deps := $(LOCAL_MODULE)
|
|
|
|
|
|
|
|
include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
|
|
|
|
|
|
|
|
endif # DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE
|
|
|
|
|
2018-06-12 03:07:53 +02:00
|
|
|
my_system_matrix_deps := \
|
2018-04-03 18:38:41 +02:00
|
|
|
framework_compatibility_matrix.3.xml \
|
2019-04-09 23:08:40 +02:00
|
|
|
framework_compatibility_matrix.4.xml \
|
2020-03-25 22:59:05 +01:00
|
|
|
framework_compatibility_matrix.5.xml \
|
2021-05-21 01:51:38 +02:00
|
|
|
framework_compatibility_matrix.6.xml \
|
2020-03-25 23:16:45 +01:00
|
|
|
framework_compatibility_matrix.current.xml \
|
2019-01-22 23:27:50 +01:00
|
|
|
framework_compatibility_matrix.device.xml \
|
2018-06-12 03:07:53 +02:00
|
|
|
|
2019-01-22 23:27:50 +01:00
|
|
|
my_framework_matrix_deps += \
|
|
|
|
$(my_system_matrix_deps)
|
|
|
|
|
|
|
|
# Phony target that installs all system compatibility matrix files
|
2018-06-12 03:07:53 +02:00
|
|
|
include $(CLEAR_VARS)
|
2019-01-22 23:27:50 +01:00
|
|
|
LOCAL_MODULE := system_compatibility_matrix.xml
|
2021-02-13 05:13:01 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
|
|
|
LOCAL_LICENSE_CONDITIONS := notice
|
|
|
|
LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE
|
2018-06-12 03:07:53 +02:00
|
|
|
LOCAL_REQUIRED_MODULES := $(my_system_matrix_deps)
|
|
|
|
include $(BUILD_PHONY_PACKAGE)
|
|
|
|
|
2019-01-22 23:27:50 +01:00
|
|
|
# Phony target that installs all framework compatibility matrix files (system + product)
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE := framework_compatibility_matrix.xml
|
2021-02-13 05:13:01 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
|
|
|
LOCAL_LICENSE_CONDITIONS := notice
|
|
|
|
LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE
|
2019-01-22 23:27:50 +01:00
|
|
|
LOCAL_REQUIRED_MODULES := $(my_framework_matrix_deps)
|
|
|
|
include $(BUILD_PHONY_PACKAGE)
|
|
|
|
|
2018-06-12 03:07:53 +02:00
|
|
|
my_system_matrix_deps :=
|
2019-01-22 23:27:50 +01:00
|
|
|
my_framework_matrix_deps :=
|
|
|
|
my_empty_manifest :=
|
2018-01-23 23:34:41 +01:00
|
|
|
BUILD_FRAMEWORK_COMPATIBILITY_MATRIX :=
|