OSDN Git Service

fix build error
[android-x86/external-IA-Hardware-Composer.git] / 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         common \
24         wsi \
25         . \
26         tests/third_party/json-c \
27         tests
28
29 MAINTAINERCLEANFILES = ChangeLog INSTALL
30
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
34
35 libhwcomposer_la_LIBADD = \
36         $(DRM_LIBS) \
37         $(GBM_LIBS) \
38         $(EGL_LIBS) \
39         $(top_builddir)/common/libhwcomposer_common.la \
40         $(top_builddir)/wsi/libhwcomposer_wsi.la \
41         -lm
42
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
48
49 if ENABLE_DUMMY_COMPOSITOR
50 AM_CPPFLAGS += -DUSE_DC
51 else
52 if ENABLE_VULKAN
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
56 else
57 AM_CPP_INCLUDES += -Icommon/compositor/gl
58 AM_CPPFLAGS += -DUSE_GL
59 libhwcomposer_la_LIBADD += $(GLES2_LIBS)
60 endif
61 endif
62
63 if ENABLE_LINUX_FRONTEND
64 libhwcomposer_la_SOURCES += \
65         os/linux/iahwc.h \
66         os/linux/linux_frontend.h \
67         os/linux/linux_frontend.cpp
68 else
69 AM_CPPFLAGS += -DENABLE_RBC -DENABLE_DOUBLE_BUFFERING
70 endif
71
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
83
84
85 pkgconfigdir = $(libdir)/pkgconfig
86 pkgconfig_DATA = iahwc.pc
87
88 .PHONY: ChangeLog INSTALL
89
90 INSTALL:
91         $(INSTALL_CMD)
92
93 ChangeLog:
94         $(CHANGELOG_CMD)
95
96 dist-hook: ChangeLog INSTALL