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
26 tests/third_party/json-c \
29 MAINTAINERCLEANFILES = ChangeLog INSTALL
31 AM_CPP_INCLUDES = -I$(top_srcdir) -Ipublic -Ios -Ios/linux -Icommon/display/ -Icommon/core/ -Icommon/utils/ -Icommon/compositor/ -Iwsi -Iwsi/drm/
32 AM_CPPFLAGS = -std=c++11 -fPIC -O2 -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fPIE -DHANDLE_OWNED_BY_BUFFER_MANAGER
33 AM_CPPFLAGS += $(AM_CPP_INCLUDES) $(CWARNFLAGS) $(DRM_CFLAGS) $(DEBUG_CFLAGS) -Wformat -Wformat-security
35 libhwcomposer_la_LIBADD = \
39 $(top_builddir)/common/libhwcomposer_common.la \
40 $(top_builddir)/wsi/libhwcomposer_wsi.la \
43 libhwcomposer_la_LTLIBRARIES = libhwcomposer.la
44 libhwcomposer_la_SOURCES = $(hwc_SOURCES)
45 libhwcomposer_ladir = $(libdir)
46 libhwcomposer_la_LDFLAGS = -version-number 0:0:1 -no-undefined -shared
47 libhwcomposer_la_LDFLAGS += -Wl,--no-as-needed,-lva,-lva-drm,--as-needed
49 if ENABLE_DUMMY_COMPOSITOR
50 AM_CPPFLAGS += -DUSE_DC
53 AM_CPP_INCLUDES += -Icommon/compositor/vk
54 AM_CPPFLAGS += -Icommon/compositor/vk -DUSE_VK -DDISABLE_EXPLICIT_SYNC
55 libhwcomposer_la_LDFLAGS += -Wl,--no-as-needed,-lvulkan,--as-needed
57 AM_CPP_INCLUDES += -Icommon/compositor/gl
58 AM_CPPFLAGS += -DUSE_GL
59 libhwcomposer_la_LIBADD += $(GLES2_LIBS)
63 if ENABLE_LINUX_FRONTEND
64 libhwcomposer_la_SOURCES += \
66 os/linux/linux_frontend.h \
67 os/linux/linux_frontend.cpp
69 AM_CPPFLAGS += -DENABLE_RBC -DENABLE_DOUBLE_BUFFERING
72 libiahwcincdir = $(includedir)/libiahwc
73 libiahwcinc_HEADERS = \
74 $(top_srcdir)/public/gpudevice.h \
75 $(top_srcdir)/public/hwcmeta.h \
76 $(top_srcdir)/public/hwcdefs.h \
77 $(top_srcdir)/public/hwclayer.h \
78 $(top_srcdir)/public/hwcrect.h \
79 $(top_srcdir)/public/nativebufferhandler.h \
80 $(top_srcdir)/public/nativedisplay.h \
81 $(top_srcdir)/public/spinlock.h \
82 $(top_srcdir)/os/linux/iahwc.h
85 pkgconfigdir = $(libdir)/pkgconfig
86 pkgconfig_DATA = iahwc.pc
88 .PHONY: ChangeLog INSTALL
96 dist-hook: ChangeLog INSTALL