OSDN Git Service

Added the support of panorama view mode in AaaG HWC.
[android-x86/external-IA-Hardware-Composer.git] / wsi / Android.mk
1 # Copyright (c) 2017 Intel Corporation
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #      http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 LOCAL_PATH:= $(call my-dir)
16
17 include $(CLEAR_VARS)
18
19 LOCAL_SHARED_LIBRARIES := \
20         libcutils \
21         libdrm \
22         libEGL \
23         libGLESv2 \
24         libhardware \
25         liblog \
26         libui \
27         libutils \
28         libhwcservice \
29         libbinder
30
31 LOCAL_C_INCLUDES := \
32         system/core/include/utils \
33         $(LOCAL_PATH)/../public \
34         $(LOCAL_PATH)/../common/core \
35         $(LOCAL_PATH)/../common/compositor \
36         $(LOCAL_PATH)/../common/compositor/gl \
37         $(LOCAL_PATH)/../common/compositor/va \
38         $(LOCAL_PATH)/../common/display \
39         $(LOCAL_PATH)/../common/utils \
40         $(LOCAL_PATH)/../os \
41         $(LOCAL_PATH)/../os/android \
42         $(LOCAL_PATH)/../wsi \
43         $(LOCAL_PATH)/../wsi/drm
44
45 ifeq ($(strip $(HWC_DISABLE_VA_DRIVER)), true)
46 LOCAL_CPPFLAGS += -DDISABLE_VA
47 else
48 LOCAL_SHARED_LIBRARIES += \
49         libva
50 LOCAL_C_INCLUDES += \
51         $(TARGET_OUT_HEADERS)/libva
52 LOCAL_CPPFLAGS += -DVA_WITH_PAVP
53 endif
54
55 LOCAL_SRC_FILES := \
56         physicaldisplay.cpp \
57         drm/drmdisplay.cpp \
58         drm/drmbuffer.cpp \
59         drm/drmplane.cpp \
60         drm/drmdisplaymanager.cpp \
61         drm/drmscopedtypes.cpp
62
63 ifeq ($(strip $(ENABLE_HYPER_DMABUF_SHARING)), true)
64 LOCAL_CPPFLAGS += -DHYPER_DMABUF_SHARING
65 endif
66
67 ifeq ($(strip $(ENABLE_HYPER_DMABUF_SHARING)), true)
68 LOCAL_CPPFLAGS += -DENABLE_PANORAMA
69 endif
70
71 ifeq ($(strip $(TARGET_USES_HWC2)), false)
72 LOCAL_C_INCLUDES += \
73         system/core/libsync \
74         system/core/libsync/include
75
76 LOCAL_SHARED_LIBRARIES += \
77         libsync
78
79 LOCAL_CPPFLAGS += -DENABLE_DOUBLE_BUFFERING
80 endif
81
82 LOCAL_CPPFLAGS += -DMODIFICATOR_WA
83
84 LOCAL_CPPFLAGS += \
85         -DHWC2_INCLUDE_STRINGIFICATION \
86         -DHWC2_USE_CPP11 \
87         -Wno-date-time \
88         -DUSE_ANDROID_SHIM \
89         -D_FORTIFY_SOURCE=2 \
90         -fstack-protector-strong \
91         -Wformat -Wformat-security \
92         -std=c++14 -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64 \
93         -Wall -Wsign-compare -Wpointer-arith \
94         -Wcast-qual -Wcast-align \
95         -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64 \
96         -Wno-unused-parameter \
97         -O3
98
99 LOCAL_CPPFLAGS += -DVA_SUPPORT_COLOR_RANGE
100
101 ifeq ($(strip $(BOARD_USES_VULKAN)), true)
102 LOCAL_SHARED_LIBRARIES += \
103         libvulkan
104
105 LOCAL_CPPFLAGS += \
106         -DUSE_VK \
107         -DDISABLE_EXPLICIT_SYNC
108
109 LOCAL_C_INCLUDES += \
110         $(LOCAL_PATH)/../common/compositor/vk \
111         $(LOCAL_PATH)/../../mesa/include
112 else
113 LOCAL_CPPFLAGS += \
114         -DUSE_GL
115 endif
116
117 LOCAL_C_INCLUDES += \
118         $(INTEL_MINIGBM)/cros_gralloc/
119
120 ifeq ($(strip $(DISABLE_HOTPLUG_SUPPORT)), true)
121 LOCAL_CPPFLAGS += \
122         -DDISABLE_HOTPLUG_NOTIFICATION
123 endif
124
125 LOCAL_CPPFLAGS += -DENABLE_ANDROID_WA
126
127 LOCAL_MODULE := libhwcomposer_wsi
128 LOCAL_CFLAGS += -fvisibility=default
129 LOCAL_LDFLAGS += -no-undefined
130 LOCAL_PROPRIETARY_MODULE := true
131 include $(BUILD_STATIC_LIBRARY)