1 # Copyright (C) 2015 The Android Open Source Project
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.
15 ifeq ($(strip $(BOARD_USES_IA_HWCOMPOSER)),true)
16 # Obtain root HWC source path
17 HWC_PATH := $(call my-dir)
19 HWC_VERSION_GIT_BRANCH := $(shell pushd $(HWC_PATH) > /dev/null; git rev-parse --abbrev-ref HEAD; popd > /dev/null)
20 HWC_VERSION_GIT_SHA := $(shell pushd $(HWC_PATH) > /dev/null; git rev-parse HEAD; popd > /dev/null)
22 LOCAL_PATH := $(call my-dir)
25 LOCAL_SHARED_LIBRARIES := \
38 system/core/include/utils \
39 $(LOCAL_PATH)/public \
40 $(LOCAL_PATH)/common/core \
41 $(LOCAL_PATH)/common/compositor \
42 $(LOCAL_PATH)/common/compositor/gl \
43 $(LOCAL_PATH)/common/display \
44 $(LOCAL_PATH)/common/utils \
46 $(LOCAL_PATH)/os/android \
51 common/compositor/compositor.cpp \
52 common/compositor/factory.cpp \
53 common/compositor/nativesurface.cpp \
54 common/compositor/renderstate.cpp \
55 common/core/gpudevice.cpp \
56 common/core/hwclayer.cpp \
57 common/core/overlaylayer.cpp \
58 common/display/displayplanemanager.cpp \
59 common/display/displayqueue.cpp \
60 common/display/headless.cpp \
61 common/display/vblankeventhandler.cpp \
62 common/display/virtualdisplay.cpp \
63 common/utils/fdhandler.cpp \
64 common/utils/hwcevent.cpp \
65 common/utils/hwcthread.cpp \
66 common/utils/hwcutils.cpp \
67 common/utils/disjoint_layers.cpp \
68 wsi/physicaldisplay.cpp \
69 wsi/drm/drmdisplay.cpp \
70 wsi/drm/drmbuffer.cpp \
71 wsi/drm/drmplane.cpp \
72 wsi/drm/drmdisplaymanager.cpp \
73 wsi/drm/drmscopedtypes.cpp \
74 os/android/iahwc2.cpp \
75 os/android/hwcservice.cpp
77 ifeq ($(strip $(BOARD_USES_GRALLOC1)), true)
78 LOCAL_SRC_FILES += os/android/gralloc1bufferhandler.cpp
80 LOCAL_SRC_FILES += os/android/grallocbufferhandler.cpp
83 LOCAL_CFLAGS += -DHWC_VERSION_GIT_BRANCH="\"$(HWC_VERSION_GIT_BRANCH)\""
84 LOCAL_CFLAGS += -DHWC_VERSION_GIT_SHA="\"$(HWC_VERSION_GIT_SHA)\""
85 LOCAL_CFLAGS += -Wno-date-time
88 -DHWC2_INCLUDE_STRINGIFICATION \
93 -fstack-protector-strong \
94 -Wformat -Wformat-security
96 ifeq ($(strip $(BOARD_DISABLE_NATIVE_COLOR_MODES)),true)
97 LOCAL_CPPFLAGS += -DDISABLE_NATIVE_COLOR_MODES
100 ifeq ($(strip $(BOARD_USES_VULKAN)),)
105 common/compositor/gl/glprogram.cpp \
106 common/compositor/gl/glrenderer.cpp \
107 common/compositor/gl/glsurface.cpp \
108 common/compositor/gl/egloffscreencontext.cpp \
109 common/compositor/gl/nativeglresource.cpp \
110 common/compositor/gl/shim.cpp \
111 common/compositor/scopedrendererstate.cpp
114 ifeq ($(strip $(BOARD_USES_MINIGBM)),true)
115 LOCAL_CPPFLAGS += -DUSE_MINIGBM
116 LOCAL_C_INCLUDES += \
117 $(INTEL_MINIGBM)/cros_gralloc/
119 LOCAL_C_INCLUDES += \
123 LOCAL_MODULE := hwcomposer.$(TARGET_BOARD_PLATFORM)
124 LOCAL_MODULE_TAGS := optional
125 #Preffered paths for all vendor hals /vendor/lib/hw
126 LOCAL_PROPRIETARY_MODULE := true
127 LOCAL_MODULE_RELATIVE_PATH := hw
128 LOCAL_MODULE_CLASS := SHARED_LIBRARIES
129 LOCAL_MODULE_SUFFIX := $(TARGET_SHLIB_SUFFIX)
130 include $(BUILD_SHARED_LIBRARY)
134 $(LOCAL_PATH)/os/android/libhwcservice/Android.mk
136 include $(HWC_BUILD_DIRS)
138 #Include tests only if eng build
139 ifneq (,$(filter eng,$(TARGET_BUILD_VARIANT)))
140 # Commenting for now include when ld issue is resolved
141 #include $(LOCAL_PATH)/tests/third_party/json-c/Android.mk