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