Naseer Ahmed | 4d35af8 | 2012-07-11 23:43:42 -0700 | [diff] [blame] | 1 | #Common headers |
Naseer Ahmed | d68b47d | 2016-04-05 17:40:02 -0400 | [diff] [blame] | 2 | display_top := $(call my-dir) |
Naseer Ahmed | 30d3f1c | 2018-10-24 20:53:13 -0400 | [diff] [blame] | 3 | |
Naseer Ahmed | b6b936d | 2016-08-05 16:23:32 -0400 | [diff] [blame] | 4 | #Common C flags |
Saurabh Shah | 546f77b | 2017-12-13 14:10:39 -0800 | [diff] [blame] | 5 | common_flags := -Wno-missing-field-initializers |
Ramakant Singh | baf3c50 | 2019-10-18 10:34:35 +0530 | [diff] [blame] | 6 | common_flags += -Wconversion -Wall -Werror |
Naseer Ahmed | 8502008 | 2017-05-17 14:36:46 -0400 | [diff] [blame] | 7 | common_flags += -DUSE_GRALLOC1 |
Saurabh Shah | f84c412 | 2017-04-07 10:34:40 -0700 | [diff] [blame] | 8 | ifeq ($(TARGET_IS_HEADLESS), true) |
Naseer Ahmed | 4d78d03 | 2017-03-22 12:47:30 -0400 | [diff] [blame] | 9 | common_flags += -DTARGET_HEADLESS |
| 10 | LOCAL_CLANG := false |
Saurabh Shah | 7d476ed | 2016-06-27 16:40:58 -0700 | [diff] [blame] | 11 | endif |
Naseer Ahmed | b6b936d | 2016-08-05 16:23:32 -0400 | [diff] [blame] | 12 | |
Arun Kumar K.R | ca196fc | 2016-12-07 19:28:30 -0800 | [diff] [blame] | 13 | ifeq ($(TARGET_USES_COLOR_METADATA), true) |
Naseer Ahmed | 4d78d03 | 2017-03-22 12:47:30 -0400 | [diff] [blame] | 14 | common_flags += -DUSE_COLOR_METADATA |
Arun Kumar K.R | b2771bf | 2016-10-03 21:38:23 -0700 | [diff] [blame] | 15 | endif |
| 16 | |
Naseer Ahmed | 4d78d03 | 2017-03-22 12:47:30 -0400 | [diff] [blame] | 17 | ifeq ($(TARGET_USES_QCOM_BSP),true) |
| 18 | common_flags += -DQTI_BSP |
Praveena Pachipulusu | 734118a | 2014-12-04 14:53:12 +0530 | [diff] [blame] | 19 | endif |
| 20 | |
Naseer Ahmed | 4d35af8 | 2012-07-11 23:43:42 -0700 | [diff] [blame] | 21 | ifeq ($(ARCH_ARM_HAVE_NEON),true) |
| 22 | common_flags += -D__ARM_HAVE_NEON |
| 23 | endif |
| 24 | |
Shalaj Jain | 3c49041 | 2015-04-22 16:52:03 -0700 | [diff] [blame] | 25 | ifeq ($(call is-board-platform-in-list, $(MASTER_SIDE_CP_TARGET_LIST)), true) |
| 26 | common_flags += -DMASTER_SIDE_CP |
| 27 | endif |
| 28 | |
Naseer Ahmed | 4d78d03 | 2017-03-22 12:47:30 -0400 | [diff] [blame] | 29 | use_hwc2 := false |
| 30 | ifeq ($(TARGET_USES_HWC2), true) |
| 31 | use_hwc2 := true |
| 32 | common_flags += -DVIDEO_MODE_DEFER_RETIRE_FENCE |
| 33 | endif |
| 34 | |
Naseer Ahmed | 8789593 | 2017-05-30 17:01:44 -0400 | [diff] [blame] | 35 | ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) |
| 36 | common_flags += -DUSER_DEBUG |
| 37 | endif |
| 38 | |
Ramakant Singh | 80a15d7 | 2017-07-14 13:52:15 +0530 | [diff] [blame] | 39 | ifeq ($(LLVM_SA), true) |
| 40 | common_flags += --compile-and-analyze --analyzer-perf --analyzer-Werror |
| 41 | endif |
| 42 | |
Naseer Ahmed | 4d78d03 | 2017-03-22 12:47:30 -0400 | [diff] [blame] | 43 | common_includes := system/core/base/include |
| 44 | CHECK_VERSION_LE = $(shell if [ $(1) -le $(2) ] ; then echo true ; else echo false ; fi) |
| 45 | PLATFORM_SDK_NOUGAT = 25 |
| 46 | ifeq "REL" "$(PLATFORM_VERSION_CODENAME)" |
| 47 | ifeq ($(call CHECK_VERSION_LE, $(PLATFORM_SDK_VERSION), $(PLATFORM_SDK_NOUGAT)), true) |
| 48 | version_flag := -D__NOUGAT__ |
| 49 | |
| 50 | # These include paths are deprecated post N |
| 51 | common_includes += $(display_top)/libqdutils |
| 52 | common_includes += $(display_top)/libqservice |
| 53 | common_includes += $(display_top)/gpu_tonemapper |
| 54 | ifneq ($(TARGET_IS_HEADLESS), true) |
| 55 | common_includes += $(display_top)/libcopybit |
Naseer Ahmed | 4d78d03 | 2017-03-22 12:47:30 -0400 | [diff] [blame] | 56 | endif |
| 57 | |
| 58 | common_includes += $(display_top)/include |
| 59 | common_includes += $(display_top)/sdm/include |
| 60 | common_flags += -isystem $(TARGET_OUT_HEADERS)/qcom/display |
| 61 | endif |
| 62 | endif |
| 63 | |
| 64 | common_header_export_path := qcom/display |
| 65 | |
| 66 | #Common libraries external to display HAL |
| 67 | common_libs := liblog libutils libcutils libhardware |
Naseer Ahmed | 4d35af8 | 2012-07-11 23:43:42 -0700 | [diff] [blame] | 68 | common_deps := |
| 69 | kernel_includes := |
Saurabh Shah | 56f610d | 2012-08-07 15:27:06 -0700 | [diff] [blame] | 70 | |
Naseer Ahmed | d68b47d | 2016-04-05 17:40:02 -0400 | [diff] [blame] | 71 | ifeq ($(TARGET_COMPILE_WITH_MSM_KERNEL),true) |
Naseer Ahmed | e7ff13f | 2013-04-15 20:42:08 -0400 | [diff] [blame] | 72 | # This check is to pick the kernel headers from the right location. |
| 73 | # If the macro above is defined, we make the assumption that we have the kernel |
| 74 | # available in the build tree. |
| 75 | # If the macro is not present, the headers are picked from hardware/qcom/msmXXXX |
| 76 | # failing which, they are picked from bionic. |
Naseer Ahmed | 4d35af8 | 2012-07-11 23:43:42 -0700 | [diff] [blame] | 77 | common_deps += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr |
Liang Liu | 54cac89 | 2020-06-18 14:44:10 +0800 | [diff] [blame] | 78 | kernel_includes += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include \ |
| 79 | $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include/display |
Naseer Ahmed | 4d35af8 | 2012-07-11 23:43:42 -0700 | [diff] [blame] | 80 | endif |