blob: af72e7b66ac49ff8db142c7a5c41d33203f2c949 [file] [log] [blame]
Naseer Ahmed4d35af82012-07-11 23:43:42 -07001#Common headers
Naseer Ahmedd68b47d2016-04-05 17:40:02 -04002display_top := $(call my-dir)
3
Naseer Ahmedb6b936d2016-08-05 16:23:32 -04004#Common C flags
5common_flags := -DDEBUG_CALC_FPS -Wno-missing-field-initializers
Naseer Ahmed043cec72016-09-02 18:39:48 -04006common_flags += -Wconversion -Wall -Werror -std=c++11
Naseer Ahmedb6b936d2016-08-05 16:23:32 -04007
Naseer Ahmedb92e73f2016-03-12 02:03:48 -05008use_hwc2 := false
Naseer Ahmedad8ae632016-06-09 16:48:22 -04009ifeq ($(TARGET_USES_HWC2), true)
10 use_hwc2 := true
Naseer Ahmedb6b936d2016-08-05 16:23:32 -040011 common_flags += -DVIDEO_MODE_DEFER_RETIRE_FENCE
Naseer Ahmedad8ae632016-06-09 16:48:22 -040012endif
Naseer Ahmedb92e73f2016-03-12 02:03:48 -050013
Naseer Ahmedd68b47d2016-04-05 17:40:02 -040014common_includes := $(display_top)/libqdutils
15common_includes += $(display_top)/libqservice
Pullakavi Srinivasc6442662016-06-22 02:20:07 +053016ifneq ($(TARGET_IS_HEADLESS), true)
17 common_includes += $(display_top)/libcopybit
18endif
19
Naseer Ahmedd68b47d2016-04-05 17:40:02 -040020common_includes += $(display_top)/sdm/include
Naseer Ahmed4d35af82012-07-11 23:43:42 -070021
Naseer Ahmedc55d60a2013-07-11 17:42:26 -040022common_header_export_path := qcom/display
23
Naseer Ahmed4d35af82012-07-11 23:43:42 -070024#Common libraries external to display HAL
25common_libs := liblog libutils libcutils libhardware
26
Pullakavi Srinivasc6442662016-06-22 02:20:07 +053027ifeq ($(TARGET_IS_HEADLESS), true)
28 LOCAL_CLANG := false
29else
30 LOCAL_CLANG := true
31endif
32
Prabhanjan Kandula96e92342016-03-24 21:03:35 +053033ifneq ($(TARGET_USES_GRALLOC1), true)
34 common_flags += -isystem $(display_top)/libgralloc
35else
36 common_flags += -isystem $(display_top)/libgralloc1
37endif
Naseer Ahmedb16edac2012-07-15 23:56:21 -070038
Praveena Pachipulusu734118a2014-12-04 14:53:12 +053039ifeq ($(TARGET_USES_POST_PROCESSING),true)
40 common_flags += -DUSES_POST_PROCESSING
41 common_includes += $(TARGET_OUT_HEADERS)/pp/inc
42endif
43
Naseer Ahmed4d35af82012-07-11 23:43:42 -070044ifeq ($(ARCH_ARM_HAVE_NEON),true)
45 common_flags += -D__ARM_HAVE_NEON
46endif
47
Shalaj Jain103f6662014-09-18 11:47:52 -070048ifeq ($(call is-board-platform-in-list, $(MSM_VIDC_TARGET_LIST)), true)
49 common_flags += -DVENUS_COLOR_FORMAT
Sushil Chauhanc6bd6d92012-12-12 12:33:01 -080050endif
51
Shalaj Jain3c490412015-04-22 16:52:03 -070052ifeq ($(call is-board-platform-in-list, $(MASTER_SIDE_CP_TARGET_LIST)), true)
53 common_flags += -DMASTER_SIDE_CP
54endif
55
Naseer Ahmed4d35af82012-07-11 23:43:42 -070056common_deps :=
57kernel_includes :=
Saurabh Shah56f610d2012-08-07 15:27:06 -070058
Manoj Kumar AVMa864ebc2016-03-21 19:44:28 -070059# Executed only on QCOM BSPs
Namit Solankic4c6e2d2016-07-11 16:56:25 +053060ifeq ($(TARGET_USES_QCOM_BSP),true)
Manoj Kumar AVMa864ebc2016-03-21 19:44:28 -070061# Enable QCOM Display features
Namit Solankic4c6e2d2016-07-11 16:56:25 +053062 common_flags += -DQTI_BSP
63endif
Naseer Ahmed34bad082016-04-27 22:35:00 -040064
Pullakavi Srinivasc6442662016-06-22 02:20:07 +053065ifeq ($(TARGET_IS_HEADLESS),true)
66 common_flags += -DTARGET_HEADLESS
67endif
68
Naseer Ahmedd68b47d2016-04-05 17:40:02 -040069ifeq ($(TARGET_COMPILE_WITH_MSM_KERNEL),true)
Naseer Ahmede7ff13f2013-04-15 20:42:08 -040070# This check is to pick the kernel headers from the right location.
71# If the macro above is defined, we make the assumption that we have the kernel
72# available in the build tree.
73# If the macro is not present, the headers are picked from hardware/qcom/msmXXXX
74# failing which, they are picked from bionic.
Naseer Ahmed4d35af82012-07-11 23:43:42 -070075 common_deps += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
76 kernel_includes += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
77endif