2 # Copyright (c) 2016 Intel Corporation
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
8 # http://www.apache.org/licenses/LICENSE-2.0
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.
16 include Makefile.sources
18 ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4
24 MAINTAINERCLEANFILES = ChangeLog INSTALL
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"'
32 libhwcomposer_common_la_LIBADD = \
38 noinst_LTLIBRARIES = libhwcomposer_common.la
39 libhwcomposer_common_la_SOURCES = $(common_SOURCES)
40 if ENABLE_DUMMY_COMPOSITOR
41 AM_CPPFLAGS += -DUSE_DC
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
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
56 $(GLPROGRAM_SRC): $(PREBUILT_SHADER_ARRAY)
58 $(PREBUILT_SHADER_ARRAY):
59 $(PREBUILT_SHADER_GEN) $(PREBUILT_SHADER_FOR_PCI_ID)
61 AM_CPPFLAGS += -DUSE_PREBUILT_SHADER_BIN_ARRAY
64 libhwcomposer_common_la_SOURCES += $(gl_SOURCES)
65 AM_CPP_INCLUDES += -Icompositor/gl
68 -DPREBUILT_SHADER_FILE_PATH='"${prefix}/etc"'
70 libhwcomposer_common_la_LIBADD += $(GLES2_LIBS)
73 libhwcomposer_common_la_SOURCES += $(va_SOURCES)
74 AM_CPP_INCLUDES += -Icompositor/va
77 libhwcomposer_common_ladir = $(libdir)
78 libhwcomposer_common_la_LDFLAGS = -version-number 0:0:1 -no-undefined
80 .PHONY: ChangeLog INSTALL
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
96 dist-hook: ChangeLog INSTALL