1# Copyright (c) 2007 Intel Corporation. All Rights Reserved.
2#
3# Permission is hereby granted, free of charge, to any person obtaining a
4# copy of this software and associated documentation files (the
5# "Software"), to deal in the Software without restriction, including
6# without limitation the rights to use, copy, modify, merge, publish,
7# distribute, sub license, and/or sell copies of the Software, and to
8# permit persons to whom the Software is furnished to do so, subject to
9# the following conditions:
10#
11# The above copyright notice and this permission notice (including the
12# next paragraph) shall be included in all copies or substantial portions
13# of the Software.
14#
15# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
16# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
18# IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
19# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
23SUBDIRS =
24
25INCLUDES = \
26	$(LIBVA_CFLAGS) \
27	-I$(top_srcdir) \
28	-I$(top_srcdir)/va/x11 \
29	-I$(top_srcdir)/va/vendor/intel \
30	-DVA_DRIVERS_PATH="\"$(LIBVA_DRIVERS_PATH)\""
31
32LDADD = \
33	$(LIBVA_LT_LDFLAGS)
34
35libva_source_c = \
36	va.c			\
37	va_compat.c		\
38	va_fool.c		\
39	va_trace.c		\
40	$(NULL)
41
42libva_source_h = \
43	va.h			\
44	va_backend.h		\
45	va_backend_tpi.h	\
46	va_backend_vpp.h	\
47	va_compat.h		\
48	va_dec_hevc.h		\
49	va_dec_jpeg.h		\
50	va_dec_vp8.h		\
51	va_dec_vp9.h		\
52	va_drmcommon.h		\
53	va_enc.h		\
54	va_enc_h264.h		\
55	va_enc_jpeg.h		\
56	va_enc_vp8.h		\
57	va_enc_mpeg2.h		\
58	va_tpi.h		\
59	va_version.h		\
60	va_vpp.h		\
61	$(NULL)
62
63libva_source_h_priv = \
64	sysdeps.h		\
65	va_fool.h		\
66	va_trace.h		\
67	$(NULL)
68
69libva_ldflags = \
70	$(LDADD) -no-undefined	\
71	-Wl,-version-script,libva.syms \
72	$(NULL)
73
74lib_LTLIBRARIES			= libva.la
75libvaincludedir			= ${includedir}/va
76libvainclude_HEADERS		= $(libva_source_h)
77noinst_HEADERS			= $(libva_source_h_priv)
78libva_la_SOURCES		= $(libva_source_c)
79libva_la_LDFLAGS		= $(libva_ldflags)
80libva_la_DEPENDENCIES		= libva.syms
81libva_la_LIBADD			= $(LIBVA_LIBS) -ldl
82
83lib_LTLIBRARIES			+= libva-tpi.la
84libva_tpi_la_SOURCES		= va_tpi.c
85libva_tpi_la_LDFLAGS		= $(LDADD) -no-undefined
86libva_tpi_la_DEPENDENCIES	= libva.la
87libva_tpi_la_LIBADD		= libva.la -ldl
88
89if USE_DRM
90SUBDIRS				+= drm
91lib_LTLIBRARIES			+= libva-drm.la
92libva_drm_la_SOURCES		=
93libva_drm_la_LDFLAGS		= $(LDADD)
94libva_drm_la_DEPENDENCIES	= libva.la drm/libva_drm.la
95libva_drm_la_LIBADD		= libva.la drm/libva_drm.la \
96	$(LIBVA_LIBS) $(DRM_LIBS) -ldl
97endif
98
99if USE_X11
100SUBDIRS				+= x11
101lib_LTLIBRARIES			+= libva-x11.la
102libva_source_h			+= va_x11.h
103libva_x11_la_SOURCES		=
104libva_x11_la_LDFLAGS		= $(LDADD)
105libva_x11_la_DEPENDENCIES	= libva.la x11/libva_x11.la
106libva_x11_la_LIBADD		= libva.la x11/libva_x11.la \
107	$(LIBVA_LIBS) $(X11_LIBS) $(XEXT_LIBS) $(XFIXES_LIBS) $(DRM_LIBS) -ldl
108endif
109
110if USE_GLX
111SUBDIRS				+= glx
112lib_LTLIBRARIES			+= libva-glx.la
113libva_glx_la_SOURCES		=
114libva_glx_la_LDFLAGS		= $(LDADD)
115libva_glx_la_DEPENDENCIES	= libva.la glx/libva_glx.la libva-x11.la
116libva_glx_la_LIBADD		= libva.la glx/libva_glx.la libva-x11.la \
117	$(GLX_LIBS) -ldl
118endif
119
120if USE_EGL
121SUBDIRS				+= egl
122lib_LTLIBRARIES			+= libva-egl.la
123libva_egl_la_SOURCES		=
124libva_egl_la_LDFLAGS		= $(LDADD)
125libva_egl_la_DEPENDENCIES	= libva.la egl/libva_egl.la
126libva_egl_la_LIBADD		= libva.la egl/libva_egl.la \
127	$(EGL_LIBS) -ldl
128endif
129
130if USE_WAYLAND
131SUBDIRS				+= wayland
132lib_LTLIBRARIES			+= libva-wayland.la
133libva_wayland_la_SOURCES	=
134libva_wayland_la_LDFLAGS	= $(LDADD)
135libva_wayland_la_DEPENDENCIES	= libva.la wayland/libva_wayland.la
136libva_wayland_la_LIBADD		= libva.la wayland/libva_wayland.la \
137	$(WAYLAND_LIBS) $(DRM_LIBS) -ldl
138endif
139
140
141DIST_SUBDIRS = x11 glx egl drm wayland
142
143DISTCLEANFILES = \
144	va_version.h		\
145	$(NULL)
146
147EXTRA_DIST = \
148	va_version.h.in		\
149	libva.syms		\
150	$(NULL)
151