Android.mk 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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. LOCAL_PATH := $(call my-dir)
  17. # DEVICE_FRAMEWORK_MANIFEST_FILE is a device-specific framework manifest file
  18. # that installed to the system image. HALs entries should be written to
  19. # DEVICE_FRAMEWORK_MANIFEST_FILE or PRODUCT_MANIFEST_FILES depend on the path of
  20. # the module. It is recommended that such device-specific modules to be
  21. # installed on product partition.
  22. FRAMEWORK_MANIFEST_INPUT_FILES := $(LOCAL_PATH)/manifest.xml
  23. ifdef DEVICE_FRAMEWORK_MANIFEST_FILE
  24. FRAMEWORK_MANIFEST_INPUT_FILES += $(DEVICE_FRAMEWORK_MANIFEST_FILE)
  25. endif
  26. # VNDK Version in device compatibility matrix and framework manifest
  27. ifeq ($(BOARD_VNDK_VERSION),current)
  28. VINTF_VNDK_VERSION := $(PLATFORM_VNDK_VERSION)
  29. else
  30. VINTF_VNDK_VERSION := $(BOARD_VNDK_VERSION)
  31. endif
  32. # Device Compatibility Matrix
  33. ifdef DEVICE_MATRIX_FILE
  34. DEVICE_MATRIX_INPUT_FILE := $(DEVICE_MATRIX_FILE)
  35. else
  36. DEVICE_MATRIX_INPUT_FILE := $(LOCAL_PATH)/device_compatibility_matrix.default.xml
  37. endif
  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. GEN := $(local-generated-sources-dir)/compatibility_matrix.xml
  44. $(GEN): PRIVATE_VINTF_VNDK_VERSION := $(VINTF_VNDK_VERSION)
  45. $(GEN): PRIVATE_DEVICE_MATRIX_INPUT_FILE := $(DEVICE_MATRIX_INPUT_FILE)
  46. $(GEN): $(DEVICE_MATRIX_INPUT_FILE) $(HOST_OUT_EXECUTABLES)/assemble_vintf
  47. REQUIRED_VNDK_VERSION=$(PRIVATE_VINTF_VNDK_VERSION) \
  48. BOARD_SYSTEMSDK_VERSIONS="$(BOARD_SYSTEMSDK_VERSIONS)" \
  49. $(HOST_OUT_EXECUTABLES)/assemble_vintf \
  50. -i $(call normalize-path-list,$(PRIVATE_DEVICE_MATRIX_INPUT_FILE)) \
  51. -o $@
  52. LOCAL_PREBUILT_MODULE_FILE := $(GEN)
  53. include $(BUILD_PREBUILT)
  54. BUILT_VENDOR_MATRIX := $(LOCAL_BUILT_MODULE)
  55. # System Manifest
  56. include $(CLEAR_VARS)
  57. LOCAL_MODULE := system_manifest.xml
  58. LOCAL_MODULE_STEM := manifest.xml
  59. LOCAL_MODULE_CLASS := ETC
  60. LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/vintf
  61. GEN := $(local-generated-sources-dir)/manifest.xml
  62. $(GEN): PRIVATE_VINTF_VNDK_VERSION := $(VINTF_VNDK_VERSION)
  63. $(GEN): PRIVATE_FRAMEWORK_MANIFEST_INPUT_FILES := $(FRAMEWORK_MANIFEST_INPUT_FILES)
  64. $(GEN): $(FRAMEWORK_MANIFEST_INPUT_FILES) $(HOST_OUT_EXECUTABLES)/assemble_vintf
  65. PROVIDED_VNDK_VERSIONS="$(PRIVATE_VINTF_VNDK_VERSION) $(PRODUCT_EXTRA_VNDK_VERSIONS)" \
  66. PLATFORM_SYSTEMSDK_VERSIONS="$(PLATFORM_SYSTEMSDK_VERSIONS)" \
  67. $(HOST_OUT_EXECUTABLES)/assemble_vintf \
  68. -i $(call normalize-path-list,$(PRIVATE_FRAMEWORK_MANIFEST_INPUT_FILES)) \
  69. -o $@
  70. LOCAL_PREBUILT_MODULE_FILE := $(GEN)
  71. include $(BUILD_PREBUILT)
  72. BUILT_SYSTEM_MANIFEST := $(LOCAL_BUILT_MODULE)
  73. # Product Manifest
  74. ifneq ($(PRODUCT_MANIFEST_FILES),)
  75. include $(CLEAR_VARS)
  76. LOCAL_MODULE := product_manifest.xml
  77. LOCAL_MODULE_STEM := manifest.xml
  78. LOCAL_MODULE_CLASS := ETC
  79. LOCAL_MODULE_RELATIVE_PATH := vintf
  80. GEN := $(local-generated-sources-dir)/manifest.xml
  81. $(GEN): PRIVATE_PRODUCT_MANIFEST_FILES := $(PRODUCT_MANIFEST_FILES)
  82. $(GEN): $(PRODUCT_MANIFEST_FILES) $(HOST_OUT_EXECUTABLES)/assemble_vintf
  83. $(HOST_OUT_EXECUTABLES)/assemble_vintf \
  84. -i $(call normalize-path-list,$(PRIVATE_PRODUCT_MANIFEST_FILES)) \
  85. -o $@
  86. LOCAL_PREBUILT_MODULE_FILE := $(GEN)
  87. include $(BUILD_PREBUILT)
  88. BUILT_PRODUCT_MANIFEST := $(LOCAL_BUILT_MODULE)
  89. endif
  90. VINTF_VNDK_VERSION :=
  91. FRAMEWORK_MANIFEST_INPUT_FILES :=
  92. DEVICE_MATRIX_INPUT_FILE :=
  93. PRODUCT_MANIFEST_INPUT_FILES :=