# 
# Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
# 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

SRCS = \
	vaapi/vaapi_utils.cpp	\
	vaapi/VaapiContext.cpp \
	vaapi/VaapiDisplay.cpp \
	vaapi/VaapiGlobalContext.cpp \
	vaapi/VaapiImage.cpp \
	vaapi/VaapiImageFormat.cpp \
	vaapi/VaapiSubpicture.cpp \
	vaapi/VaapiSurface.cpp \
	vaapi/VaapiSurfaceProxy.cpp \
	$(NULL)

if USE_VAAPI
pkglib_LTLIBRARIES += libgnashvaapi.la

libgnashvaapi_la_CPPFLAGS = \
	-I$(top_srcdir)/libbase	\
	$(BOOST_CFLAGS)	\
	$(FFMPEG_CFLAGS) \
	$(LIBVA_CFLAGS)	\
	$(LIBVA_X11_CFLAGS) \
	$(NULL)

libgnashvaapi_la_LIBADD = \
	$(X11_LIBS) \
	$(BOOST_LIBS) \
	$(FFMPEG_LIBS) \
	$(LIBVA_LIBS) \
	$(LIBVA_GLX_LIBS) \
	$(LIBVA_X11_LIBS) \
	$(NULL)

libgnashvaapi_la_SOURCES = $(SRCS)

if HAVE_VAAPI_GLX
libgnashvaapi_la_CPPFLAGS += \
	$(LIBVA_GLX_CFLAGS) \
	$(NULL)

libgnashvaapi_la_LIBADD += \
	$(LIBVA_GLX_LIBS) \
	$(NULL)

libgnashvaapi_la_SOURCES += \
	vaapi/VaapiDisplayGLX.h \
	vaapi/VaapiSurfaceGLX.cpp \
	vaapi/VaapiSurfaceGLX.h \
	$(NULL)
endif

libgnashvaapi_la_LDFLAGS = -release $(VERSION)
endif

noinst_HEADERS += \
	vaapi/vaapi_common.h \
	vaapi/vaapi_utils.h \
	vaapi/VaapiContext.h \
	vaapi/VaapiDisplay.h \
	vaapi/VaapiDisplayX11.h \
	vaapi/VaapiDisplayGLX.h \
	vaapi/VaapiException.h \
	vaapi/VaapiGlobalContext.h \
	vaapi/VaapiImage.h \
	vaapi/VaapiImageFormat.h \
	vaapi/VaapiSubpicture.h \
	vaapi/VaapiSurface.h \
	vaapi/VaapiSurfaceGLX.h \
	vaapi/VaapiSurfaceProxy.h \
	$(NULL)

EXTRA_DIST = $(SRCS) $(noinst_HEADERS)

libgnashdevice_la_CPPFLAGS += $(VAAPI_CFLAGS)
# libgnashdevice_la_SOURCES += \
# 	vaapi/VaapiDevice.cpp \
# 	vaapi/VaapiDevice.h
libgnashdevice_la_LIBADD += $(VAAPI_LIBS)
