OSDN Git Service

eb94cd955672c68103b6518e16d865f3f2b9f336
[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 $(TARGET_USES_HWC2)), false)
68 LOCAL_C_INCLUDES += \
69         system/core/libsync \
70         system/core/libsync/include
71
72 LOCAL_SHARED_LIBRARIES += \
73         libsync
74
75 LOCAL_CPPFLAGS += -DENABLE_DOUBLE_BUFFERING
76 endif
77
78 LOCAL_CPPFLAGS += \
79         -DHWC2_INCLUDE_STRINGIFICATION \
80         -DHWC2_USE_CPP11 \
81         -Wno-date-time \
82         -DUSE_ANDROID_SHIM \
83         -D_FORTIFY_SOURCE=2 \
84         -fstack-protector-strong \
85         -Wformat -Wformat-security \
86         -std=c++14 -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64 \
87         -Wall -Wsign-compare -Wpointer-arith \
88         -Wcast-qual -Wcast-align \
89         -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64 \
90         -Wno-unused-parameter \
91         -O3
92
93 ifeq ($(strip $(BOARD_USES_VULKAN)), true)
94 LOCAL_SHARED_LIBRARIES += \
95         libvulkan
96
97 LOCAL_CPPFLAGS += \
98         -DUSE_VK \
99         -DDISABLE_EXPLICIT_SYNC
100
101 LOCAL_C_INCLUDES += \
102         $(LOCAL_PATH)/../common/compositor/vk \
103         $(LOCAL_PATH)/../../mesa/include
104 else
105 LOCAL_CPPFLAGS += \
106         -DUSE_GL
107 endif
108
109 LOCAL_C_INCLUDES += \
110         $(INTEL_MINIGBM)/cros_gralloc/
111
112 ifeq ($(strip $(DISABLE_HOTPLUG_SUPPORT)), true)
113 LOCAL_CPPFLAGS += \
114         -DDISABLE_HOTPLUG_NOTIFICATION
115 endif
116
117 LOCAL_CPPFLAGS += -DENABLE_ANDROID_WA
118
119 ifeq ($(strip $(BOARD_THREEDIS_UNDERRUN_WA)), true)
120 LOCAL_CPPFLAGS += \
121         -DTHREEDIS_UNDERRUN_WA
122 endif
123
124 LOCAL_MODULE := libhwcomposer_wsi
125 LOCAL_CFLAGS += -fvisibility=default
126 LOCAL_LDFLAGS += -no-undefined
127 LOCAL_PROPRIETARY_MODULE := true
128 include $(BUILD_STATIC_LIBRARY)