demux: libmp4: split CoreAudio definitions
[vlc.git] / src / Makefile.am
blobaec931cdd42624c52cb6a94aa94ddf4a2d2978b9
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_media_source.h \
67         ../include/vlc_messages.h \
68         ../include/vlc_meta.h \
69         ../include/vlc_meta_fetcher.h \
70         ../include/vlc_media_library.h \
71         ../include/vlc_memstream.h \
72         ../include/vlc_mime.h \
73         ../include/vlc_modules.h \
74         ../include/vlc_mouse.h \
75         ../include/vlc_network.h \
76         ../include/vlc_objects.h \
77         ../include/vlc_picture.h \
78         ../include/vlc_picture_fifo.h \
79         ../include/vlc_picture_pool.h \
80         ../include/vlc_playlist_legacy.h \
81         ../include/vlc_player.h \
82         ../include/vlc_playlist.h \
83         ../include/vlc_plugin.h \
84         ../include/vlc_probe.h \
85         ../include/vlc_rand.h \
86         ../include/vlc_services_discovery.h \
87         ../include/vlc_fingerprinter.h \
88         ../include/vlc_interrupt.h \
89         ../include/vlc_renderer_discovery.h \
90         ../include/vlc_sout.h \
91         ../include/vlc_spu.h \
92         ../include/vlc_stream.h \
93         ../include/vlc_stream_extractor.h \
94         ../include/vlc_strings.h \
95         ../include/vlc_subpicture.h \
96         ../include/vlc_text_style.h \
97         ../include/vlc_threads.h \
98         ../include/vlc_tick.h \
99         ../include/vlc_timestamp_helper.h \
100         ../include/vlc_thumbnailer.h \
101         ../include/vlc_tls.h \
102         ../include/vlc_url.h \
103         ../include/vlc_variables.h \
104         ../include/vlc_vector.h \
105         ../include/vlc_viewpoint.h \
106         ../include/vlc_vlm.h \
107         ../include/vlc_video_splitter.h \
108         ../include/vlc_vout.h \
109         ../include/vlc_vout_display.h \
110         ../include/vlc_vout_osd.h \
111         ../include/vlc_vout_window.h \
112         ../include/vlc_xml.h \
113         ../include/vlc_xlib.h \
114         $(NULL)
115 nodist_pluginsinclude_HEADERS = ../include/vlc_about.h
117 noinst_HEADERS = \
118         ../include/vlc_codecs.h \
119         ../include/vlc_extensions.h \
120         ../include/vlc_fixups.h \
121         ../include/vlc_intf_strings.h \
122         ../include/vlc_iso_lang.h \
123         ../include/vlc_pgpkey.h \
124         ../include/vlc_update.h \
125         ../include/vlc_vod.h \
126         $(NULL)
128 ../include/vlc_about.h: Makefile.am $(top_srcdir)/COPYING $(top_srcdir)/THANKS $(top_srcdir)/AUTHORS
129         $(AM_V_at)rm -f -- "$@.tmp"
130         $(AM_V_at)mkdir -p -- ../include
131         $(AM_V_GEN)(echo "/* Automatically generated file - DO NOT EDIT */" && \
132         echo "static const char psz_license[] =" && \
133         sed 's/"/\\"/g;s/^.*$$/\"&\\n\"/' "$(top_srcdir)/COPYING" && \
134         echo ";" && \
135         echo "static const char psz_thanks[] =" && \
136         sed '/\$$Id:/d;s/"/\\"/g;s/<.*.> //;s/^.*$$/\"&\\n\"/' \
137                 "$(top_srcdir)/THANKS" && \
138         echo ";" && \
139         echo "static const char psz_authors[] =" && \
140         sed '/\$$Id:/d;s/"/\\"/g;s/<.*.> //;s/^.*$$/\"&\\n\"/' \
141                 "$(top_srcdir)/AUTHORS" && \
142         echo ";") >> "$@.tmp"
143         $(AM_V_at)mv -f -- "$@.tmp" "$@"
145 ###############################################################################
146 # pkg-config integration
147 ###############################################################################
149 pkgconfigdir = $(libdir)/pkgconfig
150 pkgconfig_DATA = vlc-plugin.pc
151 CLEANFILES += $(pkgconfig_DATA)
153 .pc.in.pc: $(top_builddir)/config.status
154         $(AM_V_GEN)cd "$(top_builddir)" && \
155         $(SHELL) ./config.status --file="src/$@"
157 ##############################################################################
158 # Windows resource files
159 ##############################################################################
161 if HAVE_WIN32
162 noinst_DATA = libvlc_win32_rc.rc
163 endif
164 EXTRA_DIST += libvlc_win32_rc.rc.in
166 .rc.in.rc: $(top_builddir)/config.status
167         cd "$(top_builddir)" && \
168         $(SHELL) ./config.status --file="src/$@"
170 ###############################################################################
171 # Building libvlc
172 ###############################################################################
174 lib_LTLIBRARIES = libvlccore.la
176 AM_CPPFLAGS = $(INCICONV) $(IDN_CFLAGS) \
177         -DMODULE_STRING=\"core\" \
178         -DSYSDATADIR=\"$(datadir)\" \
179         -DLIBDIR=\"$(libdir)\" \
180         -DLIBEXECDIR=\"$(libexecdir)\" \
181         -DLOCALEDIR=\"$(localedir)\" \
182         -DPKGDATADIR=\"$(pkgdatadir)\" \
183         -DPKGLIBDIR=\"$(pkglibdir)\" \
184         -DPKGLIBEXECDIR=\"$(pkglibexecdir)\"
185 AM_CFLAGS = $(CFLAGS_libvlccore)
186 if HAVE_DYNAMIC_PLUGINS
187 AM_CPPFLAGS += -DHAVE_DYNAMIC_PLUGINS
188 endif
189 if HAVE_DBUS
190 AM_CPPFLAGS += -DHAVE_DBUS
191 AM_CFLAGS += $(DBUS_CFLAGS)
192 endif
194 libvlccore_la_SOURCES = \
195         libvlc.c \
196         libvlc.h \
197         libvlc-module.c \
198         missing.c \
199         revision.c \
200         version.c \
201         config/configuration.h \
202         config/core.c \
203         config/chain.c \
204         config/file.c \
205         config/help.c \
206         config/intf.c \
207         config/cmdline.c \
208         config/getopt.c \
209         config/vlc_getopt.h \
210         extras/libc.c \
211         media_source/media_source.c \
212         media_source/media_source.h \
213         media_source/media_tree.c \
214         media_source/media_tree.h \
215         modules/modules.h \
216         modules/modules.c \
217         modules/bank.c \
218         modules/cache.c \
219         modules/entry.c \
220         modules/textdomain.c \
221         interface/dialog.c \
222         interface/interface.c \
223         playlist_legacy/playlist_internal.h \
224         playlist_legacy/aout.c \
225         playlist_legacy/thread.c \
226         playlist_legacy/control.c \
227         playlist_legacy/engine.c \
228         playlist_legacy/sort.c \
229         playlist_legacy/loadsave.c \
230         playlist_legacy/tree.c \
231         playlist_legacy/item.c \
232         playlist_legacy/search.c \
233         playlist_legacy/services_discovery.c \
234         playlist_legacy/renderer.c \
235         playlist/content.c \
236         playlist/content.h \
237         playlist/control.c \
238         playlist/control.h \
239         playlist/item.c \
240         playlist/item.h \
241         playlist/notify.c \
242         playlist/notify.h \
243         playlist/player.c \
244         playlist/player.h \
245         playlist/playlist.c \
246         playlist/playlist.h \
247         playlist/preparse.c \
248         playlist/preparse.h \
249         playlist/randomizer.c \
250         playlist/randomizer.h \
251         playlist/request.c \
252         playlist/shuffle.c \
253         playlist/sort.c \
254         preparser/art.c \
255         preparser/art.h \
256         preparser/fetcher.c \
257         preparser/fetcher.h \
258         preparser/preparser.c \
259         preparser/preparser.h \
260         input/item.c \
261         input/access.c \
262         clock/clock_internal.c \
263         clock/input_clock.c \
264         input/control.c \
265         input/decoder.c \
266         input/demux.c \
267         input/demux_chained.c \
268         input/es_out.c \
269         input/es_out_timeshift.c \
270         input/input.c \
271         input/player.c \
272         input/player.h \
273         input/info.h \
274         input/meta.c \
275         clock/input_clock.h \
276         clock/clock_internal.h \
277         input/decoder.h \
278         input/demux.h \
279         input/es_out.h \
280         input/es_out_timeshift.h \
281         input/event.h \
282         input/item.h \
283         input/mrl_helpers.h \
284         input/stream.h \
285         input/input_internal.h \
286         input/input_interface.h \
287         input/vlm_internal.h \
288         input/vlm_event.h \
289         input/resource.h \
290         input/resource.c \
291         input/services_discovery.c \
292         input/stats.c \
293         input/stream.c \
294         input/stream_fifo.c \
295         input/stream_extractor.c \
296         input/stream_filter.c \
297         input/stream_memory.c \
298         input/subtitles.c \
299         input/thumbnailer.c \
300         input/var.c \
301         audio_output/aout_internal.h \
302         audio_output/common.c \
303         audio_output/dec.c \
304         audio_output/filters.c \
305         audio_output/output.c \
306         audio_output/volume.c \
307         video_output/chrono.h \
308         video_output/control.c \
309         video_output/control.h \
310         video_output/display.c \
311         video_output/display.h \
312         video_output/inhibit.c \
313         video_output/inhibit.h \
314         video_output/interlacing.c \
315         video_output/interlacing.h \
316         video_output/snapshot.c \
317         video_output/snapshot.h \
318         video_output/statistic.h \
319         video_output/video_output.c \
320         video_output/video_text.c \
321         video_output/video_epg.c \
322         video_output/video_widgets.c \
323         video_output/vout_subpictures.c \
324         video_output/vout_spuregion_helper.h \
325         video_output/vout_wrapper.h \
326         video_output/window.c \
327         video_output/window.h \
328         video_output/opengl.c \
329         video_output/vout_intf.c \
330         video_output/vout_internal.h \
331         video_output/vout_wrapper.c \
332         network/getaddrinfo.c \
333         network/http_auth.c \
334         network/httpd.c \
335         network/io.c \
336         network/tcp.c \
337         network/udp.c \
338         network/rootbind.c \
339         network/stream.c \
340         network/tls.c \
341         text/charset.c \
342         text/memstream.c \
343         text/strings.c \
344         text/unicode.c \
345         text/url.c \
346         text/filesystem.c \
347         text/iso_lang.c \
348         text/iso-639_def.h \
349         misc/actions.c \
350         misc/background_worker.c \
351         misc/background_worker.h \
352         misc/md5.c \
353         misc/probe.c \
354         misc/rand.c \
355         misc/mtime.c \
356         misc/block.c \
357         misc/fifo.c \
358         misc/fourcc.c \
359         misc/fourcc_list.h \
360         misc/es_format.c \
361         misc/picture.c \
362         misc/picture.h \
363         misc/picture_fifo.c \
364         misc/picture_pool.c \
365         misc/interrupt.h \
366         misc/interrupt.c \
367         misc/keystore.c \
368         misc/renderer_discovery.c \
369         misc/threads.c \
370         misc/cpu.c \
371         misc/epg.c \
372         misc/exit.c \
373         misc/events.c \
374         misc/image.c \
375         misc/messages.c \
376         misc/mime.c \
377         misc/objects.c \
378         misc/objres.c \
379         misc/variables.h \
380         misc/variables.c \
381         misc/error.c \
382         misc/xml.c \
383         misc/addons.c \
384         misc/filter.c \
385         misc/filter_chain.c \
386         misc/httpcookies.c \
387         misc/fingerprinter.c \
388         misc/text_style.c \
389         misc/subpicture.c \
390         misc/subpicture.h \
391         misc/medialibrary.c
392 libvlccore_la_LIBADD = $(LIBS_libvlccore) \
393         ../compat/libcompat.la \
394         $(LTLIBINTL) $(LTLIBICONV) \
395         $(IDN_LIBS) $(SOCKET_LIBS) $(LIBRT) $(LIBDL) $(LIBM)
397 if HAVE_WIN32
398 libvlccore_la_SOURCES += \
399         win32/dirs.c \
400         win32/error.c \
401         win32/filesystem.c \
402         win32/netconf.c \
403         win32/plugin.c \
404         win32/rand.c \
405         win32/specific.c \
406         win32/thread.c \
407         win32/winsock.c
408 if HAVE_WINSTORE
409 libvlccore_la_SOURCES += posix/timer.c
410 else
411 libvlccore_la_SOURCES += win32/timer.c
412 endif
413 else
414 if HAVE_OS2
415 libvlccore_la_SOURCES += \
416         os2/dirs.c \
417         darwin/error.c \
418         os2/filesystem.c \
419         os2/getaddrinfo.c \
420         os2/netconf.c \
421         os2/plugin.c \
422         os2/specific.c \
423         os2/rand.c \
424         os2/thread.c
425 else
426 if HAVE_NACL
427 libvlccore_la_SOURCES += \
428         android/error.c \
429         posix/dirs.c \
430         posix/filesystem.c \
431         posix/netconf.c \
432         posix/rand.c \
433         posix/specific.c \
434         posix/timer.c
435 else
436 libvlccore_la_SOURCES += \
437         posix/filesystem.c \
438         posix/plugin.c \
439         posix/rand.c \
440         posix/timer.c
441 if HAVE_ANDROID
442 libvlccore_la_SOURCES += \
443         android/error.c \
444         android/specific.c \
445         android/thread.c \
446         linux/cpu.c \
447         linux/dirs.c \
448         linux/thread.c
449 else
450 if HAVE_DARWIN
451 libvlccore_la_SOURCES += \
452         darwin/dirs.c \
453         darwin/error.c \
454         darwin/specific.c \
455         darwin/thread.c
457 libvlccore_objc_la_SOURCES = \
458         darwin/netconf.m
459 noinst_LTLIBRARIES = libvlccore_objc.la
460 else
461 libvlccore_la_SOURCES += \
462         posix/dirs.c \
463         posix/error.c \
464         posix/netconf.c \
465         posix/picture.c \
466         posix/specific.c \
467         posix/thread.c
468 if HAVE_LINUX
469 libvlccore_la_SOURCES += \
470         linux/cpu.c \
471         linux/dirs.c \
472         linux/filesystem.c \
473         linux/thread.c
474 endif
475 if HAVE_LIBANL
476 libvlccore_la_SOURCES += \
477         linux/getaddrinfo.c
478 libvlccore_la_LIBADD += -lanl
479 else
480 libvlccore_la_SOURCES += \
481         posix/getaddrinfo.c
482 endif
483 endif
484 endif
485 endif
486 endif
487 endif
489 if ENABLE_SOUT
490 libvlccore_la_SOURCES += \
491         stream_output/sap.c stream_output/sdp.c \
492         stream_output/stream_output.c stream_output/stream_output.h
493 if ENABLE_VLM
494 libvlccore_la_SOURCES += input/vlm.c input/vlm_event.c input/vlmshell.c
495 endif
496 endif
498 if UPDATE_CHECK
499 libvlccore_la_SOURCES += \
500         misc/update.h misc/update.c \
501         misc/update_crypto.c
502 AM_CPPFLAGS += -DUPDATE_CHECK
503 AM_CFLAGS += $(GCRYPT_CFLAGS)
504 libvlccore_la_LIBADD += $(GCRYPT_LIBS)
505 endif
507 libvlccore_la_LDFLAGS = \
508         $(LDFLAGS_libvlccore) \
509         -no-undefined \
510         -export-symbols $(srcdir)/libvlccore.sym \
511         -version-info 9:0:0
512 libvlccore_la_DEPENDENCIES = libvlccore.sym
513 if HAVE_WIN32
514 libvlccore_la_DEPENDENCIES += libvlc_win32_rc.$(OBJEXT)
515 libvlccore_la_LDFLAGS += -Wl,libvlc_win32_rc.$(OBJEXT) -avoid-version -Wc,-static $(LIBCOM)
516 endif
517 if HAVE_OS2
518 libvlccore_la_LDFLAGS += -avoid-version
519 endif
520 if HAVE_DBUS
521 libvlccore_la_LIBADD += $(DBUS_LIBS)
522 endif
523 if HAVE_DARWIN
524 $(libvlccore_la_OBJECTS): libvlccore_objc.la
525 libvlccore_objc_la_OBJCFLAGS = $(AM_OBJCFLAGS) -fobjc-arc
526 libvlccore_objc_la_LDFLAGS = -static
527 libvlccore_la_LIBADD += libvlccore_objc.la
528 libvlccore_la_LDFLAGS +=  -Wl,-framework,Foundation -Xlinker -install_name -Xlinker @rpath/libvlccore.dylib
529 endif
531 libvlc_win32_rc.$(OBJEXT): libvlc_win32_rc.rc $(top_srcdir)/extras/package/win32/libvlc.dll.manifest
532         $(WINDRES) --include-dir $(top_srcdir)/share --include-dir $(top_srcdir)/extras/package/win32 -i $< -o $@
534 # FourCC tables
535 BUILT_SOURCES += fourcc_tables.h
536 EXTRA_DIST += misc/fourcc_gen.c
537 MOSTLYCLEANFILES = fourcc_gen$(BUILDEXEEXT)
539 fourcc_gen$(BUILDEXEEXT): misc/fourcc_gen.c misc/fourcc_list.h ../include/vlc_fourcc.h
540         $(AM_V_at)rm -f -- $@
541         $(AM_V_CC)$(BUILDCC) -I$(srcdir) -o $@ $<
543 fourcc_tables.h: fourcc_gen$(BUILDEXEEXT)
544         $(AM_V_at)rm -f -- $@.tmp
545         $(AM_V_GEN)$(builddir)/fourcc_gen$(BUILDEXEEXT) > $@.tmp
546         $(AM_V_at)mv -f -- $@.tmp $@
548 # Unit/regression tests
550 check_PROGRAMS = \
551         test_block \
552         test_dictionary \
553         test_i18n_atof \
554         test_interrupt \
555         test_list \
556         test_md5 \
557         test_picture_pool \
558         test_sort \
559         test_timer \
560         test_url \
561         test_utf8 \
562         test_xmlent \
563         test_headers \
564         test_mrl_helpers \
565         test_arrays \
566         test_vector \
567         test_shared_data_ptr \
568         test_playlist \
569         test_randomizer \
570         test_media_source
572 TESTS = $(check_PROGRAMS) check_symbols
574 test_block_SOURCES = test/block_test.c
575 test_block_LDADD = $(LDADD) $(LIBS_libvlccore)
576 test_block_DEPENDENCIES =
578 test_dictionary_SOURCES = test/dictionary.c
579 test_i18n_atof_SOURCES = test/i18n_atof.c
580 test_interrupt_SOURCES = test/interrupt.c
581 test_interrupt_LDADD = $(LDADD) $(LIBS_libvlccore)
582 test_list_SOURCES = test/list.c
583 test_md5_SOURCES = test/md5.c
584 test_picture_pool_SOURCES = test/picture_pool.c
585 test_sort_SOURCES = test/sort.c
586 test_timer_SOURCES = test/timer.c
587 test_url_SOURCES = test/url.c
588 test_utf8_SOURCES = test/utf8.c
589 test_xmlent_SOURCES = test/xmlent.c
590 test_headers_SOURCES = test/headers.c
591 test_mrl_helpers_SOURCES = test/mrl_helpers.c
592 test_arrays_SOURCES = test/arrays.c
593 test_vector_SOURCES = test/vector.c
594 test_shared_data_ptr_SOURCES = test/shared_data_ptr.cpp
595 test_playlist_SOURCES = playlist/test.c \
596         playlist/content.c \
597         playlist/control.c \
598         playlist/item.c \
599         playlist/notify.c \
600         playlist/player.c \
601         playlist/playlist.c \
602         playlist/preparse.c \
603         playlist/randomizer.c \
604         playlist/request.c \
605         playlist/shuffle.c \
606         playlist/sort.c
607 test_playlist_CFLAGS = -DTEST_PLAYLIST
608 test_randomizer_SOURCES = playlist/randomizer.c
609 test_randomizer_CFLAGS = -DTEST_RANDOMIZER
610 test_media_source_LDADD = $(LDADD) $(LIBS_libvlccore)
611 test_media_source_CFLAGS = -DTEST_MEDIA_SOURCE
612 test_media_source_SOURCES = media_source/test.c \
613         media_source/media_source.c \
614         media_source/media_tree.c
616 AM_LDFLAGS = -no-install
617 LDADD = libvlccore.la \
618         ../compat/libcompat.la
620 ###############################################################################
621 # GIT revision
622 ###############################################################################
624 BUILT_SOURCES += stamp-revision
625 MAINTAINERCLEANFILES = $(srcdir)/revision.txt $(srcdir)/revision.c
627 $(srcdir)/revision.c: $(srcdir)/revision.txt
628         $(AM_V_at)rm -f -- $@
629         $(AM_V_GEN)echo "const char psz_vlc_changeset[] = \"$$(cat $<)\";" \
630                 > $@
632 $(srcdir)/revision.txt:
633         $(AM_V_at)$(MAKE) stamp-revision
634         $(AM_V_GEN)touch $@
636 stamp-revision:
637         $(AM_V_at)rm -f -- revision.tmp
638         $(AM_V_GEN)if ! git \
639                         --git-dir="$(top_srcdir)/.git" describe \
640                         --tags --long --match '?.*.*' --always; then \
641                 cat $(srcdir)/revision.txt ; \
642         fi > revision.tmp
643         $(AM_V_at)if diff revision.tmp $(srcdir)/revision.txt >/dev/null 2>&1; then \
644                 rm -f -- revision.tmp; \
645         else \
646                 mv -f -- revision.tmp $(srcdir)/revision.txt; \
647         fi
648 #2>&1
650 ###############################################################################
651 # Unit/regression test
652 ###############################################################################
654 dist_check_SCRIPTS = check_headers check_symbols
656 check-local:
657         for h in `echo $(pkginclude_HEADERS) | sed -e s,\.\./include/,,g`; \
658         do \
659                 echo grep - "#include <$$h>" $(srcdir)/test/headers.c ; \
660                 if ! grep -- "#include <$$h>" $(srcdir)/test/headers.c ; \
661                 then \
662                         echo "Header $$h not included in test/headers.c!"; \
663                         exit 1; \
664                 fi ; \
665         done
666         $(SHELL) $(srcdir)/check_headers $(pluginsinclude_HEADERS)
668 FORCE:
669         @echo "Generated source cannot be phony. Go away." >&2
670         @exit 1
672 .PHONY: FORCE