OSDN Git Service

Reuse last overlay plane on ACRN when multi monitors connected
[android-x86/external-IA-Hardware-Composer.git] / common / Makefile.am
1 #
2 # Copyright (c) 2016 Intel Corporation
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #      http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15
16 include Makefile.sources
17
18 ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4
19
20 AM_MAKEFLAGS = -s
21
22 SUBDIRS = .
23
24 MAINTAINERCLEANFILES = ChangeLog INSTALL
25
26 AM_CPP_INCLUDES = -Icore -Iutils -Icompositor -Idisplay -I../os/ -I../os/linux/ -I../public/ -I../wsi/
27 AM_CPPFLAGS = -std=c++11 -fPIC -O2 -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fPIE -DENABLE_DOUBLE_BUFFERING
28 AM_CPPFLAGS += $(AM_CPP_INCLUDES) $(CWARNFLAGS) $(DRM_CFLAGS) $(DEBUG_CFLAGS) -Wformat -Wformat-security
29 AM_CPPFLAGS += -DLOCK_DIR_PREFIX='"${prefix}/etc"'
30 AM_CPPFLAGS += -DHWC_DISPLAY_INI_PATH='"${prefix}/etc/hwc_display.ini"'
31
32 libhwcomposer_common_la_LIBADD = \
33         $(DRM_LIBS) \
34         $(GBM_LIBS) \
35         $(EGL_LIBS) \
36         -lm
37
38 noinst_LTLIBRARIES = libhwcomposer_common.la
39 libhwcomposer_common_la_SOURCES = $(common_SOURCES)
40 if ENABLE_DUMMY_COMPOSITOR
41 AM_CPPFLAGS += -DUSE_DC
42 else
43 if ENABLE_VULKAN
44 libhwcomposer_common_la_SOURCES += $(vk_SOURCES)
45 AM_CPP_INCLUDES += -Icompositor/vk
46 AM_CPPFLAGS += -Icompositor/vk -DUSE_VK -DDISABLE_EXPLICIT_SYNC
47 libhwcomposer_common_la_LIBADD += -lvulkan
48 else
49
50 if ENABLE_PREBUILT_SHADER_BIN_ARRAY
51 PREBUILT_SHADER_DIR=compositor/gl/gl_shader_pre_built
52 PREBUILT_SHADER_GEN=$(PREBUILT_SHADER_DIR)/generate_c_arrays.sh
53 GLPROGRAM_SRC=compositor/gl/glprogram.cpp
54 PREBUILT_SHADER_ARRAY=$(PREBUILT_SHADER_DIR)/../glprebuiltshaderarray.h
55
56 $(GLPROGRAM_SRC): $(PREBUILT_SHADER_ARRAY)
57
58 $(PREBUILT_SHADER_ARRAY):
59         $(PREBUILT_SHADER_GEN) $(PREBUILT_SHADER_FOR_PCI_ID)
60
61 AM_CPPFLAGS += -DUSE_PREBUILT_SHADER_BIN_ARRAY
62 endif
63
64 libhwcomposer_common_la_SOURCES += $(gl_SOURCES)
65 AM_CPP_INCLUDES += -Icompositor/gl
66 AM_CPPFLAGS += \
67         -DUSE_GL \
68         -DPREBUILT_SHADER_FILE_PATH='"${prefix}/etc"'
69
70 libhwcomposer_common_la_LIBADD += $(GLES2_LIBS)
71 endif
72
73 libhwcomposer_common_la_SOURCES += $(va_SOURCES)
74 AM_CPP_INCLUDES += -Icompositor/va
75 endif
76
77 libhwcomposer_common_ladir = $(libdir)
78 libhwcomposer_common_la_LDFLAGS = -version-number 0:0:1 -no-undefined
79
80 .PHONY: ChangeLog INSTALL
81
82 INSTALL:
83         $(INSTALL_CMD)
84
85 ChangeLog:
86         $(CHANGELOG_CMD)
87
88 clean-local:
89 if ENABLE_PREBUILT_SHADER_BIN_ARRAY
90         -rm -rf $(PREBUILT_SHADER_DIR)/shader-test
91         -rm -rf $(PREBUILT_SHADER_DIR)/shader_prog_arrays
92         -rm -rf $(PREBUILT_SHADER_DIR)/bin_to_c_array
93         -rm -f compositor/gl/glprebuiltshaderarray.h
94 endif
95
96 dist-hook: ChangeLog INSTALL