Yifan Hong | ffdad0f | 2018-02-01 14:50:10 -0800 | [diff] [blame] | 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 | |
| 17 | LOCAL_PATH := $(call my-dir) |
| 18 | |
| 19 | FRAMEWORK_MANIFEST_INPUT_FILES := $(LOCAL_PATH)/manifest.xml |
| 20 | ifdef DEVICE_FRAMEWORK_MANIFEST_FILE |
| 21 | FRAMEWORK_MANIFEST_INPUT_FILES += $(DEVICE_FRAMEWORK_MANIFEST_FILE) |
| 22 | endif |
| 23 | |
| 24 | # VNDK Version in device compatibility matrix and framework manifest |
| 25 | ifeq ($(BOARD_VNDK_VERSION),current) |
| 26 | VINTF_VNDK_VERSION := $(PLATFORM_VNDK_VERSION) |
| 27 | else |
| 28 | VINTF_VNDK_VERSION := $(BOARD_VNDK_VERSION) |
| 29 | endif |
| 30 | |
| 31 | # Device Compatibility Matrix |
| 32 | ifdef DEVICE_MATRIX_FILE |
Yifan Hong | 8731aa1 | 2018-02-01 15:19:23 -0800 | [diff] [blame] | 33 | DEVICE_MATRIX_INPUT_FILE := $(DEVICE_MATRIX_FILE) |
| 34 | else |
| 35 | DEVICE_MATRIX_INPUT_FILE := $(LOCAL_PATH)/device_compatibility_matrix.default.xml |
| 36 | endif |
| 37 | |
Yifan Hong | ffdad0f | 2018-02-01 14:50:10 -0800 | [diff] [blame] | 38 | include $(CLEAR_VARS) |
| 39 | LOCAL_MODULE := device_compatibility_matrix.xml |
| 40 | LOCAL_MODULE_STEM := compatibility_matrix.xml |
| 41 | LOCAL_MODULE_CLASS := ETC |
| 42 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/vintf |
| 43 | |
| 44 | GEN := $(local-generated-sources-dir)/compatibility_matrix.xml |
| 45 | |
| 46 | $(GEN): PRIVATE_VINTF_VNDK_VERSION := $(VINTF_VNDK_VERSION) |
Yifan Hong | f2211cd | 2019-04-22 14:07:23 -0700 | [diff] [blame^] | 47 | $(GEN): PRIVATE_DEVICE_MATRIX_INPUT_FILE := $(DEVICE_MATRIX_INPUT_FILE) |
Yifan Hong | 8731aa1 | 2018-02-01 15:19:23 -0800 | [diff] [blame] | 48 | $(GEN): $(DEVICE_MATRIX_INPUT_FILE) $(HOST_OUT_EXECUTABLES)/assemble_vintf |
Yifan Hong | ffdad0f | 2018-02-01 14:50:10 -0800 | [diff] [blame] | 49 | REQUIRED_VNDK_VERSION=$(PRIVATE_VINTF_VNDK_VERSION) \ |
| 50 | BOARD_SYSTEMSDK_VERSIONS="$(BOARD_SYSTEMSDK_VERSIONS)" \ |
Yifan Hong | f2211cd | 2019-04-22 14:07:23 -0700 | [diff] [blame^] | 51 | $(HOST_OUT_EXECUTABLES)/assemble_vintf \ |
| 52 | -i $(call normalize-path-list,$(PRIVATE_DEVICE_MATRIX_INPUT_FILE)) \ |
| 53 | -o $@ |
Yifan Hong | ffdad0f | 2018-02-01 14:50:10 -0800 | [diff] [blame] | 54 | |
| 55 | LOCAL_PREBUILT_MODULE_FILE := $(GEN) |
| 56 | include $(BUILD_PREBUILT) |
| 57 | BUILT_VENDOR_MATRIX := $(LOCAL_BUILT_MODULE) |
Yifan Hong | ffdad0f | 2018-02-01 14:50:10 -0800 | [diff] [blame] | 58 | |
| 59 | # Framework Manifest |
| 60 | include $(CLEAR_VARS) |
| 61 | LOCAL_MODULE := framework_manifest.xml |
| 62 | LOCAL_MODULE_STEM := manifest.xml |
| 63 | LOCAL_MODULE_CLASS := ETC |
| 64 | LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/vintf |
| 65 | |
| 66 | GEN := $(local-generated-sources-dir)/manifest.xml |
| 67 | |
Yifan Hong | ffdad0f | 2018-02-01 14:50:10 -0800 | [diff] [blame] | 68 | $(GEN): PRIVATE_VINTF_VNDK_VERSION := $(VINTF_VNDK_VERSION) |
| 69 | $(GEN): PRIVATE_FRAMEWORK_MANIFEST_INPUT_FILES := $(FRAMEWORK_MANIFEST_INPUT_FILES) |
| 70 | $(GEN): $(FRAMEWORK_MANIFEST_INPUT_FILES) $(HOST_OUT_EXECUTABLES)/assemble_vintf |
| 71 | PROVIDED_VNDK_VERSIONS="$(PRIVATE_VINTF_VNDK_VERSION) $(PRODUCT_EXTRA_VNDK_VERSIONS)" \ |
| 72 | PLATFORM_SYSTEMSDK_VERSIONS="$(PLATFORM_SYSTEMSDK_VERSIONS)" \ |
| 73 | $(HOST_OUT_EXECUTABLES)/assemble_vintf \ |
| 74 | -i $(call normalize-path-list,$(PRIVATE_FRAMEWORK_MANIFEST_INPUT_FILES)) \ |
Steven Moreland | 7ecc634 | 2018-04-30 16:23:20 -0700 | [diff] [blame] | 75 | -o $@ |
Yifan Hong | ffdad0f | 2018-02-01 14:50:10 -0800 | [diff] [blame] | 76 | |
| 77 | LOCAL_PREBUILT_MODULE_FILE := $(GEN) |
| 78 | include $(BUILD_PREBUILT) |
| 79 | BUILT_SYSTEM_MANIFEST := $(LOCAL_BUILT_MODULE) |
| 80 | |
| 81 | VINTF_VNDK_VERSION := |
| 82 | FRAMEWORK_MANIFEST_INPUT_FILES := |
Yifan Hong | f2211cd | 2019-04-22 14:07:23 -0700 | [diff] [blame^] | 83 | DEVICE_MATRIX_INPUT_FILE := |