]> git.sesse.net Git - vlc/blob - src/Makefile.am
Split out aout_mixer_t from aout_instance_t.
[vlc] / src / Makefile.am
1 ###############################################################################
2 # Automake targets and declarations
3 ###############################################################################
4
5 AUTOMAKE_OPTIONS = subdir-objects
6 SUBDIRS = . test
7
8 NULL =
9 EXTRA_DIST = extras/COPYING \
10         misc/beos_specific.cpp \
11         libvlc.pc.in \
12         vlc-plugin.pc.in \
13         libvlc.sym \
14         libvlccore.sym
15
16 BUILT_SOURCES = ../include/vlc_about.h
17 CLEANFILES = $(BUILT_SOURCES)
18
19 SUFFIXES = .pc.in .pc
20
21 ###############################################################################
22 # Headers
23 ###############################################################################
24
25 pluginsincludedir = $(pkgincludedir)/plugins
26
27 pkginclude_HEADERS = \
28         ../include/vlc/vlc.h \
29         ../include/vlc/deprecated.h \
30         ../include/vlc/libvlc.h \
31         ../include/vlc/libvlc_events.h \
32         ../include/vlc/libvlc_media.h \
33         ../include/vlc/libvlc_media_discoverer.h \
34         ../include/vlc/libvlc_media_library.h \
35         ../include/vlc/libvlc_media_list.h \
36         ../include/vlc/libvlc_media_list_player.h \
37         ../include/vlc/libvlc_media_list_view.h \
38         ../include/vlc/libvlc_media_player.h \
39         ../include/vlc/libvlc_structures.h \
40         ../include/vlc/libvlc_vlm.h \
41         ../include/vlc/mediacontrol.h \
42         ../include/vlc/mediacontrol_structures.h \
43         $(NULL)
44
45 pluginsinclude_HEADERS = \
46         ../include/vlc_access.h \
47         ../include/vlc_acl.h \
48         ../include/vlc_aout.h \
49         ../include/vlc_aout_mixer.h \
50         ../include/vlc_arrays.h \
51         ../include/vlc_avcodec.h \
52         ../include/vlc_bits.h \
53         ../include/vlc_block.h \
54         ../include/vlc_block_helper.h \
55         ../include/vlc_charset.h \
56         ../include/vlc_codec.h \
57         ../include/vlc_common.h \
58         ../include/vlc_config.h \
59         ../include/vlc_config_cat.h \
60         ../include/vlc_configuration.h \
61         ../include/vlc_dialog.h \
62         ../include/vlc_demux.h \
63         ../include/vlc_epg.h \
64         ../include/vlc_es.h \
65         ../include/vlc_es_out.h \
66         ../include/vlc_events.h \
67         ../include/vlc_filter.h \
68         ../include/vlc_fourcc.h \
69         ../include/vlc_gcrypt.h \
70         ../include/vlc_http.h \
71         ../include/vlc_httpd.h \
72         ../include/vlc_image.h \
73         ../include/vlc_input.h \
74         ../include/vlc_input_item.h \
75         ../include/vlc_main.h \
76         ../include/vlc_md5.h \
77         ../include/vlc_messages.h \
78         ../include/vlc_meta.h \
79         ../include/vlc_modules.h \
80         ../include/vlc_mtime.h \
81         ../include/vlc_objects.h \
82         ../include/vlc_picture.h \
83         ../include/vlc_picture_fifo.h \
84         ../include/vlc_picture_pool.h \
85         ../include/vlc_playlist.h \
86         ../include/vlc_plugin.h \
87         ../include/vlc_rand.h \
88         ../include/vlc_services_discovery.h \
89         ../include/vlc_sout.h \
90         ../include/vlc_stream.h \
91         ../include/vlc_strings.h \
92         ../include/vlc_subpicture.h \
93         ../include/vlc_threads.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_window.h \
101         ../include/vlc_xml.h \
102         $(NULL)
103
104 noinst_HEADERS = \
105         ../include/mmx.h \
106         ../include/vlc_codec_synchro.h \
107         ../include/vlc_codecs.h \
108         ../include/vlc_devices.h \
109         ../include/vlc_fixups.h \
110         ../include/vlc_interface.h \
111         ../include/vlc_intf_strings.h \
112         ../include/vlc_iso_lang.h \
113         ../include/vlc_keys.h \
114         ../include/vlc_network.h \
115         ../include/vlc_osd.h \
116         ../include/vlc_pgpkey.h \
117         ../include/vlc_tls.h \
118         ../include/vlc_update.h \
119         ../include/vlc_vod.h \
120         $(NULL)
121
122 ../include/vlc_about.h: Makefile.am $(top_srcdir)/COPYING $(top_srcdir)/THANKS $(top_srcdir)/AUTHORS
123         rm -f -- "$@.tmp"
124         mkdir -p -- ../include
125         echo "/* Automatically generated file - DO NOT EDIT */" > "$@.tmp"
126         echo "static const char psz_license[] =" >> "$@.tmp"
127         sed 's/"/\\"/g;s/^.*$$/\"&\\n\"/' "$(top_srcdir)/COPYING" >> "$@.tmp"
128         echo ";" >> "$@.tmp"
129         echo "static const char psz_thanks[] =" >> "$@.tmp"
130         sed '/\$$Id:/d;s/"/\\"/g;s/<.*.> //;s/^.*$$/\"&\\n\"/' \
131                 "$(top_srcdir)/THANKS" >> "$@.tmp"
132         echo ";" >> "$@.tmp"
133         echo "static const char psz_authors[] =" >> "$@.tmp"
134         sed -n '/^N: /{;s///;s/"/\\"/g;s/^.*$$/\"&\\n\"/;p;}' \
135                 "$(top_srcdir)/AUTHORS" >> "$@.tmp"
136         echo ";" >> "$@.tmp"
137
138         mv -f -- "$@.tmp" "$@"
139
140 ###############################################################################
141 # pkg-config integration
142 ###############################################################################
143
144 pkgconfigdir = $(libdir)/pkgconfig
145 pkgconfig_DATA = libvlc.pc vlc-plugin.pc
146 CLEANFILES += $(pkgconfig_DATA)
147
148 .pc.in.pc: $(top_builddir)/config.status
149         cd "$(top_builddir)" && \
150         $(SHELL) ./config.status --file="src/$@"
151
152 ###############################################################################
153 # Building libvlc
154 ###############################################################################
155
156 nice:
157         $(top_builddir)/compile
158
159 lib_LTLIBRARIES = libvlccore.la libvlc.la
160
161 AM_LDFLAGS = -no-undefined
162 if HAVE_WIN32
163 AM_LDFLAGS += -avoid-version
164 endif
165 if HAVE_WINCE
166 AM_LDFLAGS += -avoid-version
167 endif
168
169 libvlccore_la_SOURCES = $(SOURCES_libvlc)
170 nodist_libvlccore_la_SOURCES = revision.c
171 libvlccore_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlccore` \
172         -DMODULE_STRING=\"main\" \
173         -DLOCALEDIR=\"$(localedir)\" \
174         -DSYSCONFDIR=\"$(sysconfdir)\" \
175         -DDATA_PATH=\"$(vlcdatadir)\" \
176         -DLIBDIR=\"$(libdir)\" \
177         -DPLUGIN_PATH=\"$(vlclibdir)\"
178 libvlccore_la_LDFLAGS = `$(VLC_CONFIG) --ldflags libvlccore` $(AM_LDFLAGS) \
179         -no-undefined \
180         -export-symbols $(srcdir)/libvlccore.sym \
181         -version-info 4:0:0
182 libvlccore_la_LIBADD = `$(VLC_CONFIG) -libs libvlccore` $(AM_LIBADD) \
183         $(LTLIBINTL) ../compat/libcompat.la
184 libvlccore_la_DEPENDENCIES = libvlccore.sym
185 if HAVE_WIN32
186 libvlccore_la_DEPENDENCIES += libvlc_win32_rc.$(OBJEXT)
187 libvlccore_la_LDFLAGS += -Wl,libvlc_win32_rc.$(OBJEXT)
188 endif
189
190 libvlc_win32_rc.$(OBJEXT): $(top_builddir)/share/libvlc_win32_rc.rc
191         $(WINDRES) --include-dir $(top_srcdir)/share -i $< -o $@
192
193 libvlc_la_SOURCES = $(SOURCES_libvlc_control)
194 nodist_libvlc_la_SOURCES = revision.c
195 libvlc_la_LIBADD = `$(VLC_CONFIG) -libs libvlc` \
196         libvlccore.la ../compat/libcompat.la
197 libvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc`
198 libvlc_la_LDFLAGS = $(AM_LDFLAGS) `$(VLC_CONFIG) --ldflags libvlc` \
199         -version-info 5:0:0 \
200         -export-symbols $(srcdir)/libvlc.sym
201 libvlc_la_DEPENDENCIES = libvlc.sym libvlccore.la
202 if HAVE_WIN32
203 libvlc_la_DEPENDENCIES += $(DATA_win32_rc_lib)
204 libvlc_la_LDFLAGS += -Wl,$(DATA_win32_rc_lib)
205 endif
206
207
208 EXTRA_libvlccore_la_SOURCES = \
209         $(SOURCES_libvlc_beos) \
210         $(SOURCES_libvlc_darwin) \
211         $(SOURCES_libvlc_linux) \
212         $(SOURCES_libvlc_win32) \
213         $(SOURCES_libvlc_other) \
214         $(SOURCES_libvlc_dirent) \
215         $(SOURCES_libvlc_getopt) \
216         $(SOURCES_libvlc_httpd) \
217         $(SOURCES_libvlc_sout) \
218         $(SOURCES_libvlc_vlm) \
219         $(NULL)
220 if HAVE_BEOS
221 libvlccore_la_SOURCES += $(SOURCES_libvlc_beos)
222 else
223 if HAVE_DARWIN
224 libvlccore_la_SOURCES += $(SOURCES_libvlc_darwin)
225 else
226 if HAVE_LINUX
227 libvlccore_la_SOURCES += $(SOURCES_libvlc_linux)
228 else
229 if HAVE_WIN32
230 libvlccore_la_SOURCES += $(SOURCES_libvlc_win32)
231 else
232 if HAVE_WINCE
233 libvlccore_la_SOURCES += $(SOURCES_libvlc_win32)
234 else
235 libvlccore_la_SOURCES += $(SOURCES_libvlc_other)
236 endif
237 endif
238 endif
239 endif
240 endif
241 if BUILD_DIRENT
242 libvlccore_la_SOURCES += $(SOURCES_libvlc_dirent)
243 endif
244 if BUILD_GETOPT
245 libvlccore_la_SOURCES += $(SOURCES_libvlc_getopt)
246 endif
247 if BUILD_HTTPD
248 libvlccore_la_SOURCES += $(SOURCES_libvlc_httpd)
249 endif
250 if ENABLE_SOUT
251 libvlccore_la_SOURCES += $(SOURCES_libvlc_sout)
252 if ENABLE_VLM
253 libvlccore_la_SOURCES += $(SOURCES_libvlc_vlm)
254 endif
255 endif
256
257 SOURCES_libvlc_beos = \
258         misc/pthread.c \
259         $(NULL)
260
261 SOURCES_libvlc_darwin = \
262         misc/pthread.c \
263         misc/darwin_specific.c \
264         $(NULL)
265
266 SOURCES_libvlc_linux = \
267         misc/pthread.c \
268         misc/linux_specific.c \
269         $(NULL)
270
271 SOURCES_libvlc_win32 = \
272         misc/w32thread.c \
273         misc/win32_specific.c \
274         network/winsock.c \
275         $(NULL)
276
277 SOURCES_libvlc_other = \
278         misc/pthread.c \
279         misc/not_specific.c
280
281 SOURCES_libvlc_dirent = \
282         extras/dirent.c \
283         $(NULL)
284
285 SOURCES_libvlc_getopt = \
286         extras/getopt.c \
287         extras/getopt.h \
288         extras/getopt1.c \
289         $(NULL)
290
291 SOURCES_libvlc_common = \
292         libvlc.c \
293         libvlc.h \
294         libvlc-module.c \
295         missing.c \
296         version.c \
297         interface/dialog.c \
298         interface/interface.c \
299         interface/intf_eject.c \
300         playlist/playlist_internal.h \
301         playlist/art.c \
302         playlist/art.h \
303         playlist/thread.c \
304         playlist/control.c \
305         playlist/engine.c \
306         playlist/fetcher.c \
307         playlist/fetcher.h \
308         playlist/sort.c \
309         playlist/loadsave.c \
310         playlist/preparser.c \
311         playlist/preparser.h \
312         playlist/tree.c \
313         playlist/item.c \
314         playlist/search.c \
315         playlist/services_discovery.c \
316         input/item.c \
317         input/access.c \
318         input/clock.c \
319         input/control.c \
320         input/decoder.c \
321         input/decoder_synchro.c \
322         input/demux.c \
323         input/es_out.c \
324         input/es_out_timeshift.c \
325         input/event.c \
326         input/input.c \
327         input/meta.c \
328         input/access.h \
329         input/clock.h \
330         input/decoder.h \
331         input/demux.h \
332         input/es_out.h \
333         input/es_out_timeshift.h \
334         input/event.h \
335         input/item.h \
336         input/stream.h \
337         input/input_internal.h \
338         input/input_interface.h \
339         input/vlm_internal.h \
340         input/vlm_event.h \
341         input/resource.h \
342         input/resource.c \
343         input/stream.c \
344         input/stream_demux.c \
345         input/stream_filter.c \
346         input/stream_memory.c \
347         input/subtitles.c \
348         input/var.c \
349         video_output/display.c \
350         video_output/display.h \
351         video_output/snapshot.c \
352         video_output/snapshot.h \
353         video_output/statistic.h \
354         video_output/video_output.c \
355         video_output/vout_pictures.c \
356         video_output/vout_pictures.h \
357         video_output/video_text.c \
358         video_output/video_widgets.c \
359         video_output/vout_subpictures.c \
360         video_output/window.c \
361         video_output/vout_intf.c \
362         video_output/vout_internal.h \
363         video_output/vout_control.h \
364         audio_output/aout_internal.h \
365         audio_output/common.c \
366         audio_output/dec.c \
367         audio_output/filters.c \
368         audio_output/input.c \
369         audio_output/mixer.c \
370         audio_output/output.c \
371         audio_output/intf.c \
372         osd/osd.c \
373         osd/osd_text.c \
374         osd/osd_widgets.c \
375         network/acl.c \
376         network/getaddrinfo.c \
377         network/io.c \
378         network/tcp.c \
379         network/udp.c \
380         network/rootbind.c \
381         network/tls.c \
382         network/poll.c \
383         text/charset.c \
384         text/strings.c \
385         text/unicode.c \
386         text/filesystem.c \
387         text/wincp.c \
388         text/iso_lang.c \
389         text/iso-639_def.h \
390         misc/md5.c \
391         misc/rand.c \
392         misc/mtime.c \
393         misc/block.c \
394         misc/fourcc.c \
395         misc/es_format.c \
396         modules/modules.h \
397         modules/modules.c \
398         modules/cache.c \
399         modules/entry.c \
400         modules/os.c \
401         misc/threads.c \
402         misc/stats.c \
403         misc/cpu.c \
404         misc/action.c \
405         config/configuration.h \
406         config/core.c \
407         config/dirs.c \
408         config/chain.c \
409         config/file.c \
410         config/intf.c \
411         config/cmdline.c \
412         misc/events.c \
413         misc/image.c \
414         misc/messages.c \
415         misc/objects.c \
416         misc/variables.h \
417         misc/variables.c \
418         misc/error.c \
419         misc/update.h \
420         misc/update.c \
421         misc/update_crypto.c \
422         misc/xml.c \
423         misc/devices.c \
424         extras/libc.c \
425         misc/filter.c \
426         misc/filter_chain.c \
427         misc/http_auth.c \
428         $(NULL)
429
430 SOURCES_libvlc_httpd = \
431         network/httpd.c \
432         $(NULL)
433
434 SOURCES_libvlc_sout = \
435         stream_output/stream_output.c \
436         stream_output/stream_output.h \
437         stream_output/announce.c \
438         stream_output/sap.c \
439         stream_output/sdp.c \
440         $(NULL)
441
442 SOURCES_libvlc_vlm = \
443         input/vlm.c \
444         input/vlm_event.c \
445         input/vlmshell.c \
446         $(NULL)
447
448 SOURCES_libvlc = \
449         $(SOURCES_libvlc_common) \
450         $(OPT_SOURCES_libvlc_beos) \
451         $(OPT_SOURCES_libvlc_darwin) \
452         $(OPT_SOURCES_libvlc_win32) \
453         $(OPT_SOURCES_libvlc_dirent) \
454         $(OPT_SOURCES_libvlc_getopt) \
455         $(NULL)
456
457 SOURCES_libvlc_control = \
458         control/libvlc_internal.h \
459         control/event_internal.h \
460         control/media_internal.h \
461         control/media_list_internal.h \
462         control/media_list_view_internal.h \
463         control/media_player_internal.h \
464         control/core.c \
465         control/error.c \
466         control/log.c \
467         control/playlist.c \
468         control/vlm.c \
469         control/video.c \
470         control/audio.c \
471         control/event.c \
472         control/event_async.c \
473         control/flat_media_list_view.c \
474         control/hierarchical_media_list_view.c \
475         control/hierarchical_node_media_list_view.c \
476         control/media.c \
477         control/media_player.c \
478         control/media_list.c \
479         control/media_list_path.h \
480         control/media_list_player.c \
481         control/media_list_view.c \
482         control/media_library.c \
483         control/mediacontrol_internal.h \
484         control/mediacontrol_core.c \
485         control/mediacontrol_util.c \
486         control/mediacontrol_audio_video.c \
487         control/media_discoverer.c
488
489 ###############################################################################
490 # GIT revision
491 ###############################################################################
492
493 BUILT_SOURCES += stamp-revision
494 CLEANFILES += revision.txt revision.c
495
496 revision.c: revision.txt
497         rm -f -- revision.c
498         echo "const char psz_vlc_changeset[] = \"$$(cat revision.txt)\";" \
499                 > revision.c
500
501 revision.txt:
502         $(MAKE) stamp-revision
503         touch revision.txt
504
505 stamp-revision:
506         rm -f -- revision.tmp
507         (git --git-dir="$(top_srcdir)/.git/" describe --tags --long \
508                 --always || echo exported) > revision.tmp
509         diff revision.tmp revision.txt >/dev/null 2>&1 || \
510         mv -f -- revision.tmp revision.txt
511
512 ###############################################################################
513 # Unit/regression test
514 ###############################################################################
515
516 dist_check_SCRIPTS = check_symbols check_headers
517 TESTS = check_symbols
518
519 check_DATA = libvlc-headers.sym libvlc-sorted.sym
520 CLEANFILES += $(check_DATA)
521
522 libvlc-sorted.sym: libvlccore.sym
523         rm -f libvlc-sorted.sym
524         sort -fdu < "$(srcdir)/libvlccore.sym" > libvlc-sorted.sym
525
526 libvlc-headers.sym:
527         rm -f libvlc-headers.sym
528         cat ${srcdir}/../include/vlc_*.h ${srcdir}/control/*.h | \
529         sed -n -e 's/^[ ]*VLC_EXPORT[ ]*([^,]*,\([^,]*\),.*/\1/p' | \
530         sed -e 's/[^a-zA-Z0-9_]*//' | \
531         sort -fdu > libvlc-headers.sym
532
533 .PHONY: libvlc-headers.sym
534
535 check-local:
536         for h in `echo $(pkginclude_HEADERS) | sed -e s,\.\./include/,,g`; \
537         do \
538                 echo grep - "#include <$$h>" $(srcdir)/test/headers.c ; \
539                 if ! grep -- "#include <$$h>" $(srcdir)/test/headers.c ; \
540                 then \
541                         echo "Header $$h not included in test/headers.c!"; \
542                         exit 1; \
543                 fi ; \
544         done
545         $(srcdir)/check_headers $(pkginclude_HEADERS)
546         $(srcdir)/check_headers $(pluginsinclude_HEADERS)
547
548 FORCE:
549         @echo "Generated source cannot be phony. Go away." >&2
550         @exit 1
551
552 .PHONY: FORCE