blob: 58c976c8f5e6f79ed369fa9a1b785e240a1bbf31 [file] [log] [blame]
dianlujitaob492f3f2020-09-11 13:23:18 +08001PATH_OVERRIDE_SOONG := $(shell echo $(TOOLS_PATH_OVERRIDE))
Rashed Abdel-Tawabdfc3d182019-09-06 10:44:50 -07002
Rashed Abdel-Tawab9fa7e802018-09-18 21:53:24 -07003# Add variables that we wish to make available to soong here.
4EXPORT_TO_SOONG := \
5 KERNEL_ARCH \
Rashed Abdel-Tawabba5ea352019-09-07 17:01:13 -07006 KERNEL_BUILD_OUT_PREFIX \
Rashed Abdel-Tawab9fa7e802018-09-18 21:53:24 -07007 KERNEL_CROSS_COMPILE \
Rashed Abdel-Tawabfb35b9d2019-09-05 21:21:13 -07008 KERNEL_MAKE_CMD \
Rashed Abdel-Tawab9fa7e802018-09-18 21:53:24 -07009 KERNEL_MAKE_FLAGS \
Rashed Abdel-Tawabdfc3d182019-09-06 10:44:50 -070010 PATH_OVERRIDE_SOONG \
Rashed Abdel-Tawab9fa7e802018-09-18 21:53:24 -070011 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
Jackeagled6811aa2019-09-24 08:26:40 +020018SOONG_CONFIG_NAMESPACES += blissVarsPlugin
Rashed Abdel-Tawab9fa7e802018-09-18 21:53:24 -070019
Jackeagled6811aa2019-09-24 08:26:40 +020020SOONG_CONFIG_blissVarsPlugin :=
Rashed Abdel-Tawab9fa7e802018-09-18 21:53:24 -070021
22define addVar
Jackeagled6811aa2019-09-24 08:26:40 +020023 SOONG_CONFIG_blissVarsPlugin += $(1)
24 SOONG_CONFIG_blissVarsPlugin_$(1) := $$(subst ",\",$$($1))
Rashed Abdel-Tawab9fa7e802018-09-18 21:53:24 -070025endef
26
27$(foreach v,$(EXPORT_TO_SOONG),$(eval $(call addVar,$(v))))
Pig02f678a2020-10-15 02:58:37 +080028
29SOONG_CONFIG_NAMESPACES += blissGlobalVars
30SOONG_CONFIG_blissGlobalVars += \
31 additional_gralloc_10_usage_bits \
32 bootloader_message_offset \
Arne Coucherona31f8f92020-11-07 00:46:10 +010033 disable_postrender_cleanup \
Pig02f678a2020-10-15 02:58:37 +080034 has_legacy_camera_hal1 \
Jan Altensena61f9302020-10-17 18:10:26 +020035 has_memfd_backport \
Pig02f678a2020-10-15 02:58:37 +080036 ignores_ftp_pptp_conntrack_failure \
37 needs_netd_direct_connect_rule \
Lup Gabriel09fc6852021-06-06 18:24:41 +090038 camera_needs_client_info \
Pig02f678a2020-10-15 02:58:37 +080039 target_init_vendor_lib \
daniml325cc5272021-01-21 16:56:41 +010040 target_inputdispatcher_skip_event_key \
Pig02f678a2020-10-15 02:58:37 +080041 target_ld_shim_libs \
42 target_process_sdk_version_override \
TheScarastic8541a942021-10-19 08:07:54 +000043 target_surfaceflinger_udfps_lib \
Pig02f678a2020-10-15 02:58:37 +080044 uses_camera_parameter_lib
45
46SOONG_CONFIG_NAMESPACES += blissNvidiaVars
47SOONG_CONFIG_blissNvidiaVars += \
Aaron Kling4e3ee912022-03-24 22:55:35 -050048 uses_nvidia_enhancements
Pig02f678a2020-10-15 02:58:37 +080049
50SOONG_CONFIG_NAMESPACES += blissQcomVars
51SOONG_CONFIG_blissQcomVars += \
Nolen Johnson9020f282021-02-22 12:36:48 -050052 legacy_hw_disk_encryption \
Pig02f678a2020-10-15 02:58:37 +080053 should_wait_for_qsee \
LuK1337e7aff482021-04-10 10:56:15 +020054 supports_audio_accessory \
55 supports_debug_accessory \
Pig02f678a2020-10-15 02:58:37 +080056 supports_extended_compress_format \
57 supports_hw_fde \
58 supports_hw_fde_perf \
59 uses_pre_uplink_features_netmgrd \
60 uses_qcom_bsp_legacy \
jhenrique09ad4d1ad2020-11-23 14:20:20 +000061 uses_qti_camera_device \
62 needs_camera_boottime_timestamp
Pig02f678a2020-10-15 02:58:37 +080063
Alessandro Astone3fc779e2021-01-05 18:04:14 +010064# Only create display_headers_namespace var if dealing with UM platforms to avoid breaking build for all other platforms
Pig02f678a2020-10-15 02:58:37 +080065ifneq ($(filter $(UM_PLATFORMS),$(TARGET_BOARD_PLATFORM)),)
66SOONG_CONFIG_blissQcomVars += \
Alessandro Astone3fc779e2021-01-05 18:04:14 +010067 qcom_display_headers_namespace
Pig02f678a2020-10-15 02:58:37 +080068endif
69
70# Soong bool variables
Arne Coucherona31f8f92020-11-07 00:46:10 +010071SOONG_CONFIG_blissGlobalVars_disable_postrender_cleanup := $(TARGET_DISABLE_POSTRENDER_CLEANUP)
Pig02f678a2020-10-15 02:58:37 +080072SOONG_CONFIG_blissGlobalVars_has_legacy_camera_hal1 := $(TARGET_HAS_LEGACY_CAMERA_HAL1)
Jan Altensena61f9302020-10-17 18:10:26 +020073SOONG_CONFIG_blissGlobalVars_has_memfd_backport := $(TARGET_HAS_MEMFD_BACKPORT)
Pig02f678a2020-10-15 02:58:37 +080074SOONG_CONFIG_blissGlobalVars_ignores_ftp_pptp_conntrack_failure := $(TARGET_IGNORES_FTP_PPTP_CONNTRACK_FAILURE)
75SOONG_CONFIG_blissGlobalVars_needs_netd_direct_connect_rule := $(TARGET_NEEDS_NETD_DIRECT_CONNECT_RULE)
Lup Gabriel09fc6852021-06-06 18:24:41 +090076SOONG_CONFIG_blissGlobalVars_camera_needs_client_info := $(TARGET_CAMERA_NEEDS_CLIENT_INFO)
Aaron Kling4e3ee912022-03-24 22:55:35 -050077SOONG_CONFIG_blissNvidiaVars_uses_nvidia_enhancements := $(NV_ANDROID_FRAMEWORK_ENHANCEMENTS)
Nolen Johnson9020f282021-02-22 12:36:48 -050078SOONG_CONFIG_blissQcomVars_legacy_hw_disk_encryption := $(TARGET_LEGACY_HW_DISK_ENCRYPTION)
Pig02f678a2020-10-15 02:58:37 +080079SOONG_CONFIG_blissQcomVars_should_wait_for_qsee := $(TARGET_KEYMASTER_WAIT_FOR_QSEE)
LuK1337e7aff482021-04-10 10:56:15 +020080SOONG_CONFIG_blissQcomVars_supports_audio_accessory := $(TARGET_QTI_USB_SUPPORTS_AUDIO_ACCESSORY)
81SOONG_CONFIG_blissQcomVars_supports_debug_accessory := $(TARGET_QTI_USB_SUPPORTS_DEBUG_ACCESSORY)
Pig02f678a2020-10-15 02:58:37 +080082SOONG_CONFIG_blissQcomVars_supports_extended_compress_format := $(AUDIO_FEATURE_ENABLED_EXTENDED_COMPRESS_FORMAT)
83SOONG_CONFIG_blissQcomVars_supports_hw_fde := $(TARGET_HW_DISK_ENCRYPTION)
84SOONG_CONFIG_blissQcomVars_supports_hw_fde_perf := $(TARGET_HW_DISK_ENCRYPTION_PERF)
85SOONG_CONFIG_blissQcomVars_uses_pre_uplink_features_netmgrd := $(TARGET_USES_PRE_UPLINK_FEATURES_NETMGRD)
86SOONG_CONFIG_blissQcomVars_uses_qcom_bsp_legacy := $(TARGET_USES_QCOM_BSP_LEGACY)
87SOONG_CONFIG_blissQcomVars_uses_qti_camera_device := $(TARGET_USES_QTI_CAMERA_DEVICE)
jhenrique09ad4d1ad2020-11-23 14:20:20 +000088SOONG_CONFIG_blissQcomVars_needs_camera_boottime_timestamp := $(TARGET_CAMERA_BOOTTIME_TIMESTAMP)
Pig02f678a2020-10-15 02:58:37 +080089
90# Set default values
91BOOTLOADER_MESSAGE_OFFSET ?= 0
Bruno Martins3ed1eb92020-10-17 10:20:37 +010092TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS ?= 0
Pig02f678a2020-10-15 02:58:37 +080093TARGET_INIT_VENDOR_LIB ?= vendor_init
daniml325cc5272021-01-21 16:56:41 +010094TARGET_INPUTDISPATCHER_SKIP_EVENT_KEY ?= 0
Pig02f678a2020-10-15 02:58:37 +080095TARGET_SPECIFIC_CAMERA_PARAMETER_LIBRARY ?= libcamera_parameters
TheScarastic8541a942021-10-19 08:07:54 +000096TARGET_SURFACEFLINGER_UDFPS_LIB ?= surfaceflinger_udfps_lib
Pig02f678a2020-10-15 02:58:37 +080097
98# Soong value variables
99SOONG_CONFIG_blissGlobalVars_additional_gralloc_10_usage_bits := $(TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS)
100SOONG_CONFIG_blissGlobalVars_bootloader_message_offset := $(BOOTLOADER_MESSAGE_OFFSET)
101SOONG_CONFIG_blissGlobalVars_target_init_vendor_lib := $(TARGET_INIT_VENDOR_LIB)
102SOONG_CONFIG_blissGlobalVars_target_ld_shim_libs := $(subst $(space),:,$(TARGET_LD_SHIM_LIBS))
103SOONG_CONFIG_blissGlobalVars_target_process_sdk_version_override := $(TARGET_PROCESS_SDK_VERSION_OVERRIDE)
TheScarastic8541a942021-10-19 08:07:54 +0000104SOONG_CONFIG_blissGlobalVars_target_surfaceflinger_udfps_lib := $(TARGET_SURFACEFLINGER_UDFPS_LIB)
Pig02f678a2020-10-15 02:58:37 +0800105SOONG_CONFIG_blissGlobalVars_uses_camera_parameter_lib := $(TARGET_SPECIFIC_CAMERA_PARAMETER_LIBRARY)
daniml325cc5272021-01-21 16:56:41 +0100106SOONG_CONFIG_blissGlobalVars_target_inputdispatcher_skip_event_key := $(TARGET_INPUTDISPATCHER_SKIP_EVENT_KEY)
107
Alessandro Astone3fc779e2021-01-05 18:04:14 +0100108ifneq ($(filter $(QSSI_SUPPORTED_PLATFORMS),$(TARGET_BOARD_PLATFORM)),)
109SOONG_CONFIG_blissQcomVars_qcom_display_headers_namespace := vendor/qcom/opensource/commonsys-intf/display
110else
111SOONG_CONFIG_blissQcomVars_qcom_display_headers_namespace := $(QCOM_SOONG_NAMESPACE)/display
Pig02f678a2020-10-15 02:58:37 +0800112endif
Pig033b4402020-09-19 08:44:33 +0800113
114ifneq ($(TARGET_USE_QTI_BT_STACK),true)
115PRODUCT_SOONG_NAMESPACES += packages/apps/Bluetooth
116endif #TARGET_USE_QTI_BT_STACK
Adithya R2ee2c762021-10-26 22:58:24 +0530117
118ifneq ($(TARGET_USES_NQ_NFC),true)
119PRODUCT_SOONG_NAMESPACES += hardware/nxp
120endif #TARGET_USES_NQ_NFC