1 # Copyright (c) 2017 Intel Corporation
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
7 # http://www.apache.org/licenses/LICENSE-2.0
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.
16 ifeq ($(strip $(BOARD_USES_IA_HWCOMPOSER)), true)
17 # Obtain root HWC source path
18 HWC_PATH := $(call my-dir)
20 HWC_VERSION_GIT_BRANCH := $(shell pushd $(HWC_PATH) > /dev/null; git rev-parse --abbrev-ref HEAD; popd > /dev/null)
21 HWC_VERSION_GIT_SHA := $(shell pushd $(HWC_PATH) > /dev/null; git rev-parse HEAD; popd > /dev/null)
23 # Obtain Android Version
24 ANDROID_VERSION := $(word 1, $(subst ., , $(PLATFORM_VERSION)))
26 LOCAL_PATH := $(call my-dir)
29 LOCAL_SHARED_LIBRARIES := \
42 system/core/include/utils \
43 $(LOCAL_PATH)/public \
44 $(LOCAL_PATH)/common/core \
45 $(LOCAL_PATH)/common/compositor \
46 $(LOCAL_PATH)/common/compositor/gl \
47 $(LOCAL_PATH)/common/display \
48 $(LOCAL_PATH)/common/utils \
50 $(LOCAL_PATH)/os/android \
55 os/android/platformdefines.cpp
57 ifeq ($(strip $(TARGET_USES_HWC2)), true)
58 LOCAL_SRC_FILES += os/android/iahwc2.cpp \
59 os/android/hwcservice.cpp
61 LOCAL_SRC_FILES += os/android/iahwc1.cpp
64 system/core/libsync/include
66 LOCAL_SHARED_LIBRARIES += \
69 LOCAL_CPPFLAGS += -DENABLE_DOUBLE_BUFFERING
72 ifeq ($(strip $(BOARD_USES_GRALLOC1)), true)
73 LOCAL_SRC_FILES += os/android/gralloc1bufferhandler.cpp
75 LOCAL_SRC_FILES += os/android/grallocbufferhandler.cpp
79 -DHWC_VERSION_GIT_BRANCH="\"$(HWC_VERSION_GIT_BRANCH)\"" \
80 -DHWC_VERSION_GIT_SHA="\"$(HWC_VERSION_GIT_SHA)\"" \
81 -DHWC2_INCLUDE_STRINGIFICATION \
86 -fstack-protector-strong \
87 -Wformat -Wformat-security \
88 -std=c++14 -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64 \
89 -Wall -Wsign-compare -Wpointer-arith \
90 -Wcast-qual -Wcast-align \
91 -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64 \
93 -Wno-unused-private-field \
94 -Wno-unused-function \
95 -Wno-unused-parameter \
98 ifeq ($(strip $(BOARD_USES_VULKAN)), true)
99 LOCAL_SHARED_LIBRARIES += \
104 -DDISABLE_EXPLICIT_SYNC
106 LOCAL_C_INCLUDES += \
107 $(LOCAL_PATH)/common/compositor/vk \
108 $(LOCAL_PATH)/../mesa/include
114 ifeq ($(strip $(BOARD_USES_LIBVA)), true)
115 LOCAL_C_INCLUDES += \
116 $(LOCAL_PATH)/common/compositor/va
118 LOCAL_SHARED_LIBRARIES += \
123 ifeq ($(strip $(BOARD_USES_MINIGBM)), true)
124 LOCAL_CPPFLAGS += -DUSE_MINIGBM
125 LOCAL_C_INCLUDES += \
126 $(INTEL_MINIGBM)/cros_gralloc/
128 LOCAL_C_INCLUDES += \
132 ifeq ($(shell test $(ANDROID_VERSION) -ge 8; echo $$?), 0)
133 LOCAL_SHARED_LIBRARIES += libnativewindow
136 ifeq ($(strip $(BOARD_CURSOR_WA)), true)
138 -DDISABLE_CURSOR_PLANE