codec: dvbsub: remove usage of bs_show
[vlc.git] / src / Makefile.am
blob1802dedf5886dadaa4f3c73344609c66e563908c
1 ###############################################################################
2 # Automake targets and declarations
3 ###############################################################################
5 AUTOMAKE_OPTIONS = subdir-objects
7 NULL =
8 EXTRA_DIST = \
9         vlc-plugin.pc.in \
10         libvlccore.sym \
11         revision.txt
13 BUILT_SOURCES = $(nodist_pluginsinclude_HEADERS)
14 CLEANFILES = $(BUILT_SOURCES)
16 SUFFIXES = .pc.in .pc .rc.in .rc
18 ###############################################################################
19 # Headers
20 ###############################################################################
22 pluginsincludedir = $(pkgincludedir)/plugins
24 pluginsinclude_HEADERS = \
25         ../include/vlc_access.h \
26         ../include/vlc_actions.h \
27         ../include/vlc_addons.h \
28         ../include/vlc_aout.h \
29         ../include/vlc_aout_volume.h \
30         ../include/vlc_arrays.h \
31         ../include/vlc_atomic.h \
32         ../include/vlc_avcodec.h \
33         ../include/vlc_bits.h \
34         ../include/vlc_block.h \
35         ../include/vlc_block_helper.h \
36         ../include/vlc_boxes.h \
37         ../include/vlc_charset.h \
38         ../include/vlc_codec.h \
39         ../include/vlc_common.h \
40         ../include/vlc_config.h \
41         ../include/vlc_config_cat.h \
42         ../include/vlc_configuration.h \
43         ../include/vlc_cpu.h \
44         ../include/vlc_cxx_helpers.hpp \
45         ../include/vlc_dialog.h \
46         ../include/vlc_demux.h \
47         ../include/vlc_epg.h \
48         ../include/vlc_es.h \
49         ../include/vlc_es_out.h \
50         ../include/vlc_events.h \
51         ../include/vlc_filter.h \
52         ../include/vlc_fourcc.h \
53         ../include/vlc_fs.h \
54         ../include/vlc_gcrypt.h \
55         ../include/vlc_opengl.h \
56         ../include/vlc_http.h \
57         ../include/vlc_httpd.h \
58         ../include/vlc_image.h \
59         ../include/vlc_inhibit.h \
60         ../include/vlc_input.h \
61         ../include/vlc_input_item.h \
62         ../include/vlc_interface.h \
63         ../include/vlc_keystore.h \
64         ../include/vlc_list.h \
65         ../include/vlc_md5.h \
66         ../include/vlc_messages.h \
67         ../include/vlc_meta.h \
68         ../include/vlc_meta_fetcher.h \
69         ../include/vlc_media_library.h \
70         ../include/vlc_memstream.h \
71         ../include/vlc_mime.h \
72         ../include/vlc_modules.h \
73         ../include/vlc_mouse.h \
74         ../include/vlc_network.h \
75         ../include/vlc_objects.h \
76         ../include/vlc_picture.h \
77         ../include/vlc_picture_fifo.h \
78         ../include/vlc_picture_pool.h \
79         ../include/vlc_playlist.h \
80         ../include/vlc_plugin.h \
81         ../include/vlc_probe.h \
82         ../include/vlc_rand.h \
83         ../include/vlc_services_discovery.h \
84         ../include/vlc_fingerprinter.h \
85         ../include/vlc_interrupt.h \
86         ../include/vlc_renderer_discovery.h \
87         ../include/vlc_sout.h \
88         ../include/vlc_spu.h \
89         ../include/vlc_stream.h \
90         ../include/vlc_stream_extractor.h \
91         ../include/vlc_strings.h \
92         ../include/vlc_subpicture.h \
93         ../include/vlc_text_style.h \
94         ../include/vlc_threads.h \
95         ../include/vlc_tick.h \
96         ../include/vlc_timestamp_helper.h \
97         ../include/vlc_tls.h \
98         ../include/vlc_url.h \
99         ../include/vlc_variables.h \
100         ../include/vlc_viewpoint.h \
101         ../include/vlc_vlm.h \
102         ../include/vlc_video_splitter.h \
103         ../include/vlc_vout.h \
104         ../include/vlc_vout_display.h \
105         ../include/vlc_vout_osd.h \
106         ../include/vlc_vout_window.h \
107         ../include/vlc_xml.h \
108         ../include/vlc_xlib.h \
109         $(NULL)
110 nodist_pluginsinclude_HEADERS = ../include/vlc_about.h
112 noinst_HEADERS = \
113         ../include/vlc_codecs.h \
114         ../include/vlc_extensions.h \
115         ../include/vlc_fixups.h \
116         ../include/vlc_intf_strings.h \
117         ../include/vlc_iso_lang.h \
118         ../include/vlc_pgpkey.h \
119         ../include/vlc_update.h \
120         ../include/vlc_vod.h \
121         ../include/vlc_vout_wrapper.h \
122         $(NULL)
124 ../include/vlc_about.h: Makefile.am $(top_srcdir)/COPYING $(top_srcdir)/THANKS $(top_srcdir)/AUTHORS
125         $(AM_V_at)rm -f -- "$@.tmp"
126         $(AM_V_at)mkdir -p -- ../include
127         $(AM_V_GEN)(echo "/* Automatically generated file - DO NOT EDIT */" && \
128         echo "static const char psz_license[] =" && \
129         sed 's/"/\\"/g;s/^.*$$/\"&\\n\"/' "$(top_srcdir)/COPYING" && \
130         echo ";" && \
131         echo "static const char psz_thanks[] =" && \
132         sed '/\$$Id:/d;s/"/\\"/g;s/<.*.> //;s/^.*$$/\"&\\n\"/' \
133                 "$(top_srcdir)/THANKS" && \
134         echo ";" && \
135         echo "static const char psz_authors[] =" && \
136         sed '/\$$Id:/d;s/"/\\"/g;s/<.*.> //;s/^.*$$/\"&\\n\"/' \
137                 "$(top_srcdir)/AUTHORS" && \
138         echo ";") >> "$@.tmp"
139         $(AM_V_at)mv -f -- "$@.tmp" "$@"
141 ###############################################################################
142 # pkg-config integration
143 ###############################################################################
145 pkgconfigdir = $(libdir)/pkgconfig
146 pkgconfig_DATA = vlc-plugin.pc
147 CLEANFILES += $(pkgconfig_DATA)
149 .pc.in.pc: $(top_builddir)/config.status
150         $(AM_V_GEN)cd "$(top_builddir)" && \
151         $(SHELL) ./config.status --file="src/$@"
153 ##############################################################################
154 # Windows resource files
155 ##############################################################################
157 if HAVE_WIN32
158 noinst_DATA = libvlc_win32_rc.rc
159 endif
160 EXTRA_DIST += libvlc_win32_rc.rc.in
162 .rc.in.rc: $(top_builddir)/config.status
163         cd "$(top_builddir)" && \
164         $(SHELL) ./config.status --file="src/$@"
166 ###############################################################################
167 # Building libvlc
168 ###############################################################################
170 lib_LTLIBRARIES = libvlccore.la
172 AM_CPPFLAGS = $(INCICONV) $(IDN_CFLAGS) \
173         -DMODULE_STRING=\"core\" \
174         -DSYSDATADIR=\"$(datadir)\" \
175         -DLIBDIR=\"$(libdir)\" \
176         -DLIBEXECDIR=\"$(libexecdir)\" \
177         -DLOCALEDIR=\"$(localedir)\" \
178         -DPKGDATADIR=\"$(pkgdatadir)\" \
179         -DPKGLIBDIR=\"$(pkglibdir)\" \
180         -DPKGLIBEXECDIR=\"$(pkglibexecdir)\"
181 AM_CFLAGS = $(CFLAGS_libvlccore)
182 if HAVE_DYNAMIC_PLUGINS
183 AM_CPPFLAGS += -DHAVE_DYNAMIC_PLUGINS
184 endif
185 if HAVE_DBUS
186 AM_CPPFLAGS += -DHAVE_DBUS
187 AM_CFLAGS += $(DBUS_CFLAGS)
188 endif
190 libvlccore_la_SOURCES = \
191         libvlc.c \
192         libvlc.h \
193         libvlc-module.c \
194         missing.c \
195         revision.c \
196         version.c \
197         config/configuration.h \
198         config/core.c \
199         config/chain.c \
200         config/file.c \
201         config/help.c \
202         config/intf.c \
203         config/cmdline.c \
204         config/getopt.c \
205         config/vlc_getopt.h \
206         extras/libc.c \
207         modules/modules.h \
208         modules/modules.c \
209         modules/bank.c \
210         modules/cache.c \
211         modules/entry.c \
212         modules/textdomain.c \
213         interface/dialog.c \
214         interface/interface.c \
215         playlist/playlist_internal.h \
216         playlist/aout.c \
217         playlist/thread.c \
218         playlist/control.c \
219         playlist/engine.c \
220         playlist/sort.c \
221         playlist/loadsave.c \
222         playlist/tree.c \
223         playlist/item.c \
224         playlist/search.c \
225         playlist/services_discovery.c \
226         playlist/renderer.c \
227         preparser/art.c \
228         preparser/art.h \
229         preparser/fetcher.c \
230         preparser/fetcher.h \
231         preparser/preparser.c \
232         preparser/preparser.h \
233         input/item.c \
234         input/access.c \
235         clock/clock_internal.c \
236         clock/input_clock.c \
237         input/control.c \
238         input/decoder.c \
239         input/demux.c \
240         input/demux_chained.c \
241         input/es_out.c \
242         input/es_out_timeshift.c \
243         input/event.c \
244         input/input.c \
245         input/info.h \
246         input/meta.c \
247         clock/input_clock.h \
248         clock/clock_internal.h \
249         input/decoder.h \
250         input/demux.h \
251         input/es_out.h \
252         input/es_out_timeshift.h \
253         input/event.h \
254         input/item.h \
255         input/mrl_helpers.h \
256         input/stream.h \
257         input/input_internal.h \
258         input/input_interface.h \
259         input/vlm_internal.h \
260         input/vlm_event.h \
261         input/resource.h \
262         input/resource.c \
263         input/services_discovery.c \
264         input/stats.c \
265         input/stream.c \
266         input/stream_fifo.c \
267         input/stream_extractor.c \
268         input/stream_filter.c \
269         input/stream_memory.c \
270         input/subtitles.c \
271         input/var.c \
272         audio_output/aout_internal.h \
273         audio_output/common.c \
274         audio_output/dec.c \
275         audio_output/filters.c \
276         audio_output/output.c \
277         audio_output/volume.c \
278         video_output/chrono.h \
279         video_output/control.c \
280         video_output/control.h \
281         video_output/display.c \
282         video_output/display.h \
283         video_output/inhibit.c \
284         video_output/inhibit.h \
285         video_output/interlacing.c \
286         video_output/interlacing.h \
287         video_output/snapshot.c \
288         video_output/snapshot.h \
289         video_output/statistic.h \
290         video_output/video_output.c \
291         video_output/video_text.c \
292         video_output/video_epg.c \
293         video_output/video_widgets.c \
294         video_output/vout_subpictures.c \
295         video_output/vout_spuregion_helper.h \
296         video_output/window.c \
297         video_output/window.h \
298         video_output/opengl.c \
299         video_output/vout_intf.c \
300         video_output/vout_internal.h \
301         video_output/vout_wrapper.c \
302         network/getaddrinfo.c \
303         network/http_auth.c \
304         network/httpd.c \
305         network/io.c \
306         network/tcp.c \
307         network/udp.c \
308         network/rootbind.c \
309         network/stream.c \
310         network/tls.c \
311         text/charset.c \
312         text/memstream.c \
313         text/strings.c \
314         text/unicode.c \
315         text/url.c \
316         text/filesystem.c \
317         text/iso_lang.c \
318         text/iso-639_def.h \
319         misc/actions.c \
320         misc/background_worker.c \
321         misc/background_worker.h \
322         misc/md5.c \
323         misc/probe.c \
324         misc/rand.c \
325         misc/mtime.c \
326         misc/block.c \
327         misc/fifo.c \
328         misc/fourcc.c \
329         misc/fourcc_list.h \
330         misc/es_format.c \
331         misc/picture.c \
332         misc/picture.h \
333         misc/picture_fifo.c \
334         misc/picture_pool.c \
335         misc/interrupt.h \
336         misc/interrupt.c \
337         misc/keystore.c \
338         misc/renderer_discovery.c \
339         misc/threads.c \
340         misc/cpu.c \
341         misc/epg.c \
342         misc/exit.c \
343         misc/events.c \
344         misc/image.c \
345         misc/messages.c \
346         misc/mime.c \
347         misc/objects.c \
348         misc/objres.c \
349         misc/variables.h \
350         misc/variables.c \
351         misc/error.c \
352         misc/xml.c \
353         misc/addons.c \
354         misc/filter.c \
355         misc/filter_chain.c \
356         misc/httpcookies.c \
357         misc/fingerprinter.c \
358         misc/text_style.c \
359         misc/subpicture.c \
360         misc/subpicture.h \
361         misc/medialibrary.c
362 libvlccore_la_LIBADD = $(LIBS_libvlccore) \
363         ../compat/libcompat.la \
364         $(LTLIBINTL) $(LTLIBICONV) \
365         $(IDN_LIBS) $(SOCKET_LIBS) $(LIBRT) $(LIBDL) $(LIBM)
367 if HAVE_WIN32
368 libvlccore_la_SOURCES += \
369         win32/dirs.c \
370         win32/error.c \
371         win32/filesystem.c \
372         win32/netconf.c \
373         win32/plugin.c \
374         win32/rand.c \
375         win32/specific.c \
376         win32/thread.c \
377         win32/winsock.c
378 if HAVE_WINSTORE
379 libvlccore_la_SOURCES += posix/timer.c
380 else
381 libvlccore_la_SOURCES += win32/timer.c
382 endif
383 else
384 if HAVE_OS2
385 libvlccore_la_SOURCES += \
386         os2/dirs.c \
387         darwin/error.c \
388         os2/filesystem.c \
389         os2/getaddrinfo.c \
390         os2/netconf.c \
391         os2/plugin.c \
392         os2/specific.c \
393         os2/rand.c \
394         os2/thread.c
395 else
396 if HAVE_NACL
397 libvlccore_la_SOURCES += \
398         android/error.c \
399         posix/dirs.c \
400         posix/filesystem.c \
401         posix/netconf.c \
402         posix/rand.c \
403         posix/specific.c \
404         posix/timer.c
405 else
406 libvlccore_la_SOURCES += \
407         posix/filesystem.c \
408         posix/plugin.c \
409         posix/rand.c \
410         posix/timer.c
411 if HAVE_ANDROID
412 libvlccore_la_SOURCES += \
413         android/error.c \
414         android/specific.c \
415         android/thread.c \
416         linux/cpu.c \
417         linux/dirs.c \
418         linux/thread.c
419 else
420 if HAVE_DARWIN
421 libvlccore_la_SOURCES += \
422         darwin/dirs.c \
423         darwin/error.c \
424         darwin/netconf.c \
425         darwin/specific.c \
426         darwin/thread.c
427 else
428 libvlccore_la_SOURCES += \
429         posix/dirs.c \
430         posix/error.c \
431         posix/netconf.c \
432         posix/specific.c \
433         posix/thread.c
434 if HAVE_LINUX
435 libvlccore_la_SOURCES += \
436         linux/cpu.c \
437         linux/dirs.c \
438         linux/filesystem.c \
439         linux/thread.c
440 endif
441 if HAVE_LIBANL
442 libvlccore_la_SOURCES += \
443         linux/getaddrinfo.c
444 libvlccore_la_LIBADD += -lanl
445 else
446 libvlccore_la_SOURCES += \
447         posix/getaddrinfo.c
448 endif
449 endif
450 endif
451 endif
452 endif
453 endif
455 if ENABLE_SOUT
456 libvlccore_la_SOURCES += \
457         stream_output/sap.c stream_output/sdp.c \
458         stream_output/stream_output.c stream_output/stream_output.h
459 if ENABLE_VLM
460 libvlccore_la_SOURCES += input/vlm.c input/vlm_event.c input/vlmshell.c
461 endif
462 endif
464 if UPDATE_CHECK
465 libvlccore_la_SOURCES += \
466         misc/update.h misc/update.c \
467         misc/update_crypto.c
468 AM_CPPFLAGS += -DUPDATE_CHECK
469 AM_CFLAGS += $(GCRYPT_CFLAGS)
470 libvlccore_la_LIBADD += $(GCRYPT_LIBS)
471 endif
473 libvlccore_la_LDFLAGS = \
474         $(LDFLAGS_libvlccore) \
475         -no-undefined \
476         -export-symbols $(srcdir)/libvlccore.sym \
477         -version-info 9:0:0
478 libvlccore_la_DEPENDENCIES = libvlccore.sym
479 if HAVE_WIN32
480 libvlccore_la_DEPENDENCIES += libvlc_win32_rc.$(OBJEXT)
481 libvlccore_la_LDFLAGS += -Wl,libvlc_win32_rc.$(OBJEXT) -avoid-version -Wc,-static $(LIBCOM)
482 endif
483 if HAVE_OS2
484 libvlccore_la_LDFLAGS += -avoid-version
485 endif
486 if HAVE_DBUS
487 libvlccore_la_LIBADD += $(DBUS_LIBS)
488 endif
489 if HAVE_DARWIN
490 libvlccore_la_LDFLAGS += -Xlinker -install_name -Xlinker @rpath/libvlccore.dylib
491 endif
493 libvlc_win32_rc.$(OBJEXT): libvlc_win32_rc.rc $(top_srcdir)/extras/package/win32/libvlc.dll.manifest
494         $(WINDRES) --include-dir $(top_srcdir)/share --include-dir $(top_srcdir)/extras/package/win32 -i $< -o $@
496 # FourCC tables
497 BUILT_SOURCES += fourcc_tables.h
498 EXTRA_DIST += misc/fourcc_gen.c
499 MOSTLYCLEANFILES = fourcc_gen$(BUILDEXEEXT)
501 fourcc_gen$(BUILDEXEEXT): misc/fourcc_gen.c misc/fourcc_list.h ../include/vlc_fourcc.h
502         $(AM_V_at)rm -f -- $@
503         $(AM_V_CC)$(BUILDCC) -I$(srcdir) -o $@ $<
505 fourcc_tables.h: fourcc_gen$(BUILDEXEEXT)
506         $(AM_V_at)rm -f -- $@.tmp
507         $(AM_V_GEN)$(builddir)/fourcc_gen$(BUILDEXEEXT) > $@.tmp
508         $(AM_V_at)mv -f -- $@.tmp $@
510 # Unit/regression tests
512 check_PROGRAMS = \
513         test_block \
514         test_dictionary \
515         test_i18n_atof \
516         test_interrupt \
517         test_list \
518         test_md5 \
519         test_picture_pool \
520         test_sort \
521         test_timer \
522         test_url \
523         test_utf8 \
524         test_xmlent \
525         test_headers \
526         test_mrl_helpers \
527         test_arrays
529 TESTS = $(check_PROGRAMS) check_symbols
531 test_block_SOURCES = test/block_test.c
532 test_block_LDADD = $(LDADD) $(LIBS_libvlccore)
533 test_block_DEPENDENCIES =
535 test_dictionary_SOURCES = test/dictionary.c
536 test_i18n_atof_SOURCES = test/i18n_atof.c
537 test_interrupt_SOURCES = test/interrupt.c
538 test_interrupt_LDADD = $(LDADD) $(LIBS_libvlccore)
539 test_list_SOURCES = test/list.c
540 test_md5_SOURCES = test/md5.c
541 test_picture_pool_SOURCES = test/picture_pool.c
542 test_sort_SOURCES = test/sort.c
543 test_timer_SOURCES = test/timer.c
544 test_url_SOURCES = test/url.c
545 test_utf8_SOURCES = test/utf8.c
546 test_xmlent_SOURCES = test/xmlent.c
547 test_headers_SOURCES = test/headers.c
548 test_mrl_helpers_SOURCES = test/mrl_helpers.c
549 test_arrays_SOURCES = test/arrays.c
551 AM_LDFLAGS = -no-install
552 LDADD = libvlccore.la \
553         ../compat/libcompat.la
555 ###############################################################################
556 # GIT revision
557 ###############################################################################
559 BUILT_SOURCES += stamp-revision
560 MAINTAINERCLEANFILES = $(srcdir)/revision.txt $(srcdir)/revision.c
562 $(srcdir)/revision.c: $(srcdir)/revision.txt
563         $(AM_V_at)rm -f -- $@
564         $(AM_V_GEN)echo "const char psz_vlc_changeset[] = \"$$(cat $<)\";" \
565                 > $@
567 $(srcdir)/revision.txt:
568         $(AM_V_at)$(MAKE) stamp-revision
569         $(AM_V_GEN)touch $@
571 stamp-revision:
572         $(AM_V_at)rm -f -- revision.tmp
573         $(AM_V_GEN)if ! git \
574                         --git-dir="$(top_srcdir)/.git/" describe \
575                         --tags --long --match '?.*.*' --always; then \
576                 cat $(srcdir)/revision.txt ; \
577         fi > revision.tmp
578         $(AM_V_at)if diff revision.tmp $(srcdir)/revision.txt >/dev/null 2>&1; then \
579                 rm -f -- revision.tmp; \
580         else \
581                 mv -f -- revision.tmp $(srcdir)/revision.txt; \
582         fi
583 #2>&1
585 ###############################################################################
586 # Unit/regression test
587 ###############################################################################
589 dist_check_SCRIPTS = check_headers check_symbols
591 check-local:
592         for h in `echo $(pkginclude_HEADERS) | sed -e s,\.\./include/,,g`; \
593         do \
594                 echo grep - "#include <$$h>" $(srcdir)/test/headers.c ; \
595                 if ! grep -- "#include <$$h>" $(srcdir)/test/headers.c ; \
596                 then \
597                         echo "Header $$h not included in test/headers.c!"; \
598                         exit 1; \
599                 fi ; \
600         done
601         $(SHELL) $(srcdir)/check_headers $(pluginsinclude_HEADERS)
603 FORCE:
604         @echo "Generated source cannot be phony. Go away." >&2
605         @exit 1
607 .PHONY: FORCE