blob: d356cf32a2b2b5cf87c3d99fb1f5743e11984b83 [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
Jeongik Cha05f5dc32023-09-12 22:10:00 +090059# TODO(b/296875906): use POLICYVERS from Soong
60POLICYVERS ?= 30
61
Yifan Hong44c9b2e2018-01-23 14:34:41 -080062LOCAL_ADD_VBMETA_VERSION := true
63LOCAL_ASSEMBLE_VINTF_ENV_VARS := \
Yifan Hongb426af32018-02-02 12:47:48 -080064 POLICYVERS \
65 PLATFORM_SEPOLICY_VERSION \
66 PLATFORM_SEPOLICY_COMPAT_VERSIONS
Yifan Hong2d8442c2017-12-13 15:01:19 -080067
Yifan Hong44c9b2e2018-01-23 14:34:41 -080068include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
Yifan Hong2d8442c2017-12-13 15:01:19 -080069
Yifan Hongfee037a2019-01-22 14:27:50 -080070# Product Compatibility Matrix
71
72include $(CLEAR_VARS)
73include $(LOCAL_PATH)/clear_vars.mk
74LOCAL_MODULE := product_compatibility_matrix.xml
Bob Badourb224b362021-02-12 20:13:01 -080075LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
76LOCAL_LICENSE_CONDITIONS := notice
77LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE
Yifan Hongfee037a2019-01-22 14:27:50 -080078
79ifndef DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE
80my_framework_matrix_deps :=
81include $(BUILD_PHONY_PACKAGE)
82else # DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE
83
84LOCAL_MODULE_STEM := compatibility_matrix.xml
85LOCAL_PRODUCT_MODULE := true
86LOCAL_MODULE_CLASS := ETC
87LOCAL_MODULE_RELATIVE_PATH := vintf
88
Steven Moreland3aa47542020-10-08 17:16:32 +000089# DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE specifies absolute paths
Yifan Hongfee037a2019-01-22 14:27:50 -080090LOCAL_GENERATED_SOURCES := $(DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE)
91
92# Enforce that DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE does not specify required HALs
93# by checking it against an empty manifest.
94LOCAL_GEN_FILE_DEPENDENCIES += $(my_empty_manifest)
95LOCAL_ASSEMBLE_VINTF_FLAGS += -c "$(my_empty_manifest)"
96
97my_framework_matrix_deps := $(LOCAL_MODULE)
98
99include $(BUILD_FRAMEWORK_COMPATIBILITY_MATRIX)
100
101endif # DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE
102
Yifan Hong774c2bf2018-06-11 18:07:53 -0700103my_system_matrix_deps := \
Devin Moore5f679f32023-10-30 22:38:29 +0000104 framework_compatibility_matrix.4.xml \
Steven Moreland951fce02020-03-25 14:59:05 -0700105 framework_compatibility_matrix.5.xml \
Steven Morelandbe6a7972021-05-20 23:51:38 +0000106 framework_compatibility_matrix.6.xml \
Steven Morelandd901ed02022-04-23 00:10:33 +0000107 framework_compatibility_matrix.7.xml \
Devin Moored89a33b2023-01-25 22:09:40 +0000108 framework_compatibility_matrix.8.xml \
Devin Moore92aebea2023-06-30 22:40:08 +0000109 framework_compatibility_matrix.9.xml \
Nataniel Borges7202c602023-07-06 10:08:24 +0000110 framework_compatibility_matrix.device.xml \
Devin Moore92aebea2023-06-30 22:40:08 +0000111
Yifan Hongfee037a2019-01-22 14:27:50 -0800112my_framework_matrix_deps += \
113 $(my_system_matrix_deps)
114
115# Phony target that installs all system compatibility matrix files
116include $(CLEAR_VARS)
117LOCAL_MODULE := system_compatibility_matrix.xml
Bob Badourb224b362021-02-12 20:13:01 -0800118LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
119LOCAL_LICENSE_CONDITIONS := notice
120LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE
Yifan Hongfee037a2019-01-22 14:27:50 -0800121LOCAL_REQUIRED_MODULES := $(my_system_matrix_deps)
122include $(BUILD_PHONY_PACKAGE)
123
124# Phony target that installs all framework compatibility matrix files (system + product)
Yifan Hong774c2bf2018-06-11 18:07:53 -0700125include $(CLEAR_VARS)
126LOCAL_MODULE := framework_compatibility_matrix.xml
Bob Badourb224b362021-02-12 20:13:01 -0800127LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
128LOCAL_LICENSE_CONDITIONS := notice
129LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE
Yifan Hongfee037a2019-01-22 14:27:50 -0800130LOCAL_REQUIRED_MODULES := $(my_framework_matrix_deps)
Yifan Hong774c2bf2018-06-11 18:07:53 -0700131include $(BUILD_PHONY_PACKAGE)
132
Yifan Hong774c2bf2018-06-11 18:07:53 -0700133my_system_matrix_deps :=
Yifan Hongfee037a2019-01-22 14:27:50 -0800134my_framework_matrix_deps :=
135my_empty_manifest :=
Yifan Hong44c9b2e2018-01-23 14:34:41 -0800136BUILD_FRAMEWORK_COMPATIBILITY_MATRIX :=