big merge from master, fix rpm creation, drop fetching swfdec
[gnash.git] / libmedia / Makefile.am
blob1f301358ee4d07f6fca4d8b98ac731869a8b32d6
1
2 #   Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
3
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17 AUTOMAKE_OPTIONS = foreign
19 EXTRA_DIST = 
21 # this is where Gnash plugins get installed
22 pluginsdir = $(prefix)/lib/gnash/plugins
24 AM_CXXFLAGS = -DREGISTER_MEDIA_HANDLERS
26 # If we are using an installable libltdl, then it needs to be built
27 # before libgnash, as libgnash depends on it for extensions.
28 pkglib_LTLIBRARIES =  libgnashmedia.la
30 libgnashmedia_la_CPPFLAGS = \
31         -I$(top_srcdir)/libbase \
32         $(PTHREAD_CFLAGS) \
33         $(OPENGL_CFLAGS) \
34         $(PNG_CFLAGS) \
35         $(GLIB_CFLAGS) \
36         $(CURL_CFLAGS) \
37         $(Z_CFLAGS) \
38         $(JPEG_CFLAGS) \
39         $(GIF_CFLAGS) \
40         $(BOOST_CFLAGS) \
41         $(NULL)
43 if ANDROID
44   libgnashmedia_la_CPPFLAGS += $(ANDROID_NDK)/usr/include
45 endif
48 # These headers get installed
49 # include_HEADERS = log.h err.h
51 libgnashmedia_la_LIBADD = \
52         $(top_builddir)/libbase/libgnashbase.la \
53         $(FFMPEG_LIBS) \
54         $(PNG_LIBS) \
55         $(JPEG_LIBS) \
56         $(GIF_LIBS) \
57         $(Z_LIBS) \
58         $(CURL_LIBS) \
59         $(OPENGL_LIBS) \
60         $(BOOST_LIBS) \
61         $(PTHREAD_LIBS) \
62         $(NULL)
64 libgnashmedia_la_SOURCES = \
65         MediaHandler.cpp \
66         AudioDecoderSimple.cpp \
67         MediaParser.cpp \
68         FLVParser.cpp \
69         AudioResampler.cpp \
70         $(NULL)
72 noinst_HEADERS = \
73         AudioDecoder.h \
74         VideoDecoder.h \
75         VideoConverter.h \
76         MediaParser.h \
77         MediaHandler.h \
78         FLVParser.h \
79         AudioDecoderSimple.h \
80         SoundInfo.h \
81         AudioResampler.h \
82         AudioInput.h \
83         VideoInput.h \
84         $(NULL)
86 if USE_GST_ENGINE
87    libgnashmedia_la_SOURCES += \
88         gst/MediaHandlerGst.cpp \
89         gst/VideoDecoderGst.cpp \
90         gst/AudioDecoderGst.cpp \
91         gst/MediaParserGst.cpp \
92         gst/VideoConverterGst.cpp \
93         gst/GstUtil.cpp \
94         gst/swfdec_codec_gst.c \
95         gst/VideoInputGst.cpp \
96         gst/AudioInputGst.cpp \
97         $(NULL)
99    noinst_HEADERS += \
100         gst/MediaHandlerGst.h \
101         gst/AudioDecoderGst.h \
102         gst/VideoDecoderGst.h \
103         gst/MediaParserGst.h \
104         gst/VideoConverterGst.h \
105         gst/GstUtil.h \
106         gst/swfdec_codec_gst.h \
107         gst/gnash_gst_version.h \
108         gst/VideoInputGst.h \
109         gst/AudioInputGst.h \
110         $(NULL)
112    libgnashmedia_la_CPPFLAGS += \
113         -I$(top_srcdir)/libmedia/gst \
114         $(GSTREAMER_CFLAGS) \
115         $(GSTAPP_CFLAGS) \
116         $(GSTREAMER_PBUTILS_CFLAGS) \
117         $(NULL)
119    libgnashmedia_la_LIBADD += \
120         -lgstbase-0.10 \
121         $(GSTREAMER_APP_LIBS) \
122         $(GSTREAMER_PBUTILS_LIBS) \
123         $(GSTREAMER_PLUGINS_BASE_LIBS) \
124         $(GSTREAMER_LIBS) \
125         $(NULL)
127 endif
129 if USE_FFMPEG_ENGINE
130    libgnashmedia_la_SOURCES += \
131         ffmpeg/MediaHandlerFfmpeg.cpp \
132         ffmpeg/MediaParserFfmpeg.cpp \
133         ffmpeg/AudioDecoderFfmpeg.cpp \
134         ffmpeg/VideoDecoderFfmpeg.cpp \
135         ffmpeg/AudioResamplerFfmpeg.cpp \
136         ffmpeg/VideoConverterFfmpeg.cpp \
137         ffmpeg/VideoInputFfmpeg.cpp \
138         ffmpeg/AudioInputFfmpeg.cpp \
139         $(NULL)
141    noinst_HEADERS += \
142         ffmpeg/MediaHandlerFfmpeg.h \
143         ffmpeg/MediaParserFfmpeg.h \
144         ffmpeg/AudioDecoderFfmpeg.h \
145         ffmpeg/VideoDecoderFfmpeg.h \
146         ffmpeg/AudioResamplerFfmpeg.h \
147         ffmpeg/ffmpegHeaders.h \
148         ffmpeg/VideoConverterFfmpeg.h \
149         ffmpeg/VideoInputFfmpeg.h \
150         ffmpeg/AudioInputFfmpeg.h \
151         $(NULL)
153    libgnashmedia_la_LIBADD += \
154         $(FFMPEG_LIBS) \
155         $(NULL)
157    libgnashmedia_la_CPPFLAGS += \
158         $(FFMPEG_CFLAGS) \
159         $(NULL)
161 if HAVE_VAAPI
162    libgnashmedia_la_SOURCES += \
163                 ffmpeg/VideoDecoderFfmpegVaapi.cpp \
164                 $(NULL)
166    noinst_HEADERS += \
167                 ffmpeg/VideoDecoderFfmpegVaapi.h \
168                 $(NULL)
169 endif
170 endif
172 if USE_HAIKU_ENGINE
173    libgnashmedia_la_SOURCES += \
174         haiku/MediaHandlerHaiku.cpp \
175         haiku/MediaParserHaiku.cpp \
176         haiku/AudioDecoderHaiku.cpp \
177         haiku/VideoDecoderHaiku.cpp \
178         haiku/VideoConverterHaiku.cpp \
179         haiku/VideoInputHaiku.cpp \
180         haiku/AudioInputHaiku.cpp \
181         $(NULL)
183    noinst_HEADERS += \
184         haiku/MediaHandlerHaiku.h \
185         haiku/MediaParserHaiku.h \
186         haiku/AudioDecoderHaiku.h \
187         haiku/VideoDecoderHaiku.h \
188         haiku/VideoConverterHaiku.h \
189         haiku/VideoInputHaiku.h \
190         haiku/AudioInputHaiku.h \
191         $(NULL)
193    libgnashmedia_la_LIBADD += \
194         -lmedia \
195         $(NULL)
197    libgnashmedia_la_CPPFLAGS += \
198         $(NULL)
199 endif
201 if HAVE_SPEEX
202    libgnashmedia_la_LIBADD += \
203         $(SPEEX_LIBS) \
204         $(SPEEXDSP_LIBS) \
205         $(NULL)
206    libgnashmedia_la_CPPFLAGS += \
207         $(SPEEX_CFLAGS) \
208         $(SPEEXDSP_CFLAGS) \
209         $(NULL)
210    libgnashmedia_la_SOURCES += AudioDecoderSpeex.cpp
211    noinst_HEADERS += AudioDecoderSpeex.h
212 endif
214 libgnashmedia_la_LDFLAGS = -release $(VERSION)
216    libgnashmedia_la_CPPFLAGS += \
217         -I$(top_srcdir)/libvaapi \
218         $(NULL)
220 if HAVE_VAAPI
221    libgnashmedia_la_LIBADD += \
222         $(top_builddir)/libvaapi/libgnashvaapi.la \
223         $(NULL)
224 endif
226 if WIN32
227   libgnashmedia_la_LDFLAGS += -no-undefined
228   libgnashmedia_la_LIBADD += \
229         -lintl
230 endif
232 if ENABLE_PCH
233 AM_CXXFLAGS += $(PCH_FLAGS)
234 endif
236 # Rebuild with GCC 4.x Mudflap support
237 mudflap:
238         @echo "Rebuilding with GCC Mudflap support"
239         $(MAKE) CXXFLAGS="$(CXXFLAGS) -fmudflap" LDFLAGS="$(LDFLAGS) -lmudflap"
241 clean-hook:
242         -rm -f core.* *.obj
244 # Remove libtool .la files
245 install-exec-hook:
246         $(RM) $(DESTDIR)$(libdir)/gnash/libgnashmedia.la
248 uninstall-local:
249         $(RM) $(DESTDIR)$(libdir)/gnash/libgnashmedia-*.so