blob: a82a421ff4dd5f8e80847251857262e2f8ffda1e [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 Badourb224b362021-02-12 20:13:01 -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 Badourb224b362021-02-12 20:13:01 -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 Moreland52f55602019-04-09 14:08:40 -0700101 framework_compatibility_matrix.4.xml \
Steven Moreland951fce02020-03-25 14:59:05 -0700102 framework_compatibility_matrix.5.xml \
Steven Morelandbe6a7972021-05-20 23:51:38 +0000103 framework_compatibility_matrix.6.xml \
Steven Morelandd901ed02022-04-23 00:10:33 +0000104 framework_compatibility_matrix.7.xml \
Devin Moored89a33b2023-01-25 22:09:40 +0000105 framework_compatibility_matrix.8.xml \
Devin Moore92aebea2023-06-30 22:40:08 +0000106 framework_compatibility_matrix.9.xml \
Nataniel Borges7202c602023-07-06 10:08:24 +0000107 framework_compatibility_matrix.device.xml \
Devin Moore92aebea2023-06-30 22:40:08 +0000108
Yifan Hongfee037a2019-01-22 14:27:50 -0800109my_framework_matrix_deps += \
110 $(my_system_matrix_deps)
111
112# Phony target that installs all system compatibility matrix files
113include $(CLEAR_VARS)
114LOCAL_MODULE := system_compatibility_matrix.xml
Bob Badourb224b362021-02-12 20:13:01 -0800115LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
116LOCAL_LICENSE_CONDITIONS := notice
117LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE
Yifan Hongfee037a2019-01-22 14:27:50 -0800118LOCAL_REQUIRED_MODULES := $(my_system_matrix_deps)
119include $(BUILD_PHONY_PACKAGE)
120
121# Phony target that installs all framework compatibility matrix files (system + product)
Yifan Hong774c2bf2018-06-11 18:07:53 -0700122include $(CLEAR_VARS)
123LOCAL_MODULE := framework_compatibility_matrix.xml
Bob Badourb224b362021-02-12 20:13:01 -0800124LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
125LOCAL_LICENSE_CONDITIONS := notice
126LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE
Yifan Hongfee037a2019-01-22 14:27:50 -0800127LOCAL_REQUIRED_MODULES := $(my_framework_matrix_deps)
Yifan Hong774c2bf2018-06-11 18:07:53 -0700128include $(BUILD_PHONY_PACKAGE)
129
Yifan Hong774c2bf2018-06-11 18:07:53 -0700130my_system_matrix_deps :=
Yifan Hongfee037a2019-01-22 14:27:50 -0800131my_framework_matrix_deps :=
132my_empty_manifest :=
Yifan Hong44c9b2e2018-01-23 14:34:41 -0800133BUILD_FRAMEWORK_COMPATIBILITY_MATRIX :=