dianlujitao | b492f3f | 2020-09-11 13:23:18 +0800 | [diff] [blame] | 1 | PATH_OVERRIDE_SOONG := $(shell echo $(TOOLS_PATH_OVERRIDE)) |
Rashed Abdel-Tawab | dfc3d18 | 2019-09-06 10:44:50 -0700 | [diff] [blame] | 2 | |
Rashed Abdel-Tawab | 9fa7e80 | 2018-09-18 21:53:24 -0700 | [diff] [blame] | 3 | # Add variables that we wish to make available to soong here. |
| 4 | EXPORT_TO_SOONG := \ |
| 5 | KERNEL_ARCH \ |
Rashed Abdel-Tawab | ba5ea35 | 2019-09-07 17:01:13 -0700 | [diff] [blame] | 6 | KERNEL_BUILD_OUT_PREFIX \ |
Rashed Abdel-Tawab | 9fa7e80 | 2018-09-18 21:53:24 -0700 | [diff] [blame] | 7 | KERNEL_CROSS_COMPILE \ |
Rashed Abdel-Tawab | fb35b9d | 2019-09-05 21:21:13 -0700 | [diff] [blame] | 8 | KERNEL_MAKE_CMD \ |
Rashed Abdel-Tawab | 9fa7e80 | 2018-09-18 21:53:24 -0700 | [diff] [blame] | 9 | KERNEL_MAKE_FLAGS \ |
Rashed Abdel-Tawab | dfc3d18 | 2019-09-06 10:44:50 -0700 | [diff] [blame] | 10 | PATH_OVERRIDE_SOONG \ |
Rashed Abdel-Tawab | 9fa7e80 | 2018-09-18 21:53:24 -0700 | [diff] [blame] | 11 | TARGET_KERNEL_CONFIG \ |
| 12 | TARGET_KERNEL_SOURCE |
| 13 | |
| 14 | # Setup SOONG_CONFIG_* vars to export the vars listed above. |
| 15 | # Documentation here: |
| 16 | # https://github.com/LineageOS/android_build_soong/commit/8328367c44085b948c003116c0ed74a047237a69 |
| 17 | |
Jackeagle | d6811aa | 2019-09-24 08:26:40 +0200 | [diff] [blame] | 18 | SOONG_CONFIG_NAMESPACES += blissVarsPlugin |
Rashed Abdel-Tawab | 9fa7e80 | 2018-09-18 21:53:24 -0700 | [diff] [blame] | 19 | |
Jackeagle | d6811aa | 2019-09-24 08:26:40 +0200 | [diff] [blame] | 20 | SOONG_CONFIG_blissVarsPlugin := |
Rashed Abdel-Tawab | 9fa7e80 | 2018-09-18 21:53:24 -0700 | [diff] [blame] | 21 | |
| 22 | define addVar |
Jackeagle | d6811aa | 2019-09-24 08:26:40 +0200 | [diff] [blame] | 23 | SOONG_CONFIG_blissVarsPlugin += $(1) |
| 24 | SOONG_CONFIG_blissVarsPlugin_$(1) := $$(subst ",\",$$($1)) |
Rashed Abdel-Tawab | 9fa7e80 | 2018-09-18 21:53:24 -0700 | [diff] [blame] | 25 | endef |
| 26 | |
| 27 | $(foreach v,$(EXPORT_TO_SOONG),$(eval $(call addVar,$(v)))) |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 28 | |
| 29 | SOONG_CONFIG_NAMESPACES += blissGlobalVars |
| 30 | SOONG_CONFIG_blissGlobalVars += \ |
| 31 | additional_gralloc_10_usage_bits \ |
| 32 | bootloader_message_offset \ |
Arne Coucheron | a31f8f9 | 2020-11-07 00:46:10 +0100 | [diff] [blame] | 33 | disable_postrender_cleanup \ |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 34 | has_legacy_camera_hal1 \ |
Jan Altensen | a61f930 | 2020-10-17 18:10:26 +0200 | [diff] [blame] | 35 | has_memfd_backport \ |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 36 | ignores_ftp_pptp_conntrack_failure \ |
| 37 | needs_netd_direct_connect_rule \ |
Lup Gabriel | 09fc685 | 2021-06-06 18:24:41 +0900 | [diff] [blame] | 38 | camera_needs_client_info \ |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 39 | target_init_vendor_lib \ |
daniml3 | 25cc527 | 2021-01-21 16:56:41 +0100 | [diff] [blame] | 40 | target_inputdispatcher_skip_event_key \ |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 41 | target_ld_shim_libs \ |
| 42 | target_process_sdk_version_override \ |
TheScarastic | 8541a94 | 2021-10-19 08:07:54 +0000 | [diff] [blame] | 43 | target_surfaceflinger_udfps_lib \ |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 44 | uses_camera_parameter_lib |
| 45 | |
| 46 | SOONG_CONFIG_NAMESPACES += blissNvidiaVars |
| 47 | SOONG_CONFIG_blissNvidiaVars += \ |
Aaron Kling | 4e3ee91 | 2022-03-24 22:55:35 -0500 | [diff] [blame] | 48 | uses_nvidia_enhancements |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 49 | |
| 50 | SOONG_CONFIG_NAMESPACES += blissQcomVars |
| 51 | SOONG_CONFIG_blissQcomVars += \ |
Nolen Johnson | 9020f28 | 2021-02-22 12:36:48 -0500 | [diff] [blame] | 52 | legacy_hw_disk_encryption \ |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 53 | should_wait_for_qsee \ |
LuK1337 | e7aff48 | 2021-04-10 10:56:15 +0200 | [diff] [blame] | 54 | supports_audio_accessory \ |
| 55 | supports_debug_accessory \ |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 56 | supports_extended_compress_format \ |
| 57 | supports_hw_fde \ |
| 58 | supports_hw_fde_perf \ |
| 59 | uses_pre_uplink_features_netmgrd \ |
| 60 | uses_qcom_bsp_legacy \ |
jhenrique09 | ad4d1ad | 2020-11-23 14:20:20 +0000 | [diff] [blame] | 61 | uses_qti_camera_device \ |
| 62 | needs_camera_boottime_timestamp |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 63 | |
Alessandro Astone | 3fc779e | 2021-01-05 18:04:14 +0100 | [diff] [blame] | 64 | # Only create display_headers_namespace var if dealing with UM platforms to avoid breaking build for all other platforms |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 65 | ifneq ($(filter $(UM_PLATFORMS),$(TARGET_BOARD_PLATFORM)),) |
| 66 | SOONG_CONFIG_blissQcomVars += \ |
Alessandro Astone | 3fc779e | 2021-01-05 18:04:14 +0100 | [diff] [blame] | 67 | qcom_display_headers_namespace |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 68 | endif |
| 69 | |
| 70 | # Soong bool variables |
Arne Coucheron | a31f8f9 | 2020-11-07 00:46:10 +0100 | [diff] [blame] | 71 | SOONG_CONFIG_blissGlobalVars_disable_postrender_cleanup := $(TARGET_DISABLE_POSTRENDER_CLEANUP) |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 72 | SOONG_CONFIG_blissGlobalVars_has_legacy_camera_hal1 := $(TARGET_HAS_LEGACY_CAMERA_HAL1) |
Jan Altensen | a61f930 | 2020-10-17 18:10:26 +0200 | [diff] [blame] | 73 | SOONG_CONFIG_blissGlobalVars_has_memfd_backport := $(TARGET_HAS_MEMFD_BACKPORT) |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 74 | SOONG_CONFIG_blissGlobalVars_ignores_ftp_pptp_conntrack_failure := $(TARGET_IGNORES_FTP_PPTP_CONNTRACK_FAILURE) |
| 75 | SOONG_CONFIG_blissGlobalVars_needs_netd_direct_connect_rule := $(TARGET_NEEDS_NETD_DIRECT_CONNECT_RULE) |
Lup Gabriel | 09fc685 | 2021-06-06 18:24:41 +0900 | [diff] [blame] | 76 | SOONG_CONFIG_blissGlobalVars_camera_needs_client_info := $(TARGET_CAMERA_NEEDS_CLIENT_INFO) |
Aaron Kling | 4e3ee91 | 2022-03-24 22:55:35 -0500 | [diff] [blame] | 77 | SOONG_CONFIG_blissNvidiaVars_uses_nvidia_enhancements := $(NV_ANDROID_FRAMEWORK_ENHANCEMENTS) |
Nolen Johnson | 9020f28 | 2021-02-22 12:36:48 -0500 | [diff] [blame] | 78 | SOONG_CONFIG_blissQcomVars_legacy_hw_disk_encryption := $(TARGET_LEGACY_HW_DISK_ENCRYPTION) |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 79 | SOONG_CONFIG_blissQcomVars_should_wait_for_qsee := $(TARGET_KEYMASTER_WAIT_FOR_QSEE) |
LuK1337 | e7aff48 | 2021-04-10 10:56:15 +0200 | [diff] [blame] | 80 | SOONG_CONFIG_blissQcomVars_supports_audio_accessory := $(TARGET_QTI_USB_SUPPORTS_AUDIO_ACCESSORY) |
| 81 | SOONG_CONFIG_blissQcomVars_supports_debug_accessory := $(TARGET_QTI_USB_SUPPORTS_DEBUG_ACCESSORY) |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 82 | SOONG_CONFIG_blissQcomVars_supports_extended_compress_format := $(AUDIO_FEATURE_ENABLED_EXTENDED_COMPRESS_FORMAT) |
| 83 | SOONG_CONFIG_blissQcomVars_supports_hw_fde := $(TARGET_HW_DISK_ENCRYPTION) |
| 84 | SOONG_CONFIG_blissQcomVars_supports_hw_fde_perf := $(TARGET_HW_DISK_ENCRYPTION_PERF) |
| 85 | SOONG_CONFIG_blissQcomVars_uses_pre_uplink_features_netmgrd := $(TARGET_USES_PRE_UPLINK_FEATURES_NETMGRD) |
| 86 | SOONG_CONFIG_blissQcomVars_uses_qcom_bsp_legacy := $(TARGET_USES_QCOM_BSP_LEGACY) |
| 87 | SOONG_CONFIG_blissQcomVars_uses_qti_camera_device := $(TARGET_USES_QTI_CAMERA_DEVICE) |
jhenrique09 | ad4d1ad | 2020-11-23 14:20:20 +0000 | [diff] [blame] | 88 | SOONG_CONFIG_blissQcomVars_needs_camera_boottime_timestamp := $(TARGET_CAMERA_BOOTTIME_TIMESTAMP) |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 89 | |
| 90 | # Set default values |
| 91 | BOOTLOADER_MESSAGE_OFFSET ?= 0 |
Bruno Martins | 3ed1eb9 | 2020-10-17 10:20:37 +0100 | [diff] [blame] | 92 | TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS ?= 0 |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 93 | TARGET_INIT_VENDOR_LIB ?= vendor_init |
daniml3 | 25cc527 | 2021-01-21 16:56:41 +0100 | [diff] [blame] | 94 | TARGET_INPUTDISPATCHER_SKIP_EVENT_KEY ?= 0 |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 95 | TARGET_SPECIFIC_CAMERA_PARAMETER_LIBRARY ?= libcamera_parameters |
TheScarastic | 8541a94 | 2021-10-19 08:07:54 +0000 | [diff] [blame] | 96 | TARGET_SURFACEFLINGER_UDFPS_LIB ?= surfaceflinger_udfps_lib |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 97 | |
| 98 | # Soong value variables |
| 99 | SOONG_CONFIG_blissGlobalVars_additional_gralloc_10_usage_bits := $(TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS) |
| 100 | SOONG_CONFIG_blissGlobalVars_bootloader_message_offset := $(BOOTLOADER_MESSAGE_OFFSET) |
| 101 | SOONG_CONFIG_blissGlobalVars_target_init_vendor_lib := $(TARGET_INIT_VENDOR_LIB) |
| 102 | SOONG_CONFIG_blissGlobalVars_target_ld_shim_libs := $(subst $(space),:,$(TARGET_LD_SHIM_LIBS)) |
| 103 | SOONG_CONFIG_blissGlobalVars_target_process_sdk_version_override := $(TARGET_PROCESS_SDK_VERSION_OVERRIDE) |
TheScarastic | 8541a94 | 2021-10-19 08:07:54 +0000 | [diff] [blame] | 104 | SOONG_CONFIG_blissGlobalVars_target_surfaceflinger_udfps_lib := $(TARGET_SURFACEFLINGER_UDFPS_LIB) |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 105 | SOONG_CONFIG_blissGlobalVars_uses_camera_parameter_lib := $(TARGET_SPECIFIC_CAMERA_PARAMETER_LIBRARY) |
daniml3 | 25cc527 | 2021-01-21 16:56:41 +0100 | [diff] [blame] | 106 | SOONG_CONFIG_blissGlobalVars_target_inputdispatcher_skip_event_key := $(TARGET_INPUTDISPATCHER_SKIP_EVENT_KEY) |
| 107 | |
Alessandro Astone | 3fc779e | 2021-01-05 18:04:14 +0100 | [diff] [blame] | 108 | ifneq ($(filter $(QSSI_SUPPORTED_PLATFORMS),$(TARGET_BOARD_PLATFORM)),) |
| 109 | SOONG_CONFIG_blissQcomVars_qcom_display_headers_namespace := vendor/qcom/opensource/commonsys-intf/display |
| 110 | else |
| 111 | SOONG_CONFIG_blissQcomVars_qcom_display_headers_namespace := $(QCOM_SOONG_NAMESPACE)/display |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 112 | endif |
Pig | 033b440 | 2020-09-19 08:44:33 +0800 | [diff] [blame] | 113 | |
| 114 | ifneq ($(TARGET_USE_QTI_BT_STACK),true) |
| 115 | PRODUCT_SOONG_NAMESPACES += packages/apps/Bluetooth |
| 116 | endif #TARGET_USE_QTI_BT_STACK |
Adithya R | 2ee2c76 | 2021-10-26 22:58:24 +0530 | [diff] [blame] | 117 | |
| 118 | ifneq ($(TARGET_USES_NQ_NFC),true) |
| 119 | PRODUCT_SOONG_NAMESPACES += hardware/nxp |
| 120 | endif #TARGET_USES_NQ_NFC |