1#
2#   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
3#   Free Software Foundation, Inc.
4#
5#   This program is free software; you can redistribute it and/or modify
6#   it under the terms of the GNU General Public License as published by
7#   the Free Software Foundation; either version 3 of the License, or
8#   (at your option) any later version.
9#
10#   This program is distributed in the hope that it will be useful,
11#   but WITHOUT ANY WARRANTY; without even the implied warranty of
12#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13#   GNU General Public License for more details.
14#
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
18#
19
20## Process this file with automake to generate Makefile.in
21
22AUTOMAKE_OPTIONS = # dejagnu
23
24# @@ shouldn't we drop package_LIBS and leave deps
25#    on the gnash libraries side instead ?
26
27GNASH_LIBS = \
28	$(top_builddir)/libcore/libgnashcore.la \
29	$(top_builddir)/libbase/libgnashbase.la \
30	$(top_builddir)/librender/libgnashrender.la \
31	$(NULL)
32
33if BUILD_LIBMEDIA
34GNASH_LIBS += $(top_builddir)/libmedia/libgnashmedia.la
35endif
36if BUILD_LIBSOUND
37GNASH_LIBS += $(top_builddir)/libsound/libgnashsound.la
38endif
39
40AM_CXXFLAGS = $(CROSS_CXXFLAGS)
41
42AM_LDFLAGS = \
43	$(LIBINTL) \
44	$(LIBADD_DL) \
45	$(PTHREAD_LIBS) \
46	$(BOOST_LIBS) \
47	$(GNASH_LIBS) \
48	$(NULL)
49
50if ANDROID
51AM_LDFLAGS +=  -lui -llog
52endif	# ANDROID
53
54localedir = $(datadir)/locale
55
56AM_CPPFLAGS = \
57        -I$(top_srcdir)/libbase \
58        -I$(top_srcdir)/libdevice \
59        -I$(top_srcdir)/librender \
60	-I$(top_srcdir)/librender/agg \
61	-I$(top_srcdir)/librender/cairo \
62	-I$(top_srcdir)/librender/opengl \
63        -I$(top_srcdir)/libcore \
64        -I$(top_srcdir)/libcore/asobj \
65        -I$(top_srcdir)/libcore/swf \
66        -I$(top_srcdir)/libcore/parser \
67        -I$(top_srcdir)/libcore/vm \
68        -I$(top_srcdir)/libmedia \
69        -I$(top_srcdir)/libsound \
70        -DLOCALEDIR=\"$(localedir)\" \
71	$(GSTREAMER_CFLAGS) \
72	$(GSTREAMER_PLUGINS_BASE_CFLAGS) \
73	$(GLIB_CFLAGS) \
74	$(BOOST_CFLAGS) \
75	$(PTHREAD_CFLAGS) \
76	$(NULL)
77
78if BUILD_EGL_DEVICE
79AM_CPPFLAGS += $(EGL_CFLAGS)
80endif
81if BUILD_DIRECTFB_DEVICE
82AM_CPPFLAGS += $(DIRECTFB_CFLAGS)
83endif
84
85if WIN32
86  # bzip2 is a dependency of some libraries with mingw32
87  AM_LDFLAGS += $(BZ2_LIBS)
88  GNASH_LIBS += -lintl -lz -lws2_32
89endif
90
91bin_PROGRAMS = gprocessor rtmpget
92
93if CYGNAL
94AM_CPPFLAGS += \
95	-I$(top_srcdir)/cygnal/libamf \
96	-I$(top_srcdir)/cygnal/libnet
97bin_PROGRAMS += soldumper flvdumper
98
99CYGNAL_LIBS = \
100	$(top_builddir)/cygnal/libamf/libgnashamf.la \
101	$(top_builddir)/cygnal/libnet/libgnashnet.la \
102	$(BOOST_CYGNAL_LIBS) \
103	$(NULL)
104
105soldumper_SOURCES = soldumper.cpp
106soldumper_LDADD = $(GNASH_LIBS) $(CYGNAL_LIBS) $(AM_LDFLAGS)
107
108flvdumper_SOURCES = flvdumper.cpp
109flvdumper_LDADD = $(GNASH_LIBS) $(CYGNAL_LIBS) $(AM_LDFLAGS)
110
111endif
112
113#check_PROGRAMS = gdebug.swf
114
115if USE_GST_ENGINE
116 # seems kindof silly to build these for an embedded target
117if !CROSS_COMPILING
118   bin_PROGRAMS += findwebcams
119   bin_PROGRAMS += findmicrophones
120endif
121endif
122
123gprocessor_SOURCES = processor.cpp
124# export our symbols so they can be used by Gnash plugins
125gprocessor_LDFLAGS = -export-dynamic
126gprocessor_LDADD = $(GNASH_LIBS) $(AM_LDFLAGS)
127
128rtmpget_SOURCES = rtmpget.cpp
129rtmpget_LDADD = $(top_builddir)/libbase/libgnashbase.la $(AM_LDFLAGS)
130
131#dumpshm_SOURCES = dumpshm.cpp
132#dumpshm_LDADD = $(GNASH_LIBS) $(AM_LDFLAGS)
133
134if USE_GST_ENGINE
135 GST_STUFF = \
136	$(GSTREAMER_PBUTILS_LIBS) \
137	$(GSTREAMER_PLUGINS_BASE_LIBS) \
138	$(GSTREAMER_LIBS) \
139	$(GSTAPP_CFLAGS) \
140	$(NULL)
141
142 findwebcams_SOURCES = findwebcams.cpp
143 findwebcams_LDADD = $(GST_STUFF) $(top_builddir)/libbase/libgnashbase.la \
144                     $(AM_LDFLAGS)
145
146 findmicrophones_SOURCES = findmicrophones.cpp
147 findmicrophones_LDADD = $(GST_STUFF) $(top_builddir)/libbase/libgnashbase.la \
148                         $(AM_LDFLAGS)
149endif
150
151# Wrap a single .as tests in dejagnu_so importer.
152# At play time, if the relative url '../ming-misc.all/Dejagnu.swf'
153# takes to the Dejagnu.swf shared library we'll get visual traces,
154# otherwise normal traces will be used.
155SUFFIXES = as swf
156.as.swf:
157	$(MAKESWF) $(DEF_MAKESWF_FLAGS)	$(MAKESWF_FLAGS) -o $@ $<
158