blob: 4cefb5506e51dcbc6e947aafe917daba28b92f23 [file] [log] [blame]
Yifan Hong2d8442c2017-12-13 15:01:19 -08001#
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
17LOCAL_PATH := $(call my-dir)
18
Yifan Hong44c9b2e2018-01-23 14:34:41 -080019BUILD_FRAMEWORK_COMPATIBILITY_MATRIX := $(LOCAL_PATH)/compatibility_matrix.mk
Yifan Hongfee037a2019-01-22 14:27:50 -080020my_empty_manifest := $(LOCAL_PATH)/manifest.empty.xml
Yifan Hong44c9b2e2018-01-23 14:34:41 -080021
Yifan Hongfee037a2019-01-22 14:27:50 -080022# System Compatibility Matrix (common to all FCM versions)
Yifan Hong44c9b2e2018-01-23 14:34:41 -080023
Yifan Hong2d8442c2017-12-13 15:01:19 -080024include $(CLEAR_VARS)
Yifan Hong366101c2018-04-25 14:36:00 -070025include $(LOCAL_PATH)/clear_vars.mk
Yifan Hong13df6282018-03-23 12:03:33 -070026LOCAL_MODULE := framework_compatibility_matrix.device.xml
Bob Badourc22b35b2021-02-23 14:26:20 -080027LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
28LOCAL_LICENSE_CONDITIONS := notice
29LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE
Yifan Hong37ad8c42018-03-29 10:51:48 -070030LOCAL_MODULE_STEM := compatibility_matrix.device.xml
31# define LOCAL_MODULE_CLASS for local-generated-sources-dir.
Yifan Hong13df6282018-03-23 12:03:33 -070032LOCAL_MODULE_CLASS := ETC
Yifan Hongfee037a2019-01-22 14:27:50 -080033LOCAL_MODULE_RELATIVE_PATH := vintf
Yifan Hong13df6282018-03-23 12:03:33 -070034
35ifndef DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE
36LOCAL_SRC_FILES := compatibility_matrix.empty.xml
37else
38
Steven Moreland3aa47542020-10-08 17:16:32 +000039# DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE specifies absolute paths
Yifan Hong13df6282018-03-23 12:03:33 -070040LOCAL_GENERATED_SOURCES := $(DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE)
41
42# Enforce that DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE does not specify required HALs
43# by checking it against an empty manifest. But the empty manifest needs to contain
44# BOARD_SEPOLICY_VERS to be compatible with DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE.
Yifan Hong13df6282018-03-23 12:03:33 -070045my_gen_check_manifest := $(local-generated-sources-dir)/manifest.check.xml
Yifan Hongfee037a2019-01-22 14:27:50 -080046$(my_gen_check_manifest): PRIVATE_SRC_FILE := $(my_empty_manifest)
47$(my_gen_check_manifest): $(my_empty_manifest) $(HOST_OUT_EXECUTABLES)/assemble_vintf
Yifan Hong13df6282018-03-23 12:03:33 -070048 BOARD_SEPOLICY_VERS=$(BOARD_SEPOLICY_VERS) \
Yifan Hongb2a83d12018-03-29 10:57:12 -070049 VINTF_IGNORE_TARGET_FCM_VERSION=true \
Yifan Hong13df6282018-03-23 12:03:33 -070050 $(HOST_OUT_EXECUTABLES)/assemble_vintf -i $(PRIVATE_SRC_FILE) -o $@
51
52LOCAL_GEN_FILE_DEPENDENCIES += $(my_gen_check_manifest)
53LOCAL_ASSEMBLE_VINTF_FLAGS += -c "$(my_gen_check_manifest)"
54
55my_gen_check_manifest :=
Yifan Hong13df6282018-03-23 12:03:33 -070056
57endif # DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE
58
Yifan Hong44c9b2e2018-01-23 14:34:41 -080059LOCAL_ADD_VBMETA_VERSION := true
60LOCAL_ASSEMBLE_VINTF_ENV_VARS := \
Yifan Hongb426af32018-02-02 12:47:48 -080061 POLICYVERS \
62 PLATFORM_SEPOLICY_VERSION \
63 PLATFORM_SEPOLICY_COMPAT_VERSIONS
Yifan Hong2d8442c2017-12-13 15:01:19 -080064
Yifan Hong44c9b2e2018-01-23 14:34:41 -080065include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
Yifan Hong2d8442c2017-12-13 15:01:19 -080066
Yifan Hongfee037a2019-01-22 14:27:50 -080067# Product Compatibility Matrix
68
69include $(CLEAR_VARS)
70include $(LOCAL_PATH)/clear_vars.mk
71LOCAL_MODULE := product_compatibility_matrix.xml
Bob Badourc22b35b2021-02-23 14:26:20 -080072LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
73LOCAL_LICENSE_CONDITIONS := notice
74LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE
Yifan Hongfee037a2019-01-22 14:27:50 -080075
76ifndef DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE
77my_framework_matrix_deps :=
78include $(BUILD_PHONY_PACKAGE)
79else # DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE
80
81LOCAL_MODULE_STEM := compatibility_matrix.xml
82LOCAL_PRODUCT_MODULE := true
83LOCAL_MODULE_CLASS := ETC
84LOCAL_MODULE_RELATIVE_PATH := vintf
85
Steven Moreland3aa47542020-10-08 17:16:32 +000086# DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE specifies absolute paths
Yifan Hongfee037a2019-01-22 14:27:50 -080087LOCAL_GENERATED_SOURCES := $(DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE)
88
89# Enforce that DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE does not specify required HALs
90# by checking it against an empty manifest.
91LOCAL_GEN_FILE_DEPENDENCIES += $(my_empty_manifest)
92LOCAL_ASSEMBLE_VINTF_FLAGS += -c "$(my_empty_manifest)"
93
94my_framework_matrix_deps := $(LOCAL_MODULE)
95
96include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
97
98endif # DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE
99
Yifan Hong774c2bf2018-06-11 18:07:53 -0700100my_system_matrix_deps := \
Steven Moreland92ea6542018-04-03 09:38:41 -0700101 framework_compatibility_matrix.3.xml \
Steven Moreland52f55602019-04-09 14:08:40 -0700102 framework_compatibility_matrix.4.xml \
Steven Moreland951fce02020-03-25 14:59:05 -0700103 framework_compatibility_matrix.5.xml \
Steven Moreland86a518c2021-05-20 23:51:38 +0000104 framework_compatibility_matrix.6.xml \
Yifan Hongfee037a2019-01-22 14:27:50 -0800105 framework_compatibility_matrix.device.xml \
Yifan Hong774c2bf2018-06-11 18:07:53 -0700106
Yifan Hongfee037a2019-01-22 14:27:50 -0800107my_framework_matrix_deps += \
108 $(my_system_matrix_deps)
109
110# Phony target that installs all system compatibility matrix files
111include $(CLEAR_VARS)
112LOCAL_MODULE := system_compatibility_matrix.xml
Bob Badourc22b35b2021-02-23 14:26:20 -0800113LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
114LOCAL_LICENSE_CONDITIONS := notice
115LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE
Yifan Hongfee037a2019-01-22 14:27:50 -0800116LOCAL_REQUIRED_MODULES := $(my_system_matrix_deps)
117include $(BUILD_PHONY_PACKAGE)
118
119# Phony target that installs all framework compatibility matrix files (system + product)
Yifan Hong774c2bf2018-06-11 18:07:53 -0700120include $(CLEAR_VARS)
121LOCAL_MODULE := framework_compatibility_matrix.xml
Bob Badourc22b35b2021-02-23 14:26:20 -0800122LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
123LOCAL_LICENSE_CONDITIONS := notice
124LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE
Yifan Hongfee037a2019-01-22 14:27:50 -0800125LOCAL_REQUIRED_MODULES := $(my_framework_matrix_deps)
Yifan Hong774c2bf2018-06-11 18:07:53 -0700126include $(BUILD_PHONY_PACKAGE)
127
Yifan Hong774c2bf2018-06-11 18:07:53 -0700128my_system_matrix_deps :=
Yifan Hongfee037a2019-01-22 14:27:50 -0800129my_framework_matrix_deps :=
130my_empty_manifest :=
Yifan Hong44c9b2e2018-01-23 14:34:41 -0800131BUILD_FRAMEWORK_COMPATIBILITY_MATRIX :=