blob: 78351fe5f4a7af403232b3a0b09d6a370116ada2 [file] [log] [blame]
Yifan Hongffdad0f2018-02-01 14:50:10 -08001#
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
17LOCAL_PATH := $(call my-dir)
18
19FRAMEWORK_MANIFEST_INPUT_FILES := $(LOCAL_PATH)/manifest.xml
20ifdef DEVICE_FRAMEWORK_MANIFEST_FILE
21 FRAMEWORK_MANIFEST_INPUT_FILES += $(DEVICE_FRAMEWORK_MANIFEST_FILE)
22endif
23
24# VNDK Version in device compatibility matrix and framework manifest
25ifeq ($(BOARD_VNDK_VERSION),current)
26VINTF_VNDK_VERSION := $(PLATFORM_VNDK_VERSION)
27else
28VINTF_VNDK_VERSION := $(BOARD_VNDK_VERSION)
29endif
30
31# Device Compatibility Matrix
32ifdef DEVICE_MATRIX_FILE
Yifan Hong8731aa12018-02-01 15:19:23 -080033DEVICE_MATRIX_INPUT_FILE := $(DEVICE_MATRIX_FILE)
34else
35DEVICE_MATRIX_INPUT_FILE := $(LOCAL_PATH)/device_compatibility_matrix.default.xml
36endif
37
Yifan Hongffdad0f2018-02-01 14:50:10 -080038include $(CLEAR_VARS)
39LOCAL_MODULE := device_compatibility_matrix.xml
40LOCAL_MODULE_STEM := compatibility_matrix.xml
41LOCAL_MODULE_CLASS := ETC
42LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/vintf
43
44GEN := $(local-generated-sources-dir)/compatibility_matrix.xml
45
46$(GEN): PRIVATE_VINTF_VNDK_VERSION := $(VINTF_VNDK_VERSION)
Yifan Hongf2211cd2019-04-22 14:07:23 -070047$(GEN): PRIVATE_DEVICE_MATRIX_INPUT_FILE := $(DEVICE_MATRIX_INPUT_FILE)
Yifan Hong8731aa12018-02-01 15:19:23 -080048$(GEN): $(DEVICE_MATRIX_INPUT_FILE) $(HOST_OUT_EXECUTABLES)/assemble_vintf
Yifan Hongffdad0f2018-02-01 14:50:10 -080049 REQUIRED_VNDK_VERSION=$(PRIVATE_VINTF_VNDK_VERSION) \
50 BOARD_SYSTEMSDK_VERSIONS="$(BOARD_SYSTEMSDK_VERSIONS)" \
Yifan Hongf2211cd2019-04-22 14:07:23 -070051 $(HOST_OUT_EXECUTABLES)/assemble_vintf \
52 -i $(call normalize-path-list,$(PRIVATE_DEVICE_MATRIX_INPUT_FILE)) \
53 -o $@
Yifan Hongffdad0f2018-02-01 14:50:10 -080054
55LOCAL_PREBUILT_MODULE_FILE := $(GEN)
56include $(BUILD_PREBUILT)
57BUILT_VENDOR_MATRIX := $(LOCAL_BUILT_MODULE)
Yifan Hongffdad0f2018-02-01 14:50:10 -080058
59# Framework Manifest
60include $(CLEAR_VARS)
61LOCAL_MODULE := framework_manifest.xml
62LOCAL_MODULE_STEM := manifest.xml
63LOCAL_MODULE_CLASS := ETC
64LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/vintf
65
66GEN := $(local-generated-sources-dir)/manifest.xml
67
Yifan Hongffdad0f2018-02-01 14:50:10 -080068$(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 Moreland7ecc6342018-04-30 16:23:20 -070075 -o $@
Yifan Hongffdad0f2018-02-01 14:50:10 -080076
77LOCAL_PREBUILT_MODULE_FILE := $(GEN)
78include $(BUILD_PREBUILT)
79BUILT_SYSTEM_MANIFEST := $(LOCAL_BUILT_MODULE)
80
81VINTF_VNDK_VERSION :=
82FRAMEWORK_MANIFEST_INPUT_FILES :=
Yifan Hongf2211cd2019-04-22 14:07:23 -070083DEVICE_MATRIX_INPUT_FILE :=