blob: 619bdbff07285e583ab090ef2d1341fb46363569 [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 \
Marko Man25a4ca42021-08-06 22:26:43 -050038 target_camera_needs_client_info \
Pig02f678a2020-10-15 02:58:37 +080039 target_init_vendor_lib \
40 target_ld_shim_libs \
41 target_process_sdk_version_override \
TheScarastic8541a942021-10-19 08:07:54 +000042 target_surfaceflinger_udfps_lib \
Pig02f678a2020-10-15 02:58:37 +080043 uses_camera_parameter_lib
44
45SOONG_CONFIG_NAMESPACES += blissNvidiaVars
46SOONG_CONFIG_blissNvidiaVars += \
47 uses_nv_enhancements
48
49SOONG_CONFIG_NAMESPACES += blissQcomVars
50SOONG_CONFIG_blissQcomVars += \
Nolen Johnson9020f282021-02-22 12:36:48 -050051 legacy_hw_disk_encryption \
Pig02f678a2020-10-15 02:58:37 +080052 should_wait_for_qsee \
LuK1337e7aff482021-04-10 10:56:15 +020053 supports_audio_accessory \
54 supports_debug_accessory \
Pig02f678a2020-10-15 02:58:37 +080055 supports_extended_compress_format \
56 supports_hw_fde \
57 supports_hw_fde_perf \
58 uses_pre_uplink_features_netmgrd \
59 uses_qcom_bsp_legacy \
60 uses_qti_camera_device
61
Alessandro Astone3fc779e2021-01-05 18:04:14 +010062# 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 +080063ifneq ($(filter $(UM_PLATFORMS),$(TARGET_BOARD_PLATFORM)),)
64SOONG_CONFIG_blissQcomVars += \
Alessandro Astone3fc779e2021-01-05 18:04:14 +010065 qcom_display_headers_namespace
Pig02f678a2020-10-15 02:58:37 +080066endif
67
68# Soong bool variables
Arne Coucherona31f8f92020-11-07 00:46:10 +010069SOONG_CONFIG_blissGlobalVars_disable_postrender_cleanup := $(TARGET_DISABLE_POSTRENDER_CLEANUP)
Pig02f678a2020-10-15 02:58:37 +080070SOONG_CONFIG_blissGlobalVars_has_legacy_camera_hal1 := $(TARGET_HAS_LEGACY_CAMERA_HAL1)
Jan Altensena61f9302020-10-17 18:10:26 +020071SOONG_CONFIG_blissGlobalVars_has_memfd_backport := $(TARGET_HAS_MEMFD_BACKPORT)
Pig02f678a2020-10-15 02:58:37 +080072SOONG_CONFIG_blissGlobalVars_ignores_ftp_pptp_conntrack_failure := $(TARGET_IGNORES_FTP_PPTP_CONNTRACK_FAILURE)
73SOONG_CONFIG_blissGlobalVars_needs_netd_direct_connect_rule := $(TARGET_NEEDS_NETD_DIRECT_CONNECT_RULE)
Marko Man25a4ca42021-08-06 22:26:43 -050074SOONG_CONFIG_blissGlobalVars_target_camera_needs_client_info := $(TARGET_CAMERA_NEEDS_CLIENT_INFO)
Pig02f678a2020-10-15 02:58:37 +080075SOONG_CONFIG_blissNvidiaVars_uses_nv_enhancements := $(NV_ANDROID_FRAMEWORK_ENHANCEMENTS)
Nolen Johnson9020f282021-02-22 12:36:48 -050076SOONG_CONFIG_blissQcomVars_legacy_hw_disk_encryption := $(TARGET_LEGACY_HW_DISK_ENCRYPTION)
Pig02f678a2020-10-15 02:58:37 +080077SOONG_CONFIG_blissQcomVars_should_wait_for_qsee := $(TARGET_KEYMASTER_WAIT_FOR_QSEE)
LuK1337e7aff482021-04-10 10:56:15 +020078SOONG_CONFIG_blissQcomVars_supports_audio_accessory := $(TARGET_QTI_USB_SUPPORTS_AUDIO_ACCESSORY)
79SOONG_CONFIG_blissQcomVars_supports_debug_accessory := $(TARGET_QTI_USB_SUPPORTS_DEBUG_ACCESSORY)
Pig02f678a2020-10-15 02:58:37 +080080SOONG_CONFIG_blissQcomVars_supports_extended_compress_format := $(AUDIO_FEATURE_ENABLED_EXTENDED_COMPRESS_FORMAT)
81SOONG_CONFIG_blissQcomVars_supports_hw_fde := $(TARGET_HW_DISK_ENCRYPTION)
82SOONG_CONFIG_blissQcomVars_supports_hw_fde_perf := $(TARGET_HW_DISK_ENCRYPTION_PERF)
83SOONG_CONFIG_blissQcomVars_uses_pre_uplink_features_netmgrd := $(TARGET_USES_PRE_UPLINK_FEATURES_NETMGRD)
84SOONG_CONFIG_blissQcomVars_uses_qcom_bsp_legacy := $(TARGET_USES_QCOM_BSP_LEGACY)
85SOONG_CONFIG_blissQcomVars_uses_qti_camera_device := $(TARGET_USES_QTI_CAMERA_DEVICE)
86
87# Set default values
88BOOTLOADER_MESSAGE_OFFSET ?= 0
Bruno Martins3ed1eb92020-10-17 10:20:37 +010089TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS ?= 0
Pig02f678a2020-10-15 02:58:37 +080090TARGET_INIT_VENDOR_LIB ?= vendor_init
91TARGET_SPECIFIC_CAMERA_PARAMETER_LIBRARY ?= libcamera_parameters
TheScarastic8541a942021-10-19 08:07:54 +000092TARGET_SURFACEFLINGER_UDFPS_LIB ?= surfaceflinger_udfps_lib
Pig02f678a2020-10-15 02:58:37 +080093
94# Soong value variables
95SOONG_CONFIG_blissGlobalVars_additional_gralloc_10_usage_bits := $(TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS)
96SOONG_CONFIG_blissGlobalVars_bootloader_message_offset := $(BOOTLOADER_MESSAGE_OFFSET)
97SOONG_CONFIG_blissGlobalVars_target_init_vendor_lib := $(TARGET_INIT_VENDOR_LIB)
98SOONG_CONFIG_blissGlobalVars_target_ld_shim_libs := $(subst $(space),:,$(TARGET_LD_SHIM_LIBS))
99SOONG_CONFIG_blissGlobalVars_target_process_sdk_version_override := $(TARGET_PROCESS_SDK_VERSION_OVERRIDE)
TheScarastic8541a942021-10-19 08:07:54 +0000100SOONG_CONFIG_blissGlobalVars_target_surfaceflinger_udfps_lib := $(TARGET_SURFACEFLINGER_UDFPS_LIB)
Pig02f678a2020-10-15 02:58:37 +0800101SOONG_CONFIG_blissGlobalVars_uses_camera_parameter_lib := $(TARGET_SPECIFIC_CAMERA_PARAMETER_LIBRARY)
Alessandro Astone3fc779e2021-01-05 18:04:14 +0100102ifneq ($(filter $(QSSI_SUPPORTED_PLATFORMS),$(TARGET_BOARD_PLATFORM)),)
103SOONG_CONFIG_blissQcomVars_qcom_display_headers_namespace := vendor/qcom/opensource/commonsys-intf/display
104else
105SOONG_CONFIG_blissQcomVars_qcom_display_headers_namespace := $(QCOM_SOONG_NAMESPACE)/display
Pig02f678a2020-10-15 02:58:37 +0800106endif
Pig033b4402020-09-19 08:44:33 +0800107
108ifneq ($(TARGET_USE_QTI_BT_STACK),true)
109PRODUCT_SOONG_NAMESPACES += packages/apps/Bluetooth
110endif #TARGET_USE_QTI_BT_STACK