Thierry Strudel | 2ebc25b | 2016-09-07 13:08:11 -0700 | [diff] [blame] | 1 | #Common headers |
| 2 | display_top := $(call my-dir) |
| 3 | |
Thierry Strudel | fa3d1d3 | 2016-10-12 12:20:31 -0700 | [diff] [blame] | 4 | #Common C flags |
| 5 | common_flags := -DDEBUG_CALC_FPS -Wno-missing-field-initializers |
Vic Yang | 3e827b1 | 2019-08-15 13:56:57 -0700 | [diff] [blame] | 6 | common_flags += -Wconversion -Wall -Werror |
Naseer Ahmed | 2722674 | 2017-07-18 17:34:16 -0400 | [diff] [blame] | 7 | common_flags += -DUSE_GRALLOC1 |
Thierry Strudel | 6cfbcfa | 2017-03-08 10:37:34 -0800 | [diff] [blame] | 8 | ifneq ($(TARGET_IS_HEADLESS), true) |
| 9 | common_flags += -DCOMPILE_DRM |
Thierry Strudel | cd66324 | 2017-04-06 09:54:26 -0700 | [diff] [blame] | 10 | else |
| 11 | common_flags += -DTARGET_HEADLESS |
| 12 | LOCAL_CLANG := false |
Thierry Strudel | 6cfbcfa | 2017-03-08 10:37:34 -0800 | [diff] [blame] | 13 | endif |
Thierry Strudel | fa3d1d3 | 2016-10-12 12:20:31 -0700 | [diff] [blame] | 14 | |
Thierry Strudel | b06147d | 2017-02-15 10:48:16 -0800 | [diff] [blame] | 15 | ifeq ($(TARGET_USES_COLOR_METADATA), true) |
Thierry Strudel | cd66324 | 2017-04-06 09:54:26 -0700 | [diff] [blame] | 16 | common_flags += -DUSE_COLOR_METADATA |
Thierry Strudel | d62c8a2 | 2016-12-13 13:51:15 -0800 | [diff] [blame] | 17 | endif |
| 18 | |
Thierry Strudel | cd66324 | 2017-04-06 09:54:26 -0700 | [diff] [blame] | 19 | ifeq ($(TARGET_USES_QCOM_BSP),true) |
| 20 | common_flags += -DQTI_BSP |
Thierry Strudel | 2ebc25b | 2016-09-07 13:08:11 -0700 | [diff] [blame] | 21 | endif |
| 22 | |
| 23 | ifeq ($(ARCH_ARM_HAVE_NEON),true) |
| 24 | common_flags += -D__ARM_HAVE_NEON |
| 25 | endif |
| 26 | |
Sasha Smundak | 5ca67f5 | 2021-10-21 14:24:16 -0700 | [diff] [blame] | 27 | ifneq (,$(call is-board-platform-in-list2, $(MASTER_SIDE_CP_TARGET_LIST))) |
Thierry Strudel | 2ebc25b | 2016-09-07 13:08:11 -0700 | [diff] [blame] | 28 | common_flags += -DMASTER_SIDE_CP |
| 29 | endif |
| 30 | |
Thierry Strudel | cd66324 | 2017-04-06 09:54:26 -0700 | [diff] [blame] | 31 | use_hwc2 := false |
| 32 | ifeq ($(TARGET_USES_HWC2), true) |
| 33 | use_hwc2 := true |
| 34 | common_flags += -DVIDEO_MODE_DEFER_RETIRE_FENCE |
| 35 | endif |
| 36 | |
Naseer Ahmed | a831bfa | 2017-05-30 17:01:44 -0400 | [diff] [blame] | 37 | ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) |
| 38 | common_flags += -DUSER_DEBUG |
| 39 | endif |
| 40 | |
Baligh Uddin | 4d706f6 | 2020-10-23 14:21:56 +0000 | [diff] [blame] | 41 | common_includes := system/libbase/include |
Thierry Strudel | cd66324 | 2017-04-06 09:54:26 -0700 | [diff] [blame] | 42 | CHECK_VERSION_LE = $(shell if [ $(1) -le $(2) ] ; then echo true ; else echo false ; fi) |
| 43 | PLATFORM_SDK_NOUGAT = 25 |
| 44 | ifeq "REL" "$(PLATFORM_VERSION_CODENAME)" |
| 45 | ifeq ($(call CHECK_VERSION_LE, $(PLATFORM_SDK_VERSION), $(PLATFORM_SDK_NOUGAT)), true) |
| 46 | version_flag := -D__NOUGAT__ |
| 47 | |
| 48 | # These include paths are deprecated post N |
| 49 | common_includes += $(display_top)/libqdutils |
| 50 | common_includes += $(display_top)/libqservice |
| 51 | common_includes += $(display_top)/gpu_tonemapper |
| 52 | ifneq ($(TARGET_IS_HEADLESS), true) |
| 53 | common_includes += $(display_top)/libcopybit |
| 54 | common_includes += $(display_top)/libdrmutils |
| 55 | endif |
| 56 | |
| 57 | common_includes += $(display_top)/include |
| 58 | common_includes += $(display_top)/sdm/include |
| 59 | common_flags += -isystem $(TARGET_OUT_HEADERS)/qcom/display |
| 60 | endif |
| 61 | endif |
| 62 | |
| 63 | common_header_export_path := qcom/display |
| 64 | |
| 65 | #Common libraries external to display HAL |
| 66 | common_libs := liblog libutils libcutils libhardware |
Thierry Strudel | 2ebc25b | 2016-09-07 13:08:11 -0700 | [diff] [blame] | 67 | common_deps := |
| 68 | kernel_includes := |
| 69 | |
Thierry Strudel | 2ebc25b | 2016-09-07 13:08:11 -0700 | [diff] [blame] | 70 | ifeq ($(TARGET_COMPILE_WITH_MSM_KERNEL),true) |
| 71 | # This check is to pick the kernel headers from the right location. |
| 72 | # If the macro above is defined, we make the assumption that we have the kernel |
| 73 | # available in the build tree. |
| 74 | # If the macro is not present, the headers are picked from hardware/qcom/msmXXXX |
| 75 | # failing which, they are picked from bionic. |
| 76 | common_deps += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr |
| 77 | kernel_includes += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include |
| 78 | endif |