core: use "auto" as the default clock-master source
[vlc.git] / test / Makefile.am
blob693acf0edc94d3616fc779b062b2548591d3ea28
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_input_thumbnail \
30         test_src_player \
31         test_src_interface_dialog \
32         test_src_media_source \
33         test_src_misc_bits \
34         test_src_misc_epg \
35         test_src_misc_keystore \
36         test_modules_packetizer_helpers \
37         test_modules_packetizer_hxxx \
38         test_modules_packetizer_h264 \
39         test_modules_packetizer_hevc \
40         test_modules_packetizer_mpegvideo \
41         test_modules_keystore \
42         test_modules_demux_timestamps_filter \
43         test_modules_demux_ts_pes \
44         $(NULL)
46 if ENABLE_SOUT
47 check_PROGRAMS += test_modules_tls
48 endif
49 if UPDATE_CHECK
50 check_PROGRAMS += test_src_crypto_update
51 endif
53 check_SCRIPTS = \
54         modules/lua/telnet.sh \
55         check_POTFILES.sh
57 # Disabled test:
58 # meta: No suitable test file
59 EXTRA_PROGRAMS = \
60         test_libvlc_meta \
61         test_libvlc_media_list_player \
62         test_src_input_stream_net \
63         $(NULL)
65 #check_DATA = samples/test.sample samples/meta.sample
66 EXTRA_DIST = \
67         samples/certs/certkey.pem \
68         samples/empty.voc \
69         samples/image.jpg \
70         samples/subitems \
71         samples/slaves \
72         $(check_SCRIPTS)
74 check_HEADERS = libvlc/test.h libvlc/libvlc_additions.h
76 TESTS = $(check_PROGRAMS) check_POTFILES.sh
78 DISTCLEANFILES = samples/test.sample samples/meta.sample
80 # Samples server
81 SAMPLES_SERVER=http://streams.videolan.org/streams-videolan/reference
83 samples/test.sample:
84         mkdir -p `dirname $@`
85         curl $(SAMPLES_SERVER)/avi/Hero-Div3.avi > $@
87 samples/meta.sample:
88         mkdir -p `dirname $@`
89         curl $(SAMPLES_SERVER)/metadata/id3tag/Wesh-Bonneville.mp3 > $@
91 AM_CFLAGS = -DSRCDIR=\"$(srcdir)\"
92 AM_LDFLAGS = -no-install
93 LIBVLCCORE = -L../src/ -lvlccore
94 LIBVLC = -L../lib -lvlc
96 test_libvlc_core_SOURCES = libvlc/core.c
97 test_libvlc_core_LDADD = $(LIBVLC)
98 test_libvlc_equalizer_SOURCES = libvlc/equalizer.c
99 test_libvlc_equalizer_LDADD = $(LIBVLC)
100 test_libvlc_media_SOURCES = libvlc/media.c
101 test_libvlc_media_LDADD = $(LIBVLCCORE) $(LIBVLC)
102 test_libvlc_media_list_player_SOURCES = libvlc/media_list_player.c
103 test_libvlc_media_list_player_LDADD = $(LIBVLC)
104 test_libvlc_media_list_SOURCES = libvlc/media_list.c
105 test_libvlc_media_list_LDADD = $(LIBVLC)
106 test_libvlc_media_player_SOURCES = libvlc/media_player.c
107 test_libvlc_media_player_LDADD = $(LIBVLCCORE) $(LIBVLC)
108 test_libvlc_media_discoverer_SOURCES = libvlc/media_discoverer.c
109 test_libvlc_media_discoverer_LDADD = $(LIBVLC)
110 test_libvlc_renderer_discoverer_SOURCES = libvlc/renderer_discoverer.c
111 test_libvlc_renderer_discoverer_LDADD = $(LIBVLC)
112 test_libvlc_slaves_SOURCES = libvlc/slaves.c
113 test_libvlc_slaves_LDADD = $(LIBVLCCORE) $(LIBVLC)
114 test_libvlc_meta_SOURCES = libvlc/meta.c
115 test_libvlc_meta_LDADD = $(LIBVLC)
116 test_src_misc_variables_SOURCES = src/misc/variables.c
117 test_src_misc_variables_LDADD = $(LIBVLCCORE) $(LIBVLC)
118 test_src_config_chain_SOURCES = src/config/chain.c
119 test_src_config_chain_LDADD = $(LIBVLCCORE)
120 test_src_crypto_update_SOURCES = src/crypto/update.c
121 test_src_crypto_update_LDADD = $(LIBVLCCORE) $(GCRYPT_LIBS)
122 test_src_input_stream_SOURCES = src/input/stream.c
123 test_src_input_stream_LDADD = $(LIBVLCCORE) $(LIBVLC)
124 test_src_input_stream_net_SOURCES = src/input/stream.c
125 test_src_input_stream_net_CFLAGS = $(AM_CFLAGS) -DTEST_NET
126 test_src_input_stream_net_LDADD = $(LIBVLCCORE) $(LIBVLC)
127 test_src_input_stream_fifo_SOURCES = src/input/stream_fifo.c
128 test_src_input_stream_fifo_LDADD = $(LIBVLCCORE) $(LIBVLC)
129 test_src_input_thumbnail_SOURCES = src/input/thumbnail.c
130 test_src_input_thumbnail_LDADD = $(LIBVLCCORE) $(LIBVLC)
131 test_src_player_SOURCES = src/player/player.c
132 test_src_player_LDADD = $(LIBVLCCORE) $(LIBVLC) $(LIBM)
133 test_src_misc_bits_SOURCES = src/misc/bits.c
134 test_src_misc_bits_LDADD = $(LIBVLC)
135 test_src_misc_epg_SOURCES = src/misc/epg.c
136 test_src_misc_epg_LDADD = $(LIBVLCCORE) $(LIBVLC)
137 test_src_misc_keystore_SOURCES = src/misc/keystore.c
138 test_src_misc_keystore_LDADD = $(LIBVLCCORE) $(LIBVLC)
139 test_src_interface_dialog_SOURCES = src/interface/dialog.c
140 test_src_interface_dialog_LDADD = $(LIBVLCCORE) $(LIBVLC)
141 test_src_media_source_LDADD = $(LIBVLCCORE) $(LIBVLC)
142 test_src_media_source_SOURCES = src/media_source/media_source.c
143 test_modules_packetizer_helpers_SOURCES = modules/packetizer/helpers.c
144 test_modules_packetizer_helpers_LDADD = $(LIBVLCCORE) $(LIBVLC)
145 test_modules_packetizer_hxxx_SOURCES = modules/packetizer/hxxx.c
146 test_modules_packetizer_hxxx_LDADD = $(LIBVLCCORE) $(LIBVLC)
147 test_modules_packetizer_h264_SOURCES = modules/packetizer/h264.c \
148                                 modules/packetizer/packetizer.h
149 test_modules_packetizer_h264_LDADD = $(LIBVLCCORE) $(LIBVLC)
150 test_modules_packetizer_hevc_SOURCES = modules/packetizer/hevc.c \
151                                 modules/packetizer/packetizer.h
152 test_modules_packetizer_hevc_LDADD = $(LIBVLCCORE) $(LIBVLC)
153 test_modules_packetizer_mpegvideo_SOURCES = modules/packetizer/mpegvideo.c \
154                                 modules/packetizer/packetizer.h
155 test_modules_packetizer_mpegvideo_LDADD = $(LIBVLCCORE) $(LIBVLC)
156 test_modules_keystore_SOURCES = modules/keystore/test.c
157 test_modules_keystore_LDADD = $(LIBVLCCORE) $(LIBVLC)
158 test_modules_tls_SOURCES = modules/misc/tls.c
159 test_modules_tls_LDADD = $(LIBVLCCORE) $(LIBVLC)
160 test_modules_demux_timestamps_filter_LDADD = $(LIBVLCCORE) $(LIBVLC)
161 test_modules_demux_timestamps_filter_SOURCES = modules/demux/timestamps_filter.c
162 test_modules_demux_ts_pes_LDADD = $(LIBVLCCORE) $(LIBVLC)
163 test_modules_demux_ts_pes_SOURCES = modules/demux/ts_pes.c \
164                                 ../modules/demux/mpeg/ts_pes.c \
165                                 ../modules/demux/mpeg/ts_pes.h
168 checkall:
169         $(MAKE) check_PROGRAMS="$(check_PROGRAMS) $(EXTRA_PROGRAMS)" check
171 FORCE:
172         @echo "Generated source cannot be phony. Go away." >&2
173         @exit 1
175 .PHONY: FORCE
177 libvlc_demux_run_la_SOURCES = src/input/demux-run.c src/input/demux-run.h \
178         src/input/common.c src/input/common.h
179 libvlc_demux_run_la_CPPFLAGS = $(AM_CPPFLAGS) \
180         -DTOP_BUILDDIR=\"$$(cd "$(top_builddir)"; pwd)\" \
181         -DTOP_SRCDIR=\"$$(cd "$(top_srcdir)"; pwd)\"
182 libvlc_demux_run_la_LDFLAGS = -no-install -static
183 libvlc_demux_run_la_LIBADD = \
184         ../lib/libvlc.la ../src/libvlccore.la ../compat/libcompat.la
185 if !HAVE_DYNAMIC_PLUGINS
186 libvlc_demux_run_la_CPPFLAGS += -DHAVE_STATIC_MODULES
187 libvlc_demux_run_la_LIBADD += \
188         ../modules/libxml_plugin.la \
189         ../modules/libconsole_logger_plugin.la \
190         ../modules/libaiff_plugin.la \
191         ../modules/libasf_plugin.la \
192         ../modules/libau_plugin.la \
193         ../modules/libavi_plugin.la \
194         ../modules/libcaf_plugin.la \
195         ../modules/libes_plugin.la \
196         ../modules/libflacsys_plugin.la \
197         ../modules/libh26x_plugin.la \
198         ../modules/libmjpeg_plugin.la \
199         ../modules/libmp4_plugin.la \
200         ../modules/libnsv_plugin.la \
201         ../modules/libnuv_plugin.la \
202         ../modules/libps_plugin.la \
203         ../modules/libpva_plugin.la \
204         ../modules/libsap_plugin.la \
205         ../modules/libsmf_plugin.la \
206         ../modules/libsubtitle_plugin.la \
207         ../modules/libtta_plugin.la \
208         ../modules/libttml_plugin.la \
209         ../modules/libty_plugin.la \
210         ../modules/libvoc_plugin.la \
211         ../modules/libwav_plugin.la \
212         ../modules/libwebvtt_plugin.la \
213         ../modules/libxa_plugin.la \
214         ../modules/libpacketizer_a52_plugin.la \
215         ../modules/libpacketizer_copy_plugin.la \
216         ../modules/libpacketizer_dts_plugin.la \
217         ../modules/libpacketizer_flac_plugin.la \
218         ../modules/libpacketizer_h264_plugin.la \
219         ../modules/libpacketizer_hevc_plugin.la \
220         ../modules/libpacketizer_mlp_plugin.la \
221         ../modules/libpacketizer_mpeg4audio_plugin.la \
222         ../modules/libpacketizer_mpeg4video_plugin.la \
223         ../modules/libpacketizer_mpegaudio_plugin.la \
224         ../modules/libpacketizer_mpegvideo_plugin.la \
225         ../modules/libpacketizer_vc1_plugin.la \
226         ../modules/librawaud_plugin.la \
227         ../modules/librawvid_plugin.la \
228         ../modules/libfilesystem_plugin.la \
229         ../modules/libxml_plugin.la \
230         ../modules/libogg_plugin.la \
231         -lstdc++
232 if HAVE_DVBPSI
233 libvlc_demux_run_la_CPPFLAGS += -DHAVE_DVBPSI
234 libvlc_demux_run_la_LIBADD += ../modules/libts_plugin.la
235 endif
236 if HAVE_MATROSKA
237 libvlc_demux_run_la_CPPFLAGS += -DHAVE_MATROSKA
238 libvlc_demux_run_la_LIBADD += ../modules/libmkv_plugin.la
239 endif
240 endif
241 EXTRA_LTLIBRARIES = libvlc_demux_run.la
243 libvlc_demux_dec_run_la_SOURCES = $(libvlc_demux_run_la_SOURCES) \
244         src/input/decoder.c src/input/decoder.h
245 libvlc_demux_dec_run_la_CPPFLAGS = $(libvlc_demux_run_la_CPPFLAGS) -DHAVE_DECODERS
246 libvlc_demux_dec_run_la_LDFLAGS = $(libvlc_demux_run_la_LDFLAGS)
247 libvlc_demux_dec_run_la_LIBADD = $(libvlc_demux_run_la_LIBADD)
248 if !HAVE_DYNAMIC_PLUGINS
249 libvlc_demux_dec_run_la_LIBADD += \
250         ../modules/libadpcm_plugin.la \
251         ../modules/libaes3_plugin.la \
252         ../modules/libaraw_plugin.la \
253         ../modules/libg711_plugin.la \
254         ../modules/liblpcm_plugin.la \
255         ../modules/libuleaddvaudio_plugin.la \
256         ../modules/librawvideo_plugin.la \
257         ../modules/libcc_plugin.la \
258         ../modules/libcvdsub_plugin.la \
259         ../modules/libdvbsub_plugin.la \
260         ../modules/libscte18_plugin.la \
261         ../modules/libscte27_plugin.la \
262         ../modules/libspudec_plugin.la \
263         ../modules/libstl_plugin.la \
264         ../modules/libsubsdec_plugin.la \
265         ../modules/libsubsusf_plugin.la \
266         ../modules/libsvcdsub_plugin.la \
267         ../modules/libtextst_plugin.la \
268         ../modules/libsubstx3g_plugin.la
269 endif
270 if HAVE_ZVBI
271 libvlc_demux_dec_run_la_LIBADD += ../modules/libzvbi_plugin.la
272 endif
273 if HAVE_TELX
274 libvlc_demux_dec_run_la_LIBADD += ../modules/libtelx_plugin.la
275 endif
276 EXTRA_LTLIBRARIES += libvlc_demux_dec_run.la
279 # Fuzzers
281 vlc_demux_run_LDFLAGS = -no-install -static
282 vlc_demux_run_LDADD = libvlc_demux_run.la
283 vlc_demux_dec_run_SOURCES = vlc-demux-run.c
284 vlc_demux_dec_run_LDFLAGS = -no-install -static
285 vlc_demux_dec_run_LDADD = libvlc_demux_dec_run.la
286 EXTRA_PROGRAMS += vlc-demux-run vlc-demux-dec-run
288 vlc_demux_libfuzzer_LDADD = libvlc_demux_run.la
289 vlc_demux_dec_libfuzzer_SOURCES = vlc-demux-libfuzzer.c
290 vlc_demux_dec_libfuzzer_LDADD = libvlc_demux_dec_run.la
291 if HAVE_LIBFUZZER
292 noinst_PROGRAMS += vlc-demux-libfuzzer vlc-demux-dec-libfuzzer vlc-demux-run vlc-demux-dec-run
293 endif
295 vlccoreios_SOURCES = iosvlc.m
296 vlccoreios_LDFLAGS = $(LDFLAGS_vlc) -Wl,-framework,Foundation,-framework,UIKit
297 vlccoreios_LDFLAGS += -Xlinker -rpath -Xlinker "@executable_path/Frameworks/"
298 vlccoreios_OBJCFLAGS = -fobjc-arc
299 vlccoreios_LDADD = ../lib/libvlc.la ../src/libvlccore.la
300 if HAVE_IOS
301 noinst_PROGRAMS += vlccoreios
302 endif