bump libtool version
[swfdec.git] / libswfdec / Makefile.am
blob33a462f7256e6058bac58c166e5a98e9b0cbbd3b
1 SUBDIRS = jpeg
3 noinst_PROGRAMS = compute-strings
5 compute_strings_SOURCES = swfdec_as_strings.c
6 compute_strings_CFLAGS = -DCOMPUTE_SWFDEC_AS_STRINGS_H
8 CODECS =
10 if HAVE_FFMPEG
11 CODECS += swfdec_codec_ffmpeg.c
12 endif
13 if HAVE_GST
14 CODECS += swfdec_codec_gst.c
15 endif
16 if HAVE_MAD
17 CODECS += swfdec_codec_mad.c
18 endif
20 lib_LTLIBRARIES = libswfdec-@SWFDEC_MAJORMINOR@.la
22 libswfdec_@SWFDEC_MAJORMINOR@_la_SOURCES = \
23         swfdec_as_array.c \
24         swfdec_as_boolean.c \
25         swfdec_as_context.c \
26         swfdec_as_date.c \
27         swfdec_as_debugger.c \
28         swfdec_as_frame.c \
29         swfdec_as_function.c \
30         swfdec_as_interpret.c \
31         swfdec_as_math.c \
32         swfdec_as_native_function.c \
33         swfdec_as_number.c \
34         swfdec_as_object.c \
35         swfdec_as_script_function.c \
36         swfdec_as_stack.c \
37         swfdec_as_string.c \
38         swfdec_as_strings.c \
39         swfdec_as_super.c \
40         swfdec_as_types.c \
41         swfdec_amf.c \
42         swfdec_asbroadcaster.c \
43         swfdec_audio.c \
44         swfdec_audio_event.c \
45         swfdec_audio_flv.c \
46         swfdec_audio_stream.c \
47         swfdec_bits.c \
48         swfdec_buffer.c \
49         swfdec_button.c \
50         swfdec_button_movie.c \
51         swfdec_cache.c \
52         swfdec_cached.c \
53         swfdec_character.c \
54         swfdec_codec_adpcm.c \
55         swfdec_codec_audio.c \
56         $(CODECS) \
57         swfdec_codec_screen.c \
58         swfdec_codec_video.c \
59         swfdec_codec_vp6_alpha.c \
60         swfdec_color.c \
61         swfdec_color_as.c \
62         swfdec_debug.c \
63         swfdec_decoder.c \
64         swfdec_draw.c \
65         swfdec_edittext.c \
66         swfdec_edittext_movie.c \
67         swfdec_enums.c \
68         swfdec_event.c \
69         swfdec_file_loader.c \
70         swfdec_filter.c \
71         swfdec_filter_as.c \
72         swfdec_flv_decoder.c \
73         swfdec_font.c \
74         swfdec_graphic.c \
75         swfdec_graphic_movie.c \
76         swfdec_html_parser.c \
77         swfdec_image.c \
78         swfdec_interval.c \
79         swfdec_key_as.c \
80         swfdec_load_object.c \
81         swfdec_load_object_as.c \
82         swfdec_loader.c \
83         swfdec_loadertarget.c \
84         swfdec_loadvars_as.c \
85         swfdec_marshal.c \
86         swfdec_morph_movie.c \
87         swfdec_morphshape.c \
88         swfdec_mouse_as.c \
89         swfdec_movie.c \
90         swfdec_movie_as_drawing.c \
91         swfdec_movie_asprops.c \
92         swfdec_net_connection.c \
93         swfdec_net_stream.c \
94         swfdec_net_stream_as.c \
95         swfdec_path.c \
96         swfdec_pattern.c \
97         swfdec_player.c \
98         swfdec_player_as.c \
99         swfdec_rect.c \
100         swfdec_rectangle.c \
101         swfdec_ringbuffer.c \
102         swfdec_script.c \
103         swfdec_shape.c \
104         swfdec_shape_parser.c \
105         swfdec_sound.c \
106         swfdec_sound_object.c \
107         swfdec_stroke.c \
108         swfdec_sprite.c \
109         swfdec_sprite_movie.c \
110         swfdec_sprite_movie_as.c \
111         swfdec_stage_as.c \
112         swfdec_style_sheet.c \
113         swfdec_swf_decoder.c \
114         swfdec_swf_instance.c \
115         swfdec_system.c \
116         swfdec_system_as.c \
117         swfdec_tag.c \
118         swfdec_text.c \
119         swfdec_text_format.c \
120         swfdec_url.c \
121         swfdec_utils.c \
122         swfdec_video.c \
123         swfdec_video_movie.c \
124         swfdec_video_movie_as.c \
125         swfdec_xml_node.c \
126         swfdec_xml.c
128 libswfdec_@SWFDEC_MAJORMINOR@_la_CFLAGS = \
129         $(GLOBAL_CFLAGS) $(CAIRO_CFLAGS) $(GLIB_CFLAGS) $(PANGO_CFLAGS) \
130         -I$(top_srcdir) -I$(srcdir)/jpeg/ $(LIBOIL_CFLAGS) \
131         $(GST_CFLAGS) $(FFMPEG_CFLAGS) $(MAD_CFLAGS) \
132         -DG_LOG_DOMAIN=\"Swfdec\"
133 libswfdec_@SWFDEC_MAJORMINOR@_la_LDFLAGS = \
134         $(SYMBOLIC_LDFLAGS) \
135         -version-info $(SWFDEC_LIBVERSION) \
136         -export-symbols-regex '^(swfdec_.*)' \
137         $(CAIRO_LIBS) $(GLIB_LIBS) $(PANGO_LIBS) $(LIBOIL_LIBS) -lz \
138         $(MAD_LIBS) $(FFMPEG_LIBS) $(GST_LIBS)
140 public_headers = \
141         swfdec.h \
142         swfdec_as_array.h \
143         swfdec_as_context.h \
144         swfdec_as_debugger.h \
145         swfdec_as_frame.h \
146         swfdec_as_function.h \
147         swfdec_as_native_function.h \
148         swfdec_as_object.h \
149         swfdec_as_types.h \
150         swfdec_audio.h \
151         swfdec_buffer.h \
152         swfdec_file_loader.h \
153         swfdec_keys.h \
154         swfdec_loader.h \
155         swfdec_player.h \
156         swfdec_rectangle.h \
157         swfdec_script.h \
158         swfdec_system.h \
159         swfdec_url.h
161 libswfdec_@SWFDEC_MAJORMINOR@_la_LIBADD = jpeg/libjpeg.la 
162 libswfdec_@SWFDEC_MAJORMINOR@includedir = $(includedir)/swfdec-@SWFDEC_MAJORMINOR@/libswfdec
163 libswfdec_@SWFDEC_MAJORMINOR@include_HEADERS = $(public_headers) swfdec_enums.h
165 noinst_HEADERS = \
166         swfdec_as_boolean.h \
167         swfdec_as_frame_internal.h \
168         swfdec_as_initialize.h \
169         swfdec_as_internal.h \
170         swfdec_as_date.h \
171         swfdec_as_interpret.h \
172         swfdec_as_number.h \
173         swfdec_as_script_function.h \
174         swfdec_as_stack.h \
175         swfdec_as_string.h \
176         swfdec_as_strings.h \
177         swfdec_as_super.h \
178         swfdec_asnative.h \
179         swfdec_amf.h \
180         swfdec_audio_internal.h \
181         swfdec_audio_event.h \
182         swfdec_audio_flv.h \
183         swfdec_audio_stream.h \
184         swfdec_bits.h \
185         swfdec_button.h \
186         swfdec_button_movie.h \
187         swfdec_cache.h \
188         swfdec_cached.h \
189         swfdec_character.h \
190         swfdec_codec_audio.h \
191         swfdec_codec_video.h \
192         swfdec_color.h \
193         swfdec_debug.h \
194         swfdec_decoder.h \
195         swfdec_draw.h \
196         swfdec_edittext.h \
197         swfdec_edittext_movie.h \
198         swfdec_event.h \
199         swfdec_filter.h \
200         swfdec_flv_decoder.h \
201         swfdec_font.h \
202         swfdec_graphic.h \
203         swfdec_graphic_movie.h \
204         swfdec_image.h \
205         swfdec_initialize.h \
206         swfdec_internal.h \
207         swfdec_interval.h \
208         swfdec_load_object.h \
209         swfdec_loader_internal.h \
210         swfdec_loadertarget.h \
211         swfdec_marshal.h \
212         swfdec_morph_movie.h \
213         swfdec_morphshape.h \
214         swfdec_movie.h \
215         swfdec_net_connection.h \
216         swfdec_net_stream.h \
217         swfdec_path.h \
218         swfdec_pattern.h \
219         swfdec_player_internal.h \
220         swfdec_rect.h \
221         swfdec_ringbuffer.h \
222         swfdec_script_internal.h \
223         swfdec_shape.h \
224         swfdec_shape_parser.h \
225         swfdec_sound.h \
226         swfdec_sound_object.h \
227         swfdec_sprite.h \
228         swfdec_sprite_movie.h \
229         swfdec_style_sheet.h \
230         swfdec_swf_decoder.h \
231         swfdec_swf_instance.h \
232         swfdec_stroke.h \
233         swfdec_tag.h \
234         swfdec_text.h \
235         swfdec_text_format.h \
236         swfdec_types.h \
237         swfdec_utils.h \
238         swfdec_video.h \
239         swfdec_video_movie.h \
240         swfdec_xml_node.h \
241         swfdec_xml.h
243 EXTRA_DIST = \
244         compiler.c \
245         swfdec_as_initialize.as \
246         swfdec_initialize.as \
247         swfdec_marshal.list
249 BUILT_SOURCES = \
250         swfdec_asnative.h \
251         swfdec_as_strings.h \
252         swfdec_enums.c \
253         swfdec_enums.h \
254         swfdec_marshal.c \
255         swfdec_marshal.h
257 CLEANFILES = \
258         $(BUILT_SOURCES)
260 swfdec_asnative.h: $(libswfdec_@SWFDEC_MAJORMINOR@_la_SOURCES)
261         (cd $(srcdir) \
262           && echo "#include \"swfdec_as_types.h\"" \
263           && echo "#define SWFDEC_AS_NATIVE(x,y,func) void func (SwfdecAsContext *cx, \\" \
264           && echo "    SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret);" \
265           && echo "#define SWFDEC_AS_CONSTRUCTOR(x,y,func,type) SWFDEC_AS_NATIVE(x,y,func) GType type (void);" \
266           && grep -he "^SWFDEC_AS_CONSTRUCTOR" $(libswfdec_@SWFDEC_MAJORMINOR@_la_SOURCES) \
267           && grep -he "^SWFDEC_AS_NATIVE" $(libswfdec_@SWFDEC_MAJORMINOR@_la_SOURCES) \
268           && echo "#undef SWFDEC_AS_CONSTRUCTOR" \
269           && echo "#undef SWFDEC_AS_NATIVE" \
270           && echo "#define SWFDEC_AS_NATIVE(x,y,func) SWFDEC_AS_CONSTRUCTOR(x,y,func,NULL)" \
271           && echo "#define SWFDEC_AS_CONSTRUCTOR(x,y,func,type) { x, y, func, G_STRINGIFY (func), type }," \
272           && echo "static const struct { guint x, y; SwfdecAsNative func; const char *name; GType (* get_type) (void); } native_funcs[] = {" \
273           && grep -he "^SWFDEC_AS_CONSTRUCTOR" $(libswfdec_@SWFDEC_MAJORMINOR@_la_SOURCES) \
274           && grep -he "^SWFDEC_AS_NATIVE" $(libswfdec_@SWFDEC_MAJORMINOR@_la_SOURCES) \
275           && echo "  { 0, 0, NULL }" \
276           && echo "};" \
277           && echo "#undef SWFDEC_AS_CONSTRUCTOR" \
278           && echo "#undef SWFDEC_AS_NATIVE" \
279          ) >> xgen-san \
280         && (cmp -s xgen-san swfdec_asnative.h || cp xgen-san swfdec_asnative.h) \
281         && rm -f xgen-san
283 swfdec_marshal.h: swfdec_marshal.list Makefile
284         $(GLIB_GENMARSHAL) --prefix=swfdec_marshal $(srcdir)/swfdec_marshal.list --header >> xgen-smh \
285         && (cmp -s xgen-smh swfdec_marshal.h || cp xgen-smh swfdec_marshal.h) \
286         && rm -f xgen-smh
288 swfdec_marshal.c: swfdec_marshal.list swfdec_marshal.h Makefile
289         (echo "#include \"swfdec_marshal.h\""; \
290          $(GLIB_GENMARSHAL) --prefix=swfdec_marshal $(srcdir)/swfdec_marshal.list --body;) >> xgen-smc \
291         && cp xgen-smc swfdec_marshal.c \
292         && rm -f xgen-smc 
294 swfdec_enums.h: $(public_headers) Makefile
295         ( cd $(srcdir) && $(GLIB_MKENUMS) \
296                         --fhead "#ifndef __SWFDEC_ENUMS_H__\n#define __SWFDEC_ENUMS_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
297                         --fprod "/* enumerations from \"@filename@\" */\n" \
298                         --vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define SWFDEC_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
299                         --ftail "G_END_DECLS\n\n#endif /* __SWFDEC_ENUMS_H__ */" \
300                 $(public_headers) ) >> xgen-seh \
301         && (cmp -s xgen-seh swfdec_enums.h || cp xgen-seh swfdec_enums.h ) \
302         && rm -f xgen-seh
304 swfdec_enums.c: $(public_headers) Makefile
305         ( cd $(srcdir) && $(GLIB_MKENUMS) \
306                         --fhead "#include \"swfdec.h\"\n" \
307                         --fprod "\n/* enumerations from \"@filename@\" */" \
308                         --vhead "GType\n@enum_name@_get_type (void)\n{\n  static GType etype = 0;\n  if (etype == 0) {\n    static const G@Type@Value values[] = {" \
309                         --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
310                         --vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (g_intern_static_string (\"@EnumName@\"), values);\n  }\n  return etype;\n}\n" \
311                 $(public_headers) ) > xgen-sec \
312         && cp xgen-sec swfdec_enums.c  \
313         && rm -f xgen-sec
315 swfdec_as_strings.h: swfdec_as_strings.c compute-strings
316         ./compute-strings >> xgen-sas \
317         && cp xgen-sas swfdec_as_strings.h \
318         && rm -f xgen-sas