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