big merge from master, fix rpm creation, drop fetching swfdec
[gnash.git] / gui / pythonmod / Makefile.am
blobc56bb2bb3bd4836de3b10ab51557dde36ecec0a3
1 ## Process this file with automake to generate Makefile.in
2
3 #   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010,
4 #   2011 Free Software Foundation, Inc.
5
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
10
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19 pkgpythondir = $(pyexecdir)/gtk-2.0
20 pkgpyexecdir = $(pyexecdir)/gtk-2.0
22 GNASH_INCLUDES = \
23         -I$(top_srcdir)/gui \
24         -I$(top_srcdir)/gui/gtk \
25         -I$(top_srcdir)/gui/pythonmod \
26         -I$(top_srcdir)/libbase \
27         -I$(top_srcdir)/librender       \
28         -I$(top_srcdir)/librender/opengl \
29         -I$(top_srcdir)/librender/cairo \
30         -I$(top_srcdir)/librender/agg \
31         -I$(top_srcdir)/libcore \
32         -I$(top_srcdir)/libcore/swf \
33         -I$(top_srcdir)/libcore/vm \
34         -I$(top_srcdir)/libcore/parser \
35         -I$(top_srcdir)/libcore/asobj \
36         -I$(top_srcdir)/libmedia \
37         -I$(top_srcdir)/libvaapi \
38         -I$(top_srcdir)/libsound
40 INCLUDES = \
41         $(PYTHON_CFLAGS) \
42         $(PYGTK_CFLAGS) \
43         $(GTK2_CFLAGS) \
44         $(GNASH_INCLUDES)
46 pkgpyexec_LTLIBRARIES = gnash.la
48 GNASH_LIBS = \
49         $(top_builddir)/libmedia/libgnashmedia.la \
50         $(top_builddir)/librender/libgnashrender.la \
51         $(top_builddir)/libsound/libgnashsound.la \
52         $(top_builddir)/libcore/libgnashcore.la \
53         $(top_builddir)/libbase/libgnashbase.la \
54         $(RENDERER_LIBS)
56 gnash_la_LDFLAGS = -module -avoid-version initgnash -export-dynamic #-no-undefined
57 gnash_la_LIBADD = \
58         $(GNASH_LIBS) \
59         $(GTK2_LIBS) \
60         $(DEPS_LIBS) \
61         $(LIBVA_LIBS) $(LIBVA_X11_LIBS) 
63 instdir = $(includedir)/gnash
64 inst_HEADERS = gnash-view.h
66 RENDERER_GLUE =
67 if BUILD_OGL_RENDERER
68 RENDERER_GLUE += $(top_srcdir)/gui/gtk/gtk_glue_gtkglext.cpp
69 INCLUDES += $(GLEXT_CFLAGS)
70 gnash_la_LIBADD += $(GLEXT_LIBS)
71 endif
72 if BUILD_AGG_RENDERER
73 RENDERER_GLUE += $(top_srcdir)/gui/gtk/gtk_glue_agg.cpp
74 endif
75 if BUILD_CAIRO_RENDERER
76 RENDERER_GLUE += $(top_srcdir)/gui/gtk/gtk_glue_cairo.cpp
77 endif
79 if USE_PYTHON
80 BUILT_SOURCES = gen-gnash.c
81 else
82 BUILT_SOURCES = 
83 endif
85 nodist_gnash_la_SOURCES = $(BUILT_SOURCES)
86 gnash_la_CPPFLAGS = $(INCLUDES) $(GNASH_INCLUDES)
87 gnash_la_SOURCES = \
88         gnashmodule.c \
89         gnash-view.cpp \
90         $(top_srcdir)/gui/gtk/gtk_canvas.cpp \
91         $(RENDERER_GLUE)
93 gnash.c: gnash.defs gnash.override
95 CLEANFILES = gen-gnash.c
96 EXTRA_DIST = gnash.override gnash.defs
98 gen-gnash.c:   gnash.override gnash.defs
99 if HAS_PYTHON
100         if test x"$(PYGOBJECT_CODEGEN)" != xno; then \
101           $(PYGOBJECT_CODEGEN) \
102             --register $(PYGTK_DEFSDIR)/gdk-types.defs \
103             --register $(PYGTK_DEFSDIR)/gtk-types.defs \
104             --override $(srcdir)/gnash.override \
105             --prefix pygnash $(srcdir)/gnash.defs > gen-gnash.c; \
106         else if test x"$(PYGTK_CODEGEN)" != xno; then \
107           $(PYGTK_CODEGEN) \
108             --register $(PYGTK_DEFSDIR)/gdk-types.defs \
109             --register $(PYGTK_DEFSDIR)/gtk-types.defs \
110             --override $(srcdir)/gnash.override \
111             --prefix pygnash $(srcdir)/gnash.defs > gen-gnash.c; \
112          fi; fi
113 endif
115 # Remove libtool .la files
116 install-exec-hook:
117         $(RM) $(DESTDIR)$(pyexecdir)/gtk-2.0/gnash.la
119 uninstall-local:
120         $(RM) $(DESTDIR)$(pyexecdir)/gtk-2.0/gnash.so