]> git.sesse.net Git - vlc/blob - src/Makefile.am
Dont install libvlc_media_list.h twice.
[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_arrays.h \
50         ../include/vlc_avcodec.h \
51         ../include/vlc_bits.h \
52         ../include/vlc_block.h \
53         ../include/vlc_block_helper.h \
54         ../include/vlc_charset.h \
55         ../include/vlc_codec.h \
56         ../include/vlc_common.h \
57         ../include/vlc_config.h \
58         ../include/vlc_config_cat.h \
59         ../include/vlc_configuration.h \
60         ../include/vlc_dialog.h \
61         ../include/vlc_demux.h \
62         ../include/vlc_epg.h \
63         ../include/vlc_es.h \
64         ../include/vlc_es_out.h \
65         ../include/vlc_events.h \
66         ../include/vlc_filter.h \
67         ../include/vlc_fourcc.h \
68         ../include/vlc_gcrypt.h \
69         ../include/vlc_httpd.h \
70         ../include/vlc_image.h \
71         ../include/vlc_input.h \
72         ../include/vlc_input_item.h \
73         ../include/vlc_main.h \
74         ../include/vlc_md5.h \
75         ../include/vlc_messages.h \
76         ../include/vlc_meta.h \
77         ../include/vlc_modules.h \
78         ../include/vlc_mtime.h \
79         ../include/vlc_objects.h \
80         ../include/vlc_picture.h \
81         ../include/vlc_picture_fifo.h \
82         ../include/vlc_picture_pool.h \
83         ../include/vlc_playlist.h \
84         ../include/vlc_plugin.h \
85         ../include/vlc_rand.h \
86         ../include/vlc_services_discovery.h \
87         ../include/vlc_sout.h \
88         ../include/vlc_stream.h \
89         ../include/vlc_strings.h \
90         ../include/vlc_subpicture.h \
91         ../include/vlc_threads.h \
92         ../include/vlc_url.h \
93         ../include/vlc_variables.h \
94         ../include/vlc_vlm.h \
95         ../include/vlc_video_splitter.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 nodist_libvlccore_la_SOURCES = revision.c
165 libvlccore_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlccore` \
166         -DMODULE_STRING=\"main\" \
167         -DLOCALEDIR=\"$(localedir)\" \
168         -DSYSCONFDIR=\"$(sysconfdir)\" \
169         -DDATA_PATH=\"$(vlcdatadir)\" \
170         -DLIBDIR=\"$(libdir)\" \
171         -DPLUGIN_PATH=\"$(vlclibdir)\"
172 libvlccore_la_LDFLAGS = `$(VLC_CONFIG) --ldflags libvlccore` $(AM_LDFLAGS) \
173         -no-undefined \
174         -export-symbols $(srcdir)/libvlccore.sym \
175         -version-info 3:0:0
176 libvlccore_la_LIBADD = `$(VLC_CONFIG) -libs libvlccore` $(AM_LIBADD) \
177         $(LTLIBINTL) ../compat/libcompat.la
178 libvlccore_la_DEPENDENCIES = libvlccore.sym
179 if HAVE_WIN32
180 libvlccore_la_DEPENDENCIES += libvlc_win32_rc.$(OBJEXT)
181 libvlccore_la_LDFLAGS += -Wl,libvlc_win32_rc.$(OBJEXT)
182 endif
183
184 libvlc_win32_rc.$(OBJEXT): $(top_builddir)/share/libvlc_win32_rc.rc
185         $(WINDRES) --include-dir $(top_srcdir)/share -i $< -o $@
186
187 libvlc_la_SOURCES = $(SOURCES_libvlc_control)
188 nodist_libvlc_la_SOURCES = revision.c
189 libvlc_la_LIBADD = `$(VLC_CONFIG) -libs libvlc` \
190         libvlccore.la ../compat/libcompat.la
191 libvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc`
192 libvlc_la_LDFLAGS = $(AM_LDFLAGS) `$(VLC_CONFIG) --ldflags libvlc` \
193         -version-info 5:0:0 \
194         -export-symbols $(srcdir)/libvlc.sym
195 libvlc_la_DEPENDENCIES = libvlc.sym libvlccore.la
196 if HAVE_WIN32
197 libvlc_la_DEPENDENCIES += $(DATA_win32_rc_lib)
198 libvlc_la_LDFLAGS += -Wl,$(DATA_win32_rc_lib)
199 endif
200
201
202 EXTRA_libvlccore_la_SOURCES = \
203         $(SOURCES_libvlc_beos) \
204         $(SOURCES_libvlc_darwin) \
205         $(SOURCES_libvlc_linux) \
206         $(SOURCES_libvlc_win32) \
207         $(SOURCES_libvlc_other) \
208         $(SOURCES_libvlc_dirent) \
209         $(SOURCES_libvlc_getopt) \
210         $(SOURCES_libvlc_httpd) \
211         $(SOURCES_libvlc_sout) \
212         $(SOURCES_libvlc_vlm) \
213         $(NULL)
214 if HAVE_BEOS
215 libvlccore_la_SOURCES += $(SOURCES_libvlc_beos)
216 else
217 if HAVE_DARWIN
218 libvlccore_la_SOURCES += $(SOURCES_libvlc_darwin)
219 else
220 if HAVE_LINUX
221 libvlccore_la_SOURCES += $(SOURCES_libvlc_linux)
222 else
223 if HAVE_WIN32
224 libvlccore_la_SOURCES += $(SOURCES_libvlc_win32)
225 else
226 if HAVE_WINCE
227 libvlccore_la_SOURCES += $(SOURCES_libvlc_win32)
228 else
229 libvlccore_la_SOURCES += $(SOURCES_libvlc_other)
230 endif
231 endif
232 endif
233 endif
234 endif
235 if BUILD_DIRENT
236 libvlccore_la_SOURCES += $(SOURCES_libvlc_dirent)
237 endif
238 if BUILD_GETOPT
239 libvlccore_la_SOURCES += $(SOURCES_libvlc_getopt)
240 endif
241 if BUILD_HTTPD
242 libvlccore_la_SOURCES += $(SOURCES_libvlc_httpd)
243 endif
244 if ENABLE_SOUT
245 libvlccore_la_SOURCES += $(SOURCES_libvlc_sout)
246 if ENABLE_VLM
247 libvlccore_la_SOURCES += $(SOURCES_libvlc_vlm)
248 endif
249 endif
250
251 SOURCES_libvlc_beos = \
252         misc/pthread.c \
253         $(NULL)
254
255 SOURCES_libvlc_darwin = \
256         misc/pthread.c \
257         misc/darwin_specific.c \
258         $(NULL)
259
260 SOURCES_libvlc_linux = \
261         misc/pthread.c \
262         misc/linux_specific.c \
263         $(NULL)
264
265 SOURCES_libvlc_win32 = \
266         misc/w32thread.c \
267         misc/win32_specific.c \
268         network/winsock.c \
269         $(NULL)
270
271 SOURCES_libvlc_other = \
272         misc/pthread.c \
273         misc/not_specific.c
274
275 SOURCES_libvlc_dirent = \
276         extras/dirent.c \
277         $(NULL)
278
279 SOURCES_libvlc_getopt = \
280         extras/getopt.c \
281         extras/getopt.h \
282         extras/getopt1.c \
283         $(NULL)
284
285 SOURCES_libvlc_common = \
286         libvlc.c \
287         libvlc.h \
288         libvlc-module.c \
289         missing.c \
290         version.c \
291         interface/dialog.c \
292         interface/interface.c \
293         interface/intf_eject.c \
294         playlist/playlist_internal.h \
295         playlist/art.c \
296         playlist/art.h \
297         playlist/thread.c \
298         playlist/control.c \
299         playlist/engine.c \
300         playlist/fetcher.c \
301         playlist/fetcher.h \
302         playlist/sort.c \
303         playlist/loadsave.c \
304         playlist/preparser.c \
305         playlist/preparser.h \
306         playlist/tree.c \
307         playlist/item.c \
308         playlist/search.c \
309         playlist/services_discovery.c \
310         input/item.c \
311         input/access.c \
312         input/clock.c \
313         input/control.c \
314         input/decoder.c \
315         input/decoder_synchro.c \
316         input/demux.c \
317         input/es_out.c \
318         input/es_out_timeshift.c \
319         input/event.c \
320         input/input.c \
321         input/meta.c \
322         input/access.h \
323         input/clock.h \
324         input/decoder.h \
325         input/demux.h \
326         input/es_out.h \
327         input/es_out_timeshift.h \
328         input/event.h \
329         input/item.h \
330         input/stream.h \
331         input/input_internal.h \
332         input/input_interface.h \
333         input/vlm_internal.h \
334         input/vlm_event.h \
335         input/resource.h \
336         input/resource.c \
337         input/stream.c \
338         input/stream_demux.c \
339         input/stream_filter.c \
340         input/stream_memory.c \
341         input/subtitles.c \
342         input/var.c \
343         video_output/video_output.c \
344         video_output/vout_pictures.c \
345         video_output/vout_pictures.h \
346         video_output/video_text.c \
347         video_output/video_widgets.c \
348         video_output/vout_subpictures.c \
349         video_output/vout_intf.c \
350         video_output/vout_internal.h \
351         video_output/vout_control.h \
352         audio_output/aout_internal.h \
353         audio_output/common.c \
354         audio_output/dec.c \
355         audio_output/filters.c \
356         audio_output/input.c \
357         audio_output/mixer.c \
358         audio_output/output.c \
359         audio_output/intf.c \
360         osd/osd.c \
361         osd/osd_text.c \
362         osd/osd_widgets.c \
363         network/acl.c \
364         network/getaddrinfo.c \
365         network/io.c \
366         network/tcp.c \
367         network/udp.c \
368         network/rootbind.c \
369         network/tls.c \
370         network/poll.c \
371         text/charset.c \
372         text/strings.c \
373         text/unicode.c \
374         text/filesystem.c \
375         text/wincp.c \
376         text/iso_lang.c \
377         text/iso-639_def.h \
378         misc/md5.c \
379         misc/rand.c \
380         misc/mtime.c \
381         misc/block.c \
382         misc/fourcc.c \
383         misc/es_format.c \
384         modules/modules.h \
385         modules/modules.c \
386         modules/cache.c \
387         modules/entry.c \
388         modules/os.c \
389         misc/threads.c \
390         misc/stats.c \
391         misc/cpu.c \
392         misc/action.c \
393         config/configuration.h \
394         config/core.c \
395         config/dirs.c \
396         config/chain.c \
397         config/file.c \
398         config/intf.c \
399         config/cmdline.c \
400         misc/events.c \
401         misc/image.c \
402         misc/messages.c \
403         misc/objects.c \
404         misc/variables.h \
405         misc/variables.c \
406         misc/error.c \
407         misc/update.h \
408         misc/update.c \
409         misc/xml.c \
410         misc/devices.c \
411         extras/libc.c \
412         misc/filter.c \
413         misc/filter_chain.c \
414         $(NULL)
415
416 SOURCES_libvlc_httpd = \
417         network/httpd.c \
418         $(NULL)
419
420 SOURCES_libvlc_sout = \
421         stream_output/stream_output.c \
422         stream_output/stream_output.h \
423         stream_output/announce.c \
424         stream_output/sap.c \
425         stream_output/sdp.c \
426         $(NULL)
427
428 SOURCES_libvlc_vlm = \
429         input/vlm.c \
430         input/vlm_event.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/event_internal.h \
446         control/media_internal.h \
447         control/media_list_internal.h \
448         control/media_list_view_internal.h \
449         control/media_player_internal.h \
450         control/core.c \
451         control/log.c \
452         control/playlist.c \
453         control/vlm.c \
454         control/video.c \
455         control/audio.c \
456         control/event.c \
457         control/event_async.c \
458         control/flat_media_list_view.c \
459         control/hierarchical_media_list_view.c \
460         control/hierarchical_node_media_list_view.c \
461         control/media.c \
462         control/media_player.c \
463         control/media_list.c \
464         control/media_list_path.h \
465         control/media_list_player.c \
466         control/media_list_view.c \
467         control/media_library.c \
468         control/mediacontrol_internal.h \
469         control/mediacontrol_core.c \
470         control/mediacontrol_util.c \
471         control/mediacontrol_audio_video.c \
472         control/media_discoverer.c
473
474 ###############################################################################
475 # GIT revision
476 ###############################################################################
477
478 BUILT_SOURCES += stamp-revision
479 CLEANFILES += revision.txt revision.c
480
481 revision.c: revision.txt
482         rm -f -- revision.c
483         echo "const char psz_vlc_changeset[] = \"$$(cat revision.txt)\";" \
484                 > revision.c
485
486 revision.txt:
487         $(MAKE) stamp-revision
488         touch revision.txt
489
490 stamp-revision:
491         rm -f -- revision.tmp
492         (git --git-dir="$(top_srcdir)/.git/" describe --tags --long \
493                 --always || echo exported) > revision.tmp
494         diff revision.tmp revision.txt >/dev/null 2>&1 || \
495         mv -f -- revision.tmp revision.txt
496
497 ###############################################################################
498 # Unit/regression test
499 ###############################################################################
500
501 dist_check_SCRIPTS = check_symbols check_headers
502 TESTS = check_symbols
503
504 check-local:
505         for h in `echo $(pkginclude_HEADERS) | sed -e s,\.\./include/,,g`; \
506         do \
507                 echo grep - "#include <$$h>" $(srcdir)/test/headers.c ; \
508                 if ! grep -- "#include <$$h>" $(srcdir)/test/headers.c ; \
509                 then \
510                         echo "Header $$h not included in test/headers.c!"; \
511                         exit 1; \
512                 fi ; \
513         done
514         $(srcdir)/check_headers $(pkginclude_HEADERS)
515         $(srcdir)/check_headers $(pluginsinclude_HEADERS)
516
517 FORCE:
518         @echo "Generated source cannot be phony. Go away." >&2
519         @exit 1
520
521 .PHONY: FORCE