# 
#   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
# 

#
# Build the GTK gui
#

GTK_CANVAS = gtk/gtk_canvas.cpp gtk/gtk_canvas.h 

if BUILD_GTK_GUI
bin_PROGRAMS += gtk-gnash

gtk_gnash_SOURCES = $(GUI_SRCS) $(GTK_CANVAS) \
	gtk/gtk.cpp gtk/gtksup.h gtk/gtk_glue.h gtk/gui_gtk.cpp
gtk_gnash_CPPFLAGS = -DGUI_GTK -DGUI_CONFIG=\"GTK\" \
	$(AM_CPPFLAGS) $(GTK_CFLAGS) $(X11_CFLAGS)
gtk_gnash_LDFLAGS = -export-dynamic
gtk_gnash_LDADD = \
	$(top_builddir)/librender/libgnashrender.la \
	$(GNASH_LIBS) \
	$(GTK_LIBS) \
	$(INTLLIBS) \
	$(BOOST_LIBS) \
	$(NULL)

#gtk_gnash_DEPENDENCIES = .configline

if BUILD_OGL_RENDERER
gtk_gnash_CPPFLAGS += $(OPENGL_CFLAGS)
gtk_gnash_SOURCES += gtk/gtk_glue_gtkglext.cpp gtk/gtk_glue_gtkglext.h 
gtk_gnash_LDADD += \
	$(OPENGL_LIBS) \
	$(NULL)
endif	# BUILD_OGL_RENDERER

if BUILD_AGG_RENDERER
gtk_gnash_CPPFLAGS += $(AGG_CFLAGS)
gtk_gnash_SOURCES += gtk/gtk_glue_agg.cpp gtk/gtk_glue_agg.h 
gtk_gnash_LDADD += \
	$(AGG_LIBS) \
	$(NULL)

if HAVE_VAAPI
noinst_HEADERS		+= gtk/gtk_glue_agg_vaapi.h
gtk_gnash_SOURCES	+= gtk/gtk_glue_agg_vaapi.cpp
gtk_gnash_CPPFLAGS	+= \
	$(X11_CFLAGS) \
	$(LIBVA_X11_CFLAGS) \
	-I$(top_srcdir)/libdevice/vaapi \
	$(NULL)
gtk_gnash_LDADD += \
	$(X11_LIBS) \
	$(LIBVA_LIBS) \
	$(LIBVA_X11_LIBS) \
	$(top_builddir)/libdevice/libgnashvaapi.la \
	$(NULL)
endif   # USE_VAAPI
endif	# BUILD_AGG_RENDERER

if BUILD_OVG_RENDERER
gtk_gnash_CPPFLAGS += $(OPENVG_CFLAGS) $(EGL_CFLAGS)
gtk_gnash_SOURCES += gtk/gtk_glue_ovg.cpp gtk/gtk_glue_ovg.h 
gtk_gnash_LDADD += \
	$(OPENVG_LIBS) \
	$(EGL_LIBS)
endif	# BUILD_OVG_RENDERER

if BUILD_CAIRO_RENDERER
gtk_gnash_CPPFLAGS += $(CAIRO_CFLAGS)
gtk_gnash_SOURCES += gtk/gtk_glue_cairo.cpp gtk/gtk_glue_cairo.h 
gtk_gnash_LDADD += \
	$(CAIRO_LIBS) \
	$(NULL)

endif	# BUILD_CAIRO_RENDERER

endif	# BUILD_GTK_GUI

