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