]> git.sesse.net Git - vlc/blob - src/Makefile.am
libvlc: Allow event to be dispatched asynchronously.
[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_list.h \
33         ../include/vlc/libvlc_media.h \
34         ../include/vlc/libvlc_media_discoverer.h \
35         ../include/vlc/libvlc_media_library.h \
36         ../include/vlc/libvlc_media_list.h \
37         ../include/vlc/libvlc_media_list_player.h \
38         ../include/vlc/libvlc_media_list_view.h \
39         ../include/vlc/libvlc_media_player.h \
40         ../include/vlc/libvlc_structures.h \
41         ../include/vlc/libvlc_vlm.h \
42         ../include/vlc/mediacontrol.h \
43         ../include/vlc/mediacontrol_structures.h \
44         $(NULL)
45
46 pluginsinclude_HEADERS = \
47         ../include/vlc_access.h \
48         ../include/vlc_acl.h \
49         ../include/vlc_aout.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_httpd.h \
71         ../include/vlc_image.h \
72         ../include/vlc_input.h \
73         ../include/vlc_input_item.h \
74         ../include/vlc_main.h \
75         ../include/vlc_md5.h \
76         ../include/vlc_messages.h \
77         ../include/vlc_meta.h \
78         ../include/vlc_modules.h \
79         ../include/vlc_mtime.h \
80         ../include/vlc_objects.h \
81         ../include/vlc_picture.h \
82         ../include/vlc_picture_fifo.h \
83         ../include/vlc_picture_pool.h \
84         ../include/vlc_playlist.h \
85         ../include/vlc_plugin.h \
86         ../include/vlc_rand.h \
87         ../include/vlc_services_discovery.h \
88         ../include/vlc_sout.h \
89         ../include/vlc_stream.h \
90         ../include/vlc_strings.h \
91         ../include/vlc_subpicture.h \
92         ../include/vlc_threads.h \
93         ../include/vlc_url.h \
94         ../include/vlc_variables.h \
95         ../include/vlc_vlm.h \
96         ../include/vlc_vout.h \
97         ../include/vlc_window.h \
98         ../include/vlc_xml.h \
99         $(NULL)
100
101 noinst_HEADERS = \
102         ../include/mmx.h \
103         ../include/vlc_codec_synchro.h \
104         ../include/vlc_codecs.h \
105         ../include/vlc_devices.h \
106         ../include/vlc_fixups.h \
107         ../include/vlc_interface.h \
108         ../include/vlc_intf_strings.h \
109         ../include/vlc_iso_lang.h \
110         ../include/vlc_keys.h \
111         ../include/vlc_network.h \
112         ../include/vlc_osd.h \
113         ../include/vlc_pgpkey.h \
114         ../include/vlc_tls.h \
115         ../include/vlc_update.h \
116         ../include/vlc_vod.h \
117         $(NULL)
118
119 ../include/vlc_about.h: Makefile.am $(top_srcdir)/COPYING $(top_srcdir)/THANKS $(top_srcdir)/AUTHORS
120         rm -f -- "$@.tmp"
121         mkdir -p -- ../include
122         echo "/* Automatically generated file - DO NOT EDIT */" > "$@.tmp"
123         echo "static const char psz_license[] =" >> "$@.tmp"
124         cat $(top_srcdir)/COPYING | sed s/'"'/'\\"'/g | $(AWK) '{ print "\""$$0"\\n\"" }' >> "$@.tmp"
125         echo ";" >> "$@.tmp"
126         echo "static const char psz_thanks[] =" >> "$@.tmp"
127         grep -v '$$Id:'  $(top_srcdir)/THANKS | sed s/'"'/'\\"'/g | $(AWK) '{ print "\""$$0"\\n\"" }'|sed s/"<.*.> "// >> "$@.tmp"
128         echo ";" >> "$@.tmp"
129         echo "static const char psz_authors[] =" >> "$@.tmp"
130         grep N: $(top_srcdir)/AUTHORS | cut -d" " -f 2- | sed s/'"'/'\\"'/g | $(AWK) '{ print "\""$$0"\\n\"" }' >> "$@.tmp"
131         echo ";" >> "$@.tmp"
132         mv -f -- "$@.tmp" "$@"
133
134 ###############################################################################
135 # pkg-config integration
136 ###############################################################################
137
138 pkgconfigdir = $(libdir)/pkgconfig
139 pkgconfig_DATA = libvlc.pc vlc-plugin.pc
140 CLEANFILES += $(pkgconfig_DATA)
141
142 .pc.in.pc: $(top_builddir)/config.status
143         cd "$(top_builddir)" && \
144         $(SHELL) ./config.status --file="src/$@"
145
146 ###############################################################################
147 # Building libvlc
148 ###############################################################################
149
150 nice:
151         $(top_builddir)/compile
152
153 lib_LTLIBRARIES = libvlccore.la libvlc.la
154
155 AM_LDFLAGS = -no-undefined
156 if HAVE_WIN32
157 AM_LDFLAGS += -avoid-version
158 endif
159 if HAVE_WINCE
160 AM_LDFLAGS += -avoid-version
161 endif
162
163 libvlccore_la_SOURCES = $(SOURCES_libvlc)
164 libvlccore_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlccore` \
165         -DMODULE_STRING=\"main\" \
166         -DLOCALEDIR=\"$(localedir)\" \
167         -DSYSCONFDIR=\"$(sysconfdir)\" \
168         -DDATA_PATH=\"$(vlcdatadir)\" \
169         -DLIBDIR=\"$(libdir)\" \
170         -DPLUGIN_PATH=\"$(vlclibdir)\"
171 libvlccore_la_LDFLAGS = `$(VLC_CONFIG) --ldflags libvlccore` $(AM_LDFLAGS) \
172         -no-undefined \
173         -export-symbols $(srcdir)/libvlccore.sym \
174         -version-info 3:0:0
175 libvlccore_la_LIBADD = `$(VLC_CONFIG) -libs libvlccore` $(AM_LIBADD) \
176         $(LTLIBINTL) ../compat/libcompat.la
177 libvlccore_la_DEPENDENCIES = libvlccore.sym
178 if HAVE_WIN32
179 libvlccore_la_DEPENDENCIES += libvlc_win32_rc.$(OBJEXT)
180 libvlccore_la_LDFLAGS += -Wl,libvlc_win32_rc.$(OBJEXT)
181 endif
182
183 libvlc_win32_rc.$(OBJEXT): $(top_builddir)/share/libvlc_win32_rc.rc
184         $(WINDRES) --include-dir $(top_srcdir)/share -i $< -o $@
185
186 libvlc_la_SOURCES = $(SOURCES_libvlc_control)
187 libvlc_la_LIBADD = `$(VLC_CONFIG) -libs libvlc` \
188         libvlccore.la ../compat/libcompat.la
189 libvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc`
190 libvlc_la_LDFLAGS = $(AM_LDFLAGS) `$(VLC_CONFIG) --ldflags libvlc` \
191         -version-info 5:0:0 \
192         -export-symbols $(srcdir)/libvlc.sym
193 libvlc_la_DEPENDENCIES = libvlc.sym libvlccore.la
194 if HAVE_WIN32
195 libvlc_la_DEPENDENCIES += $(DATA_win32_rc_lib)
196 libvlc_la_LDFLAGS += -Wl,$(DATA_win32_rc_lib)
197 endif
198
199
200 EXTRA_libvlccore_la_SOURCES = \
201         $(SOURCES_libvlc_beos) \
202         $(SOURCES_libvlc_darwin) \
203         $(SOURCES_libvlc_linux) \
204         $(SOURCES_libvlc_win32) \
205         $(SOURCES_libvlc_other) \
206         $(SOURCES_libvlc_dirent) \
207         $(SOURCES_libvlc_getopt) \
208         $(SOURCES_libvlc_httpd) \
209         $(SOURCES_libvlc_sout) \
210         $(SOURCES_libvlc_vlm) \
211         $(NULL)
212 if HAVE_BEOS
213 libvlccore_la_SOURCES += $(SOURCES_libvlc_beos)
214 else
215 if HAVE_DARWIN
216 libvlccore_la_SOURCES += $(SOURCES_libvlc_darwin)
217 else
218 if HAVE_LINUX
219 libvlccore_la_SOURCES += $(SOURCES_libvlc_linux)
220 else
221 if HAVE_WIN32
222 libvlccore_la_SOURCES += $(SOURCES_libvlc_win32)
223 else
224 if HAVE_WINCE
225 libvlccore_la_SOURCES += $(SOURCES_libvlc_win32)
226 else
227 libvlccore_la_SOURCES += $(SOURCES_libvlc_other)
228 endif
229 endif
230 endif
231 endif
232 endif
233 if BUILD_DIRENT
234 libvlccore_la_SOURCES += $(SOURCES_libvlc_dirent)
235 endif
236 if BUILD_GETOPT
237 libvlccore_la_SOURCES += $(SOURCES_libvlc_getopt)
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
248
249 SOURCES_libvlc_beos = \
250         misc/pthread.c \
251         $(NULL)
252
253 SOURCES_libvlc_darwin = \
254         misc/pthread.c \
255         misc/darwin_specific.c \
256         $(NULL)
257
258 SOURCES_libvlc_linux = \
259         misc/pthread.c \
260         misc/linux_specific.c \
261         $(NULL)
262
263 SOURCES_libvlc_win32 = \
264         misc/w32thread.c \
265         misc/win32_specific.c \
266         network/winsock.c \
267         $(NULL)
268
269 SOURCES_libvlc_other = \
270         misc/pthread.c \
271         misc/not_specific.c
272
273 SOURCES_libvlc_dirent = \
274         extras/dirent.c \
275         $(NULL)
276
277 SOURCES_libvlc_getopt = \
278         extras/getopt.c \
279         extras/getopt.h \
280         extras/getopt1.c \
281         $(NULL)
282
283 SOURCES_libvlc_common = \
284         libvlc.c \
285         libvlc.h \
286         libvlc-module.c \
287         missing.c \
288         version.c \
289         interface/dialog.c \
290         interface/interface.c \
291         interface/intf_eject.c \
292         playlist/playlist_internal.h \
293         playlist/art.c \
294         playlist/art.h \
295         playlist/thread.c \
296         playlist/control.c \
297         playlist/engine.c \
298         playlist/fetcher.c \
299         playlist/fetcher.h \
300         playlist/sort.c \
301         playlist/loadsave.c \
302         playlist/preparser.c \
303         playlist/preparser.h \
304         playlist/tree.c \
305         playlist/item.c \
306         playlist/search.c \
307         playlist/services_discovery.c \
308         input/item.c \
309         input/access.c \
310         input/clock.c \
311         input/control.c \
312         input/decoder.c \
313         input/decoder_synchro.c \
314         input/demux.c \
315         input/es_out.c \
316         input/es_out_timeshift.c \
317         input/event.c \
318         input/input.c \
319         input/meta.c \
320         input/access.h \
321         input/clock.h \
322         input/decoder.h \
323         input/demux.h \
324         input/es_out.h \
325         input/es_out_timeshift.h \
326         input/event.h \
327         input/item.h \
328         input/stream.h \
329         input/input_internal.h \
330         input/input_interface.h \
331         input/vlm_internal.h \
332         input/vlm_event.h \
333         input/resource.h \
334         input/resource.c \
335         input/stream.c \
336         input/stream_demux.c \
337         input/stream_filter.c \
338         input/stream_memory.c \
339         input/subtitles.c \
340         input/var.c \
341         video_output/video_output.c \
342         video_output/vout_pictures.c \
343         video_output/vout_pictures.h \
344         video_output/video_text.c \
345         video_output/video_widgets.c \
346         video_output/vout_subpictures.c \
347         video_output/vout_intf.c \
348         video_output/vout_internal.h \
349         video_output/vout_control.h \
350         audio_output/aout_internal.h \
351         audio_output/common.c \
352         audio_output/dec.c \
353         audio_output/filters.c \
354         audio_output/input.c \
355         audio_output/mixer.c \
356         audio_output/output.c \
357         audio_output/intf.c \
358         osd/osd.c \
359         osd/osd_text.c \
360         osd/osd_widgets.c \
361         network/acl.c \
362         network/getaddrinfo.c \
363         network/io.c \
364         network/tcp.c \
365         network/udp.c \
366         network/rootbind.c \
367         network/tls.c \
368         network/poll.c \
369         text/charset.c \
370         text/strings.c \
371         text/unicode.c \
372         text/filesystem.c \
373         text/wincp.c \
374         text/iso_lang.c \
375         text/iso-639_def.h \
376         misc/md5.c \
377         misc/rand.c \
378         misc/mtime.c \
379         misc/block.c \
380         misc/fourcc.c \
381         misc/es_format.c \
382         modules/modules.h \
383         modules/modules.c \
384         modules/cache.c \
385         modules/entry.c \
386         modules/os.c \
387         misc/threads.c \
388         misc/stats.c \
389         misc/cpu.c \
390         misc/action.c \
391         config/configuration.h \
392         config/core.c \
393         config/dirs.c \
394         config/chain.c \
395         config/file.c \
396         config/intf.c \
397         config/cmdline.c \
398         misc/events.c \
399         misc/image.c \
400         misc/messages.c \
401         misc/objects.c \
402         misc/variables.h \
403         misc/variables.c \
404         misc/error.c \
405         misc/update.h \
406         misc/update.c \
407         misc/xml.c \
408         misc/devices.c \
409         extras/libc.c \
410         misc/filter_chain.c \
411         $(NULL)
412
413 SOURCES_libvlc_httpd = \
414         network/httpd.c \
415         $(NULL)
416
417 SOURCES_libvlc_sout = \
418         stream_output/stream_output.c \
419         stream_output/stream_output.h \
420         stream_output/announce.c \
421         stream_output/sap.c \
422         stream_output/sdp.c \
423         $(NULL)
424
425 SOURCES_libvlc_vlm = \
426         input/vlm.c \
427         input/vlm_event.c \
428         input/vlmshell.c \
429         $(NULL)
430
431 SOURCES_libvlc = \
432         $(SOURCES_libvlc_common) \
433         $(OPT_SOURCES_libvlc_beos) \
434         $(OPT_SOURCES_libvlc_darwin) \
435         $(OPT_SOURCES_libvlc_win32) \
436         $(OPT_SOURCES_libvlc_dirent) \
437         $(OPT_SOURCES_libvlc_getopt) \
438         $(NULL)
439
440 SOURCES_libvlc_control = \
441         control/libvlc_internal.h \
442         control/event_internal.h \
443         control/media_internal.h \
444         control/media_list_internal.h \
445         control/media_list_view_internal.h \
446         control/media_player_internal.h \
447         control/core.c \
448         control/log.c \
449         control/playlist.c \
450         control/vlm.c \
451         control/video.c \
452         control/audio.c \
453         control/event.c \
454         control/event_async.c \
455         control/flat_media_list_view.c \
456         control/hierarchical_media_list_view.c \
457         control/hierarchical_node_media_list_view.c \
458         control/media.c \
459         control/media_player.c \
460         control/media_list.c \
461         control/media_list_path.h \
462         control/media_list_player.c \
463         control/media_list_view.c \
464         control/media_library.c \
465         control/mediacontrol_internal.h \
466         control/mediacontrol_core.c \
467         control/mediacontrol_util.c \
468         control/mediacontrol_audio_video.c \
469         control/media_discoverer.c
470
471 ###############################################################################
472 # Unit/regression test
473 ###############################################################################
474
475 dist_check_SCRIPTS = check_symbols check_headers
476 TESTS = check_symbols
477
478 check-local:
479         for h in `echo $(pkginclude_HEADERS) | sed -e s,\.\./include/,,g`; \
480         do \
481                 echo grep - "#include <$$h>" $(srcdir)/test/headers.c ; \
482                 if ! grep -- "#include <$$h>" $(srcdir)/test/headers.c ; \
483                 then \
484                         echo "Header $$h not included in test/headers.c!"; \
485                         exit 1; \
486                 fi ; \
487         done
488         $(srcdir)/check_headers $(pkginclude_HEADERS)
489         $(srcdir)/check_headers $(pluginsinclude_HEADERS)
490
491 FORCE:
492         @echo "Generated source cannot be phony. Go away." >&2
493         @exit 1
494
495 .PHONY: FORCE