GST_PLUGINS_BASE_LIBS is not defined in -base.
[gstreamer-omap:gst-plugins-base.git] / tests / check / Makefile.am
1 include $(top_srcdir)/common/check.mak
2
3 CHECK_REGISTRY = $(top_builddir)/tests/check/test-registry.reg
4 TEST_FILES_DIRECTORY = $(top_srcdir)/tests/files
5
6 REGISTRY_ENVIRONMENT = \
7         GST_REGISTRY=$(CHECK_REGISTRY)
8
9 TESTS_ENVIRONMENT = \
10         CK_DEFAULT_TIMEOUT=120                                  \
11         GST_STATE_IGNORE_ELEMENTS="$(STATE_IGNORE_ELEMENTS)"    \
12         $(REGISTRY_ENVIRONMENT)                                 \
13         GST_PLUGIN_SYSTEM_PATH=                                 \
14         GST_PLUGIN_PATH=$(top_builddir)/gst:$(top_builddir)/sys:$(top_builddir)/ext:$(GST_PLUGINS_DIR) \
15         GST_PLUGIN_LOADING_WHITELIST="gstreamer:gst-plugins-base@$(top_builddir)"
16
17
18 # ths core dumps of some machines have PIDs appended
19 CLEANFILES = core.* test-registry.*
20
21 clean-local: clean-local-check clean-local-orc
22
23 $(CHECK_REGISTRY):
24         $(TESTS_ENVIRONMENT)
25
26 # elements to ignore for the state tests
27 STATE_IGNORE_ELEMENTS = cdio cdparanoiasrc libvisual_ alsasrc alsamixer alsasink
28
29 TESTS = $(check_PROGRAMS)
30
31 if USE_ALSA
32 check_alsa = elements/alsa
33 else
34 check_alsa =
35 endif
36
37 if USE_GNOME_VFS
38 check_gnomevfs = elements/gnomevfssink
39 else
40 check_gnomevfs =
41 endif
42
43 if USE_GIO
44 check_gio = pipelines/gio
45 else
46 check_gio =
47 endif
48
49 if USE_LIBVISUAL
50 check_libvisual = elements/libvisual
51 else
52 check_libvisual =
53 endif
54
55 if USE_OGG
56 check_ogg = pipelines/oggmux
57 else
58 check_ogg =
59 endif
60
61 if USE_PANGO
62 check_pango = elements/textoverlay
63 else
64 check_pango =
65 endif
66
67 if USE_VORBIS
68 check_vorbis = elements/vorbisdec pipelines/vorbisenc pipelines/vorbisdec \
69         elements/vorbistag
70 else
71 check_vorbis =
72 endif
73
74 if USE_THEORA
75 check_theora = pipelines/theoraenc
76 else
77 check_theora =
78 endif
79
80 if USE_VORBIS
81 if USE_THEORA
82 check_encodebin = elements/encodebin
83 else
84 check_encodebin =
85 endif
86 else
87 check_encodebin =
88 endif
89
90 if USE_PLUGIN_SUBPARSE
91 check_subparse = elements/subparse
92 else
93 check_subparse =
94 endif
95
96 if HAVE_ORC
97 check_orc = orc/adder orc/audioconvert orc/volume orc/videoscale orc/videotestsrc
98 else
99 check_orc =
100 endif
101
102 if HAVE_CXX
103 cxx_checks = libs/gstlibscpp
104 else
105 cxx_checks =
106 endif
107
108 check_PROGRAMS = \
109         $(check_alsa) \
110         $(check_gnomevfs) \
111         $(check_gio) \
112         $(check_ogg) \
113         $(check_pango) \
114         $(check_vorbis) \
115         $(check_theora) \
116         elements/adder  \
117         elements/appsink        \
118         elements/appsrc         \
119         elements/audioconvert \
120         elements/audiorate \
121         elements/audioresample \
122         elements/audiotestsrc \
123         elements/decodebin \
124         elements/decodebin2 \
125         $(check_encodebin) \
126         elements/ffmpegcolorspace \
127         elements/gdpdepay \
128         elements/gdppay \
129         elements/multifdsink \
130         elements/playbin \
131         elements/playbin2 \
132         elements/playbin2-compressed \
133         $(check_subparse) \
134         elements/videorate \
135         elements/videoscale \
136         elements/videotestsrc \
137         elements/volume \
138         generic/clock-selection \
139         generic/states \
140         gst/typefindfunctions \
141         libs/libsabi \
142         libs/audio \
143         libs/cddabasesrc \
144         libs/discoverer \
145         libs/fft \
146         libs/mixer \
147         libs/navigation \
148         libs/netbuffer \
149         libs/pbutils \
150         libs/profile \
151         libs/rtp \
152         libs/rtsp \
153         libs/tag \
154         libs/video \
155         libs/xmpwriter \
156         $(cxx_checks) \
157         $(check_orc) \
158         pipelines/simple-launch-lines \
159         pipelines/streamheader \
160         pipelines/basetime \
161         pipelines/capsfilter-renegotiation
162
163 # TORTURE_TO_FIX = \
164 #       elements/adder
165
166 # ffmpegcolorspace takes too long, so disabled for now
167 VALGRIND_TO_FIX = \
168         elements/ffmpegcolorspace \
169         libs/video
170
171 # these tests don't even pass
172 noinst_PROGRAMS = $(check_libvisual)
173
174 noinst_HEADERS = \
175         libs/struct_arm.h     \
176         libs/struct_i386.h     \
177         libs/struct_i386_osx.h \
178         libs/struct_x86_64.h
179
180 AM_CFLAGS = -I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
181         $(GST_CFLAGS) $(GST_CHECK_CFLAGS) \
182         -DGST_TEST_FILES_PATH="\"$(TEST_FILES_DIRECTORY)\"" \
183         -UG_DISABLE_ASSERT -UG_DISABLE_CAST_CHECKS
184 AM_CXXFLAGS = -I$(top_srcdir)/gst-libs -I$(top_builddir)/gst-libs \
185         $(GST_CXXFLAGS) $(GST_CHECK_CFLAGS) \
186         -DGST_TEST_FILES_PATH="\"$(TEST_FILES_DIRECTORY)\"" \
187         -UG_DISABLE_ASSERT -UG_DISABLE_CAST_CHECKS
188 LDADD = $(GST_LIBS) $(GST_CHECK_LIBS)
189
190 # valgrind testing
191 VALGRIND_TESTS_DISABLE = $(VALGRIND_TO_FIX)
192
193 SUPPRESSIONS = $(top_srcdir)/common/gst.supp $(srcdir)/gst-plugins-base.supp
194
195 libs_libsabi_CFLAGS = \
196         $(GST_PLUGINS_BASE_CFLAGS) \
197         $(GST_BASE_CFLAGS) \
198         $(AM_CFLAGS)
199
200 libs_libsabi_LDADD = \
201         $(top_builddir)/gst-libs/gst/app/libgstapp-@GST_MAJORMINOR@.la \
202         $(top_builddir)/gst-libs/gst/audio/libgstaudio-@GST_MAJORMINOR@.la \
203         $(top_builddir)/gst-libs/gst/cdda/libgstcdda-@GST_MAJORMINOR@.la \
204         $(top_builddir)/gst-libs/gst/fft/libgstfft-@GST_MAJORMINOR@.la \
205         $(top_builddir)/gst-libs/gst/interfaces/libgstinterfaces-@GST_MAJORMINOR@.la \
206         $(top_builddir)/gst-libs/gst/netbuffer/libgstnetbuffer-@GST_MAJORMINOR@.la \
207         $(top_builddir)/gst-libs/gst/pbutils/libgstpbutils-@GST_MAJORMINOR@.la \
208         $(top_builddir)/gst-libs/gst/rtp/libgstrtp-@GST_MAJORMINOR@.la \
209         $(top_builddir)/gst-libs/gst/rtsp/libgstrtsp-@GST_MAJORMINOR@.la \
210         $(top_builddir)/gst-libs/gst/tag/libgsttag-@GST_MAJORMINOR@.la \
211         $(top_builddir)/gst-libs/gst/video/libgstvideo-@GST_MAJORMINOR@.la \
212         $(GST_BASE_LIBS) \
213         $(LDADD)
214
215 libs_audio_CFLAGS = \
216         $(GST_PLUGINS_BASE_CFLAGS) \
217         $(GST_BASE_CFLAGS) \
218         $(AM_CFLAGS)
219
220 libs_audio_LDADD = \
221         $(top_builddir)/gst-libs/gst/audio/libgstaudio-@GST_MAJORMINOR@.la \
222         $(top_builddir)/gst-libs/gst/interfaces/libgstinterfaces-@GST_MAJORMINOR@.la \
223         $(GST_BASE_LIBS) \
224         $(LDADD)
225
226 libs_cddabasesrc_CFLAGS = \
227         $(GST_PLUGINS_BASE_CFLAGS) \
228         $(GST_BASE_CFLAGS) \
229         $(AM_CFLAGS)
230
231 libs_cddabasesrc_LDADD = \
232         $(top_builddir)/gst-libs/gst/cdda/libgstcdda-@GST_MAJORMINOR@.la \
233         $(top_builddir)/gst-libs/gst/tag/libgsttag-@GST_MAJORMINOR@.la \
234         $(GST_BASE_LIBS) \
235         $(LDADD)
236
237 libs_discoverer_CFLAGS = \
238         $(GST_PLUGINS_BASE_CFLAGS) \
239         $(AM_CFLAGS) \
240         -DGST_TEST_FILE="\"$(abs_top_srcdir)/tests/files/partialframe.mjpeg\""
241 libs_discoverer_LDADD = \
242         $(top_builddir)/gst-libs/gst/pbutils/libgstpbutils-@GST_MAJORMINOR@.la \
243         $(GST_BASE_LIBS) $(LDADD)
244
245 libs_fft_CFLAGS = \
246         $(GST_PLUGINS_BASE_CFLAGS) \
247         $(GST_BASE_CFLAGS) \
248         $(AM_CFLAGS)
249
250 libs_fft_LDADD = \
251         $(top_builddir)/gst-libs/gst/fft/libgstfft-@GST_MAJORMINOR@.la \
252         $(GST_BASE_LIBS) \
253         $(LDADD)
254
255 libs_mixer_CFLAGS = \
256         $(GST_PLUGINS_BASE_CFLAGS) \
257         $(GST_BASE_CFLAGS) \
258         $(AM_CFLAGS)
259
260 libs_mixer_LDADD = \
261         $(top_builddir)/gst-libs/gst/interfaces/libgstinterfaces-@GST_MAJORMINOR@.la \
262         $(GST_BASE_LIBS) \
263         $(LDADD)
264
265 libs_navigation_CFLAGS = \
266         $(GST_PLUGINS_BASE_CFLAGS) \
267         $(GST_BASE_CFLAGS) \
268         $(AM_CFLAGS)
269
270 libs_navigation_LDADD = \
271         $(top_builddir)/gst-libs/gst/interfaces/libgstinterfaces-@GST_MAJORMINOR@.la \
272         $(GST_BASE_LIBS) \
273         $(LDADD)
274
275 libs_netbuffer_CFLAGS = \
276         $(GST_PLUGINS_BASE_CFLAGS) \
277         $(AM_CFLAGS)
278 libs_netbuffer_LDADD = \
279         $(top_builddir)/gst-libs/gst/netbuffer/libgstnetbuffer-@GST_MAJORMINOR@.la \
280         $(LDADD)
281
282 libs_rtp_CFLAGS = \
283         $(GST_PLUGINS_BASE_CFLAGS) \
284         $(AM_CFLAGS)
285 libs_rtp_LDADD = \
286         $(top_builddir)/gst-libs/gst/rtp/libgstrtp-@GST_MAJORMINOR@.la \
287         $(GST_BASE_LIBS) $(LDADD)
288
289 libs_rtsp_CFLAGS = \
290         $(GST_PLUGINS_BASE_CFLAGS) \
291         $(AM_CFLAGS)
292 libs_rtsp_LDADD = \
293         $(top_builddir)/gst-libs/gst/rtsp/libgstrtsp-@GST_MAJORMINOR@.la \
294         $(GST_BASE_LIBS) $(LDADD)
295
296 libs_tag_CFLAGS = \
297         $(GST_PLUGINS_BASE_CFLAGS) \
298         $(GST_BASE_CFLAGS) \
299         $(AM_CFLAGS)
300 libs_tag_LDADD = \
301         $(top_builddir)/gst-libs/gst/tag/libgsttag-@GST_MAJORMINOR@.la \
302         $(GST_BASE_LIBS) $(LDADD)
303
304 libs_pbutils_CFLAGS = \
305         $(GST_PLUGINS_BASE_CFLAGS) \
306         $(AM_CFLAGS)
307 libs_pbutils_LDADD = \
308         $(top_builddir)/gst-libs/gst/pbutils/libgstpbutils-@GST_MAJORMINOR@.la \
309         $(top_builddir)/gst-libs/gst/video/libgstvideo-@GST_MAJORMINOR@.la \
310         $(GST_BASE_LIBS) $(LDADD)
311
312 libs_profile_CFLAGS = \
313         $(GST_PLUGINS_BASE_CFLAGS) \
314         $(AM_CFLAGS)
315 libs_profile_LDADD = \
316         $(top_builddir)/gst-libs/gst/pbutils/libgstpbutils-@GST_MAJORMINOR@.la $(LDADD)
317
318 libs_xmpwriter_CFLAGS = \
319         $(GST_PLUGINS_BASE_CFLAGS) \
320         $(GST_BASE_CFLAGS) \
321         $(AM_CFLAGS)
322
323 libs_xmpwriter_LDADD = \
324         $(top_builddir)/gst-libs/gst/tag/libgsttag-@GST_MAJORMINOR@.la \
325         $(GST_BASE_LIBS) \
326         $(LDADD)
327
328
329 libs_gstlibscpp_SOURCES = libs/gstlibscpp.cc
330
331 elements_appsink_CFLAGS = \
332         $(GST_PLUGINS_BASE_CFLAGS) \
333         $(AM_CFLAGS)
334
335 elements_appsink_LDADD = \
336         $(top_builddir)/gst-libs/gst/app/libgstapp-@GST_MAJORMINOR@.la \
337         $(LDADD)
338
339 elements_appsrc_CFLAGS = \
340         $(GST_PLUGINS_BASE_CFLAGS) \
341         $(AM_CFLAGS)
342
343 elements_appsrc_LDADD = \
344         $(top_builddir)/gst-libs/gst/app/libgstapp-@GST_MAJORMINOR@.la \
345         $(LDADD)
346
347 elements_alsa_CFLAGS = \
348         $(GST_PLUGINS_BASE_CFLAGS) \
349         $(AM_CFLAGS)
350
351 elements_alsa_LDADD = \
352         $(top_builddir)/gst-libs/gst/interfaces/libgstinterfaces-@GST_MAJORMINOR@.la \
353         $(LDADD)
354
355 elements_audioconvert_CFLAGS = \
356         $(GST_PLUGINS_BASE_CFLAGS) \
357         $(GST_BASE_CFLAGS) \
358         $(AM_CFLAGS)
359
360 elements_audioconvert_LDADD = \
361         $(top_builddir)/gst-libs/gst/audio/libgstaudio-@GST_MAJORMINOR@.la \
362         $(top_builddir)/gst-libs/gst/interfaces/libgstinterfaces-@GST_MAJORMINOR@.la \
363         $(GST_BASE_LIBS) \
364         $(LDADD)
365
366 elements_audiorate_LDADD =  $(LDADD)
367 elements_audiorate_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
368
369 elements_libvisual_LDADD =  $(LDADD)
370 elements_libvisual_CFLAGS = $(CFLAGS) $(AM_CFLAGS)
371
372 elements_gdpdepay_LDADD = $(GST_GDP_LIBS) $(LDADD)
373 elements_gdppay_LDADD = $(GST_GDP_LIBS) $(LDADD)
374
375 elements_playbin_LDADD = $(GST_BASE_LIBS) $(LDADD)
376 elements_playbin_CFLAGS = $(GST_BASE_CFLAGS) $(AM_CFLAGS)
377
378 elements_playbin2_LDADD = $(GST_BASE_LIBS) $(LDADD)
379 elements_playbin2_CFLAGS = $(GST_BASE_CFLAGS) $(AM_CFLAGS)
380
381 elements_playbin2_compressed_LDADD = $(top_builddir)/gst-libs/gst/interfaces/libgstinterfaces-@GST_MAJORMINOR@.la $(GST_BASE_LIBS) $(LDADD)
382 elements_playbin2_compressed_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(AM_CFLAGS)
383
384 elements_decodebin_LDADD = $(GST_BASE_LIBS) $(LDADD)
385 elements_decodebin_CFLAGS = $(GST_BASE_CFLAGS) $(AM_CFLAGS)
386
387 elements_encodebin_LDADD = $(top_builddir)/gst-libs/gst/pbutils/libgstpbutils-@GST_MAJORMINOR@.la $(GST_BASE_LIBS) $(LDADD)
388 elements_encodebin_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(AM_CFLAGS)
389
390 elements_decodebin2_LDADD = $(GST_BASE_LIBS) $(LDADD)
391 elements_decodebin2_CFLAGS = $(GST_BASE_CFLAGS) $(AM_CFLAGS)
392
393 elements_subparse_LDADD =  $(LDADD)
394 elements_subparse_CFLAGS = $(CFLAGS) $(AM_CFLAGS)
395
396 elements_audioresample_CFLAGS = \
397         $(GST_PLUGINS_BASE_CFLAGS) \
398         $(GST_BASE_CFLAGS) \
399         $(AM_CFLAGS)
400
401 elements_audioresample_LDADD = \
402         $(top_builddir)/gst-libs/gst/audio/libgstaudio-@GST_MAJORMINOR@.la \
403         $(top_builddir)/gst-libs/gst/interfaces/libgstinterfaces-@GST_MAJORMINOR@.la \
404         $(GST_BASE_LIBS) \
405         $(LDADD)
406
407 elements_textoverlay_LDADD = $(GST_BASE_LIBS) $(LDADD)
408 elements_textoverlay_CFLAGS = $(GST_BASE_CFLAGS) $(AM_CFLAGS)
409
410 elements_volume_LDADD = \
411         $(top_builddir)/gst-libs/gst/interfaces/libgstinterfaces-@GST_MAJORMINOR@.la \
412         $(GST_CONTROLLER_LIBS) \
413         $(GST_BASE_LIBS) \
414         $(LDADD)
415
416 elements_volume_CFLAGS = \
417         $(GST_PLUGINS_BASE_CFLAGS) \
418         $(GST_CONTROLLER_CFLAGS) \
419         $(GST_BASE_CFLAGS) \
420         $(AM_CFLAGS)
421
422 elements_vorbisdec_LDADD = \
423         $(LDADD) \
424         $(VORBIS_LIBS) \
425         $(VORBISENC_LIBS)
426
427 elements_vorbisdec_CFLAGS = \
428         $(GST_PLUGINS_BASE_CFLAGS) \
429         $(AM_CFLAGS) \
430         $(VORBIS_CFLAGS) \
431         $(CFLAGS)
432
433 elements_vorbistag_LDADD = \
434         $(LDADD) \
435         $(VORBIS_LIBS) \
436         $(VORBISENC_LIBS)
437
438 elements_vorbistag_CFLAGS = \
439         $(GST_PLUGINS_BASE_CFLAGS) \
440         $(AM_CFLAGS) \
441         $(VORBIS_CFLAGS) \
442         $(CFLAGS)
443
444 elements_videoscale_CFLAGS = \
445         $(GST_PLUGINS_BASE_CFLAGS) \
446         $(GST_BASE_CFLAGS) \
447         $(AM_CFLAGS)
448 elements_videoscale_LDADD = \
449         $(top_builddir)/gst-libs/gst/video/libgstvideo-@GST_MAJORMINOR@.la \
450         $(GST_BASE_LIBS) $(LDADD)
451
452 gst_typefindfunctions_CFLAGS = $(GST_BASE_CFLAGS) $(AM_CFLAGS)
453 gst_typefindfunctions_LDADD = $(GST_BASE_LIBS) $(LDADD)
454
455 libs_video_CFLAGS = \
456         $(GST_PLUGINS_BASE_CFLAGS) \
457         $(GST_BASE_CFLAGS) \
458         $(AM_CFLAGS)
459
460 libs_video_LDADD = \
461         $(top_builddir)/gst-libs/gst/video/libgstvideo-@GST_MAJORMINOR@.la \
462         $(GST_BASE_LIBS) \
463         $(LDADD)
464
465 pipelines_gio_CFLAGS = $(GIO_CFLAGS) $(AM_CFLAGS)
466 pipelines_gio_LDADD = $(GIO_LIBS) $(LDADD)
467
468 pipelines_vorbisenc_CFLAGS = \
469         $(GST_PLUGINS_BASE_CFLAGS) \
470         $(AM_CFLAGS)
471
472 # this seemingly useless CFLAGS line is here only to avoid
473 # vorbisdec.$(OBJEXT) by triggering creation of pipelines_vorbisdec.$(OBJEXT)
474 # instead
475 pipelines_vorbisdec_CFLAGS = $(AM_CFLAGS)
476
477 pipelines_oggmux_LDADD = $(LDADD) $(OGG_LIBS)
478 pipelines_oggmux_CFLAGS = $(AM_CFLAGS) $(OGG_CFLAGS)
479
480 pipelines_theoraenc_CFLAGS = $(AM_CFLAGS) $(THEORA_CFLAGS)
481 pipelines_theoraenc_LDADD = $(LDADD) $(THEORA_LIBS)
482
483 pipelines_simple_launch_lines_CFLAGS = \
484         $(GST_BASE_CFLAGS) \
485         $(AM_CFLAGS)
486
487 pipelines_simple_launch_lines_LDADD = \
488         $(top_builddir)/gst-libs/gst/audio/libgstaudio-@GST_MAJORMINOR@.la \
489         $(top_builddir)/gst-libs/gst/interfaces/libgstinterfaces-@GST_MAJORMINOR@.la \
490         $(GST_BASE_LIBS) \
491         $(LDADD)
492
493 orc_adder_CFLAGS = $(ORC_CFLAGS)
494 orc_adder_LDADD = $(ORC_LIBS) -lorc-test-0.4
495 nodist_orc_adder_SOURCES = orc/adder.c
496 orc_audioconvert_CFLAGS = $(ORC_CFLAGS)
497 orc_audioconvert_LDADD = $(ORC_LIBS) -lorc-test-0.4
498 nodist_orc_audioconvert_SOURCES = orc/audioconvert.c
499 orc_volume_CFLAGS = $(ORC_CFLAGS)
500 orc_volume_LDADD = $(ORC_LIBS) -lorc-test-0.4
501 nodist_orc_volume_SOURCES = orc/volume.c
502 orc_videoscale_CFLAGS = $(ORC_CFLAGS)
503 orc_videoscale_LDADD = $(ORC_LIBS) -lorc-test-0.4
504 nodist_orc_videoscale_SOURCES = orc/videoscale.c
505 orc_videotestsrc_CFLAGS = $(ORC_CFLAGS)
506 orc_videotestsrc_LDADD = $(ORC_LIBS) -lorc-test-0.4
507 nodist_orc_videotestsrc_SOURCES = orc/videotestsrc.c
508
509 orc/adder.c: $(top_srcdir)/gst/adder/gstadderorc.orc
510         $(MKDIR_P) orc/
511         $(ORCC) --test -o $@ $<
512
513 orc/audioconvert.c: $(top_srcdir)/gst/audioconvert/gstaudioconvertorc.orc
514         $(MKDIR_P) orc/
515         $(ORCC) --test -o $@ $<
516
517 orc/volume.c: $(top_srcdir)/gst/volume/gstvolumeorc.orc
518         $(MKDIR_P) orc/
519         $(ORCC) --test -o $@ $<
520
521 orc/videoscale.c: $(top_srcdir)/gst/videoscale/gstvideoscaleorc.orc
522         $(MKDIR_P) orc/
523         $(ORCC) --test -o $@ $<
524
525 orc/videotestsrc.c: $(top_srcdir)/gst/videotestsrc/gstvideotestsrcorc.orc
526         $(MKDIR_P) orc/
527         $(ORCC) --test -o $@ $<
528
529
530 clean-local-orc:
531         rm -rf orc
532
533 EXTRA_DIST = gst-plugins-base.supp