blob: 04caf9d1e0ce7394fc1094f7eaa9a0f1e10123ce [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 \
33 has_legacy_camera_hal1 \
34 ignores_ftp_pptp_conntrack_failure \
35 needs_netd_direct_connect_rule \
36 target_init_vendor_lib \
37 target_ld_shim_libs \
38 target_process_sdk_version_override \
39 target_surfaceflinger_fod_lib \
40 uses_camera_parameter_lib
41
42SOONG_CONFIG_NAMESPACES += blissNvidiaVars
43SOONG_CONFIG_blissNvidiaVars += \
44 uses_nv_enhancements
45
46SOONG_CONFIG_NAMESPACES += blissQcomVars
47SOONG_CONFIG_blissQcomVars += \
48 should_wait_for_qsee \
49 supports_extended_compress_format \
50 supports_hw_fde \
51 supports_hw_fde_perf \
52 uses_pre_uplink_features_netmgrd \
53 uses_qcom_bsp_legacy \
54 uses_qti_camera_device
55
56# Only create soong_namespace var if dealing with UM platforms to avoid breaking build for all other platforms
57ifneq ($(filter $(UM_PLATFORMS),$(TARGET_BOARD_PLATFORM)),)
58SOONG_CONFIG_blissQcomVars += \
59 qcom_soong_namespace
60endif
61
62# Soong bool variables
63SOONG_CONFIG_blissGlobalVars_has_legacy_camera_hal1 := $(TARGET_HAS_LEGACY_CAMERA_HAL1)
64SOONG_CONFIG_blissGlobalVars_ignores_ftp_pptp_conntrack_failure := $(TARGET_IGNORES_FTP_PPTP_CONNTRACK_FAILURE)
65SOONG_CONFIG_blissGlobalVars_needs_netd_direct_connect_rule := $(TARGET_NEEDS_NETD_DIRECT_CONNECT_RULE)
66SOONG_CONFIG_blissNvidiaVars_uses_nv_enhancements := $(NV_ANDROID_FRAMEWORK_ENHANCEMENTS)
67SOONG_CONFIG_blissQcomVars_should_wait_for_qsee := $(TARGET_KEYMASTER_WAIT_FOR_QSEE)
68SOONG_CONFIG_blissQcomVars_supports_extended_compress_format := $(AUDIO_FEATURE_ENABLED_EXTENDED_COMPRESS_FORMAT)
69SOONG_CONFIG_blissQcomVars_supports_hw_fde := $(TARGET_HW_DISK_ENCRYPTION)
70SOONG_CONFIG_blissQcomVars_supports_hw_fde_perf := $(TARGET_HW_DISK_ENCRYPTION_PERF)
71SOONG_CONFIG_blissQcomVars_uses_pre_uplink_features_netmgrd := $(TARGET_USES_PRE_UPLINK_FEATURES_NETMGRD)
72SOONG_CONFIG_blissQcomVars_uses_qcom_bsp_legacy := $(TARGET_USES_QCOM_BSP_LEGACY)
73SOONG_CONFIG_blissQcomVars_uses_qti_camera_device := $(TARGET_USES_QTI_CAMERA_DEVICE)
74
75# Set default values
76BOOTLOADER_MESSAGE_OFFSET ?= 0
Bruno Martins3ed1eb92020-10-17 10:20:37 +010077TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS ?= 0
Pig02f678a2020-10-15 02:58:37 +080078TARGET_INIT_VENDOR_LIB ?= vendor_init
79TARGET_SPECIFIC_CAMERA_PARAMETER_LIBRARY ?= libcamera_parameters
80TARGET_SURFACEFLINGER_FOD_LIB ?= surfaceflinger_fod_lib
81
82# Soong value variables
83SOONG_CONFIG_blissGlobalVars_additional_gralloc_10_usage_bits := $(TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS)
84SOONG_CONFIG_blissGlobalVars_bootloader_message_offset := $(BOOTLOADER_MESSAGE_OFFSET)
85SOONG_CONFIG_blissGlobalVars_target_init_vendor_lib := $(TARGET_INIT_VENDOR_LIB)
86SOONG_CONFIG_blissGlobalVars_target_ld_shim_libs := $(subst $(space),:,$(TARGET_LD_SHIM_LIBS))
87SOONG_CONFIG_blissGlobalVars_target_process_sdk_version_override := $(TARGET_PROCESS_SDK_VERSION_OVERRIDE)
88SOONG_CONFIG_blissGlobalVars_target_surfaceflinger_fod_lib := $(TARGET_SURFACEFLINGER_FOD_LIB)
89SOONG_CONFIG_blissGlobalVars_uses_camera_parameter_lib := $(TARGET_SPECIFIC_CAMERA_PARAMETER_LIBRARY)
90ifneq ($(filter $(UM_PLATFORMS),$(TARGET_BOARD_PLATFORM)),)
91SOONG_CONFIG_blissQcomVars_qcom_soong_namespace := $(QCOM_SOONG_NAMESPACE)
92endif