glwin32: don't activate on XP
[vlc.git] / test / Makefile.am
blobe5950655646b8c606a2806f136833b8ee3fc233d
1 ###############################################################################
2 # Automake targets and declarations
3 ###############################################################################
5 AUTOMAKE_OPTIONS = subdir-objects
7 extra_check_verbose = $(extra_check_verbose_$(V))
8 extra_check_verbose_ = $(extra_check_flags__$(AM_DEFAULT_VERBOSITY))
9 extra_check_verbose_0 = @echo TEST $@
10 extra_check_verbose__0 = $(extra_check_verbose_0)
12 ###############################################################################
13 # Unit/regression test
14 ###############################################################################
15 noinst_PROGRAMS =
16 check_PROGRAMS = \
17         test_libvlc_core \
18         test_libvlc_equalizer \
19         test_libvlc_media \
20         test_libvlc_media_list \
21         test_libvlc_media_player \
22         test_libvlc_media_discoverer \
23         test_libvlc_renderer_discoverer \
24         test_libvlc_slaves \
25         test_src_config_chain \
26         test_src_misc_variables \
27         test_src_input_stream \
28         test_src_input_stream_fifo \
29         test_src_interface_dialog \
30         test_src_misc_bits \
31         test_src_misc_epg \
32         test_src_misc_keystore \
33         test_modules_packetizer_helpers \
34         test_modules_packetizer_hxxx \
35         test_modules_keystore \
36         test_modules_demux_dashuri
37 if ENABLE_SOUT
38 check_PROGRAMS += test_modules_tls
39 endif
40 if UPDATE_CHECK
41 check_PROGRAMS += test_src_crypto_update
42 endif
44 check_SCRIPTS = \
45         modules/lua/telnet.sh \
46         check_POTFILES.sh
48 # Disabled test:
49 # meta: No suitable test file
50 EXTRA_PROGRAMS = \
51         test_libvlc_meta \
52         test_libvlc_media_list_player \
53         test_src_input_stream_net \
54         $(NULL)
56 #check_DATA = samples/test.sample samples/meta.sample
57 EXTRA_DIST = \
58         samples/certs/certkey.pem \
59         samples/empty.voc \
60         samples/image.jpg \
61         samples/subitems \
62         samples/slaves \
63         $(check_SCRIPTS)
65 check_HEADERS = libvlc/test.h libvlc/libvlc_additions.h
67 TESTS = $(check_PROGRAMS) check_POTFILES.sh
69 DISTCLEANFILES = samples/test.sample samples/meta.sample
71 # Samples server
72 SAMPLES_SERVER=http://streams.videolan.org/streams-videolan/reference
74 samples/test.sample:
75         mkdir -p `dirname $@`
76         curl $(SAMPLES_SERVER)/avi/Hero-Div3.avi > $@
78 samples/meta.sample:
79         mkdir -p `dirname $@`
80         curl $(SAMPLES_SERVER)/metadata/id3tag/Wesh-Bonneville.mp3 > $@
82 AM_CFLAGS = -DSRCDIR=\"$(srcdir)\"
83 AM_LDFLAGS = -no-install
84 LIBVLCCORE = -L../src/ -lvlccore
85 LIBVLC = -L../lib -lvlc
87 test_libvlc_core_SOURCES = libvlc/core.c
88 test_libvlc_core_LDADD = $(LIBVLC)
89 test_libvlc_equalizer_SOURCES = libvlc/equalizer.c
90 test_libvlc_equalizer_LDADD = $(LIBVLC)
91 test_libvlc_media_SOURCES = libvlc/media.c
92 test_libvlc_media_LDADD = $(LIBVLCCORE) $(LIBVLC)
93 test_libvlc_media_list_player_SOURCES = libvlc/media_list_player.c
94 test_libvlc_media_list_player_LDADD = $(LIBVLC)
95 test_libvlc_media_list_SOURCES = libvlc/media_list.c
96 test_libvlc_media_list_LDADD = $(LIBVLC)
97 test_libvlc_media_player_SOURCES = libvlc/media_player.c
98 test_libvlc_media_player_LDADD = $(LIBVLC)
99 test_libvlc_media_discoverer_SOURCES = libvlc/media_discoverer.c
100 test_libvlc_media_discoverer_LDADD = $(LIBVLC)
101 test_libvlc_renderer_discoverer_SOURCES = libvlc/renderer_discoverer.c
102 test_libvlc_renderer_discoverer_LDADD = $(LIBVLC)
103 test_libvlc_slaves_SOURCES = libvlc/slaves.c
104 test_libvlc_slaves_LDADD = $(LIBVLCCORE) $(LIBVLC)
105 test_libvlc_meta_SOURCES = libvlc/meta.c
106 test_libvlc_meta_LDADD = $(LIBVLC)
107 test_src_misc_variables_SOURCES = src/misc/variables.c
108 test_src_misc_variables_LDADD = $(LIBVLCCORE) $(LIBVLC)
109 test_src_config_chain_SOURCES = src/config/chain.c
110 test_src_config_chain_LDADD = $(LIBVLCCORE)
111 test_src_crypto_update_SOURCES = src/crypto/update.c
112 test_src_crypto_update_LDADD = $(LIBVLCCORE) $(GCRYPT_LIBS)
113 test_src_input_stream_SOURCES = src/input/stream.c
114 test_src_input_stream_LDADD = $(LIBVLCCORE) $(LIBVLC)
115 test_src_input_stream_net_SOURCES = src/input/stream.c
116 test_src_input_stream_net_CFLAGS = $(AM_CFLAGS) -DTEST_NET
117 test_src_input_stream_net_LDADD = $(LIBVLCCORE) $(LIBVLC)
118 test_src_input_stream_fifo_SOURCES = src/input/stream_fifo.c
119 test_src_input_stream_fifo_LDADD = $(LIBVLCCORE) $(LIBVLC)
120 test_src_misc_bits_SOURCES = src/misc/bits.c
121 test_src_misc_bits_LDADD = $(LIBVLC)
122 test_src_misc_epg_SOURCES = src/misc/epg.c
123 test_src_misc_epg_LDADD = $(LIBVLCCORE) $(LIBVLC)
124 test_src_misc_keystore_SOURCES = src/misc/keystore.c
125 test_src_misc_keystore_LDADD = $(LIBVLCCORE) $(LIBVLC)
126 test_src_interface_dialog_SOURCES = src/interface/dialog.c
127 test_src_interface_dialog_LDADD = $(LIBVLCCORE) $(LIBVLC)
128 test_modules_packetizer_helpers_SOURCES = modules/packetizer/helpers.c
129 test_modules_packetizer_helpers_LDADD = $(LIBVLCCORE) $(LIBVLC)
130 test_modules_packetizer_hxxx_SOURCES = modules/packetizer/hxxx.c
131 test_modules_packetizer_hxxx_LDADD = $(LIBVLCCORE) $(LIBVLC)
132 test_modules_keystore_SOURCES = modules/keystore/test.c
133 test_modules_keystore_LDADD = $(LIBVLCCORE) $(LIBVLC)
134 test_modules_tls_SOURCES = modules/misc/tls.c
135 test_modules_tls_LDADD = $(LIBVLCCORE) $(LIBVLC)
136 test_modules_demux_dashuri_SOURCES = modules/demux/dashuri.cpp
138 checkall:
139         $(MAKE) check_PROGRAMS="$(check_PROGRAMS) $(EXTRA_PROGRAMS)" check
141 FORCE:
142         @echo "Generated source cannot be phony. Go away." >&2
143         @exit 1
145 .PHONY: FORCE
147 libvlc_demux_run_la_SOURCES = src/input/demux-run.c src/input/demux-run.h \
148         src/input/common.c src/input/common.h
149 libvlc_demux_run_la_CPPFLAGS = $(AM_CPPFLAGS) \
150         -DTOP_BUILDDIR=\"$$(cd "$(top_builddir)"; pwd)\" \
151         -DTOP_SRCDIR=\"$$(cd "$(top_srcdir)"; pwd)\"
152 libvlc_demux_run_la_LDFLAGS = -no-install -static
153 libvlc_demux_run_la_LIBADD = \
154         ../lib/libvlc.la ../src/libvlccore.la ../compat/libcompat.la
155 if !HAVE_DYNAMIC_PLUGINS
156 libvlc_demux_run_la_CPPFLAGS += -DHAVE_STATIC_MODULES
157 libvlc_demux_run_la_LIBADD += \
158         ../modules/libxml_plugin.la \
159         ../modules/libconsole_logger_plugin.la \
160         ../modules/libaiff_plugin.la \
161         ../modules/libasf_plugin.la \
162         ../modules/libau_plugin.la \
163         ../modules/libavi_plugin.la \
164         ../modules/libcaf_plugin.la \
165         ../modules/libes_plugin.la \
166         ../modules/libflacsys_plugin.la \
167         ../modules/libh26x_plugin.la \
168         ../modules/libmjpeg_plugin.la \
169         ../modules/libmp4_plugin.la \
170         ../modules/libnsc_plugin.la \
171         ../modules/libnsv_plugin.la \
172         ../modules/libnuv_plugin.la \
173         ../modules/libps_plugin.la \
174         ../modules/libpva_plugin.la \
175         ../modules/libsap_plugin.la \
176         ../modules/libsmf_plugin.la \
177         ../modules/libsubtitle_plugin.la \
178         ../modules/libtta_plugin.la \
179         ../modules/libttml_plugin.la \
180         ../modules/libty_plugin.la \
181         ../modules/libvoc_plugin.la \
182         ../modules/libwav_plugin.la \
183         ../modules/libwebvtt_plugin.la \
184         ../modules/libxa_plugin.la \
185         ../modules/libpacketizer_a52_plugin.la \
186         ../modules/libpacketizer_copy_plugin.la \
187         ../modules/libpacketizer_dts_plugin.la \
188         ../modules/libpacketizer_flac_plugin.la \
189         ../modules/libpacketizer_h264_plugin.la \
190         ../modules/libpacketizer_hevc_plugin.la \
191         ../modules/libpacketizer_mlp_plugin.la \
192         ../modules/libpacketizer_mpeg4audio_plugin.la \
193         ../modules/libpacketizer_mpeg4video_plugin.la \
194         ../modules/libpacketizer_mpegaudio_plugin.la \
195         ../modules/libpacketizer_mpegvideo_plugin.la \
196         ../modules/libpacketizer_vc1_plugin.la \
197         ../modules/librawaud_plugin.la \
198         ../modules/librawvid_plugin.la \
199         ../modules/libfilesystem_plugin.la \
200         ../modules/libxml_plugin.la \
201         ../modules/libogg_plugin.la \
202         -lstdc++
203 if HAVE_DVBPSI
204 libvlc_demux_run_la_CPPFLAGS += -DHAVE_DVBPSI
205 libvlc_demux_run_la_LIBADD += ../modules/libts_plugin.la
206 endif
207 if HAVE_MATROSKA
208 libvlc_demux_run_la_CPPFLAGS += -DHAVE_MATROSKA
209 libvlc_demux_run_la_LIBADD += ../modules/libmkv_plugin.la
210 endif
211 endif
212 EXTRA_LTLIBRARIES = libvlc_demux_run.la
214 libvlc_demux_dec_run_la_SOURCES = $(libvlc_demux_run_la_SOURCES) \
215         src/input/decoder.c src/input/decoder.h
216 libvlc_demux_dec_run_la_CPPFLAGS = $(libvlc_demux_run_la_CPPFLAGS) -DHAVE_DECODERS
217 libvlc_demux_dec_run_la_LDFLAGS = $(libvlc_demux_run_la_LDFLAGS)
218 libvlc_demux_dec_run_la_LIBADD = $(libvlc_demux_run_la_LIBADD)
219 if !HAVE_DYNAMIC_PLUGINS
220 libvlc_demux_dec_run_la_LIBADD += \
221         ../modules/libadpcm_plugin.la \
222         ../modules/libaes3_plugin.la \
223         ../modules/libaraw_plugin.la \
224         ../modules/libg711_plugin.la \
225         ../modules/liblpcm_plugin.la \
226         ../modules/libuleaddvaudio_plugin.la \
227         ../modules/librawvideo_plugin.la \
228         ../modules/libcc_plugin.la \
229         ../modules/libcvdsub_plugin.la \
230         ../modules/libdvbsub_plugin.la \
231         ../modules/libscte18_plugin.la \
232         ../modules/libscte27_plugin.la \
233         ../modules/libspudec_plugin.la \
234         ../modules/libstl_plugin.la \
235         ../modules/libsubsdec_plugin.la \
236         ../modules/libsubsusf_plugin.la \
237         ../modules/libsvcdsub_plugin.la \
238         ../modules/libtextst_plugin.la \
239         ../modules/libsubstx3g_plugin.la
240 endif
241 EXTRA_LTLIBRARIES += libvlc_demux_dec_run.la
244 # Fuzzers
246 vlc_demux_run_LDFLAGS = -no-install -static
247 vlc_demux_run_LDADD = libvlc_demux_run.la
248 vlc_demux_dec_run_SOURCES = vlc-demux-run.c
249 vlc_demux_dec_run_LDFLAGS = -no-install -static
250 vlc_demux_dec_run_LDADD = libvlc_demux_dec_run.la
251 EXTRA_PROGRAMS += vlc-demux-run vlc-demux-dec-run
253 vlc_demux_libfuzzer_LDADD = libvlc_demux_run.la
254 vlc_demux_dec_libfuzzer_SOURCES = vlc-demux-libfuzzer.c
255 vlc_demux_dec_libfuzzer_LDADD = libvlc_demux_dec_run.la
256 if HAVE_LIBFUZZER
257 noinst_PROGRAMS += vlc-demux-libfuzzer vlc-demux-dec-libfuzzer vlc-demux-run vlc-demux-dec-run
258 endif