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