]> git.sesse.net Git - vlc/blob - src/Makefile.am
Increased version-info after modification in 1.0 branch.
[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_http.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_video_splitter.h \
97         ../include/vlc_vout.h \
98         ../include/vlc_window.h \
99         ../include/vlc_xml.h \
100         $(NULL)
101
102 noinst_HEADERS = \
103         ../include/mmx.h \
104         ../include/vlc_codec_synchro.h \
105         ../include/vlc_codecs.h \
106         ../include/vlc_devices.h \
107         ../include/vlc_fixups.h \
108         ../include/vlc_interface.h \
109         ../include/vlc_intf_strings.h \
110         ../include/vlc_iso_lang.h \
111         ../include/vlc_keys.h \
112         ../include/vlc_network.h \
113         ../include/vlc_osd.h \
114         ../include/vlc_pgpkey.h \
115         ../include/vlc_tls.h \
116         ../include/vlc_update.h \
117         ../include/vlc_vod.h \
118         $(NULL)
119
120 ../include/vlc_about.h: Makefile.am $(top_srcdir)/COPYING $(top_srcdir)/THANKS $(top_srcdir)/AUTHORS
121         rm -f -- "$@.tmp"
122         mkdir -p -- ../include
123         echo "/* Automatically generated file - DO NOT EDIT */" > "$@.tmp"
124         echo "static const char psz_license[] =" >> "$@.tmp"
125         sed 's/"/\\"/g;s/^.*$$/\"&\\n\"/' "$(top_srcdir)/COPYING" >> "$@.tmp"
126         echo ";" >> "$@.tmp"
127         echo "static const char psz_thanks[] =" >> "$@.tmp"
128         sed '/\$$Id:/d;s/"/\\"/g;s/<.*.> //;s/^.*$$/\"&\\n\"/' \
129                 "$(top_srcdir)/THANKS" >> "$@.tmp"
130         echo ";" >> "$@.tmp"
131         echo "static const char psz_authors[] =" >> "$@.tmp"
132         sed -n '/^N: /{;s///;s/"/\\"/g;s/^.*$$/\"&\\n\"/;p;}' \
133                 "$(top_srcdir)/AUTHORS" >> "$@.tmp"
134         echo ";" >> "$@.tmp"
135
136         mv -f -- "$@.tmp" "$@"
137
138 ###############################################################################
139 # pkg-config integration
140 ###############################################################################
141
142 pkgconfigdir = $(libdir)/pkgconfig
143 pkgconfig_DATA = libvlc.pc vlc-plugin.pc
144 CLEANFILES += $(pkgconfig_DATA)
145
146 .pc.in.pc: $(top_builddir)/config.status
147         cd "$(top_builddir)" && \
148         $(SHELL) ./config.status --file="src/$@"
149
150 ###############################################################################
151 # Building libvlc
152 ###############################################################################
153
154 nice:
155         $(top_builddir)/compile
156
157 lib_LTLIBRARIES = libvlccore.la libvlc.la
158
159 AM_LDFLAGS = -no-undefined
160 if HAVE_WIN32
161 AM_LDFLAGS += -avoid-version
162 endif
163 if HAVE_WINCE
164 AM_LDFLAGS += -avoid-version
165 endif
166
167 libvlccore_la_SOURCES = $(SOURCES_libvlc)
168 nodist_libvlccore_la_SOURCES = revision.c
169 libvlccore_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlccore` \
170         -DMODULE_STRING=\"main\" \
171         -DLOCALEDIR=\"$(localedir)\" \
172         -DSYSCONFDIR=\"$(sysconfdir)\" \
173         -DDATA_PATH=\"$(vlcdatadir)\" \
174         -DLIBDIR=\"$(libdir)\" \
175         -DPLUGIN_PATH=\"$(vlclibdir)\"
176 libvlccore_la_LDFLAGS = `$(VLC_CONFIG) --ldflags libvlccore` $(AM_LDFLAGS) \
177         -no-undefined \
178         -export-symbols $(srcdir)/libvlccore.sym \
179         -version-info 3:0:0
180 libvlccore_la_LIBADD = `$(VLC_CONFIG) -libs libvlccore` $(AM_LIBADD) \
181         $(LTLIBINTL) ../compat/libcompat.la
182 libvlccore_la_DEPENDENCIES = libvlccore.sym
183 if HAVE_WIN32
184 libvlccore_la_DEPENDENCIES += libvlc_win32_rc.$(OBJEXT)
185 libvlccore_la_LDFLAGS += -Wl,libvlc_win32_rc.$(OBJEXT)
186 endif
187
188 libvlc_win32_rc.$(OBJEXT): $(top_builddir)/share/libvlc_win32_rc.rc
189         $(WINDRES) --include-dir $(top_srcdir)/share -i $< -o $@
190
191 libvlc_la_SOURCES = $(SOURCES_libvlc_control)
192 nodist_libvlc_la_SOURCES = revision.c
193 libvlc_la_LIBADD = `$(VLC_CONFIG) -libs libvlc` \
194         libvlccore.la ../compat/libcompat.la
195 libvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc`
196 libvlc_la_LDFLAGS = $(AM_LDFLAGS) `$(VLC_CONFIG) --ldflags libvlc` \
197         -version-info 6:0:0 \
198         -export-symbols $(srcdir)/libvlc.sym
199 libvlc_la_DEPENDENCIES = libvlc.sym libvlccore.la
200 if HAVE_WIN32
201 libvlc_la_DEPENDENCIES += $(DATA_win32_rc_lib)
202 libvlc_la_LDFLAGS += -Wl,$(DATA_win32_rc_lib)
203 endif
204
205
206 EXTRA_libvlccore_la_SOURCES = \
207         $(SOURCES_libvlc_beos) \
208         $(SOURCES_libvlc_darwin) \
209         $(SOURCES_libvlc_linux) \
210         $(SOURCES_libvlc_win32) \
211         $(SOURCES_libvlc_other) \
212         $(SOURCES_libvlc_dirent) \
213         $(SOURCES_libvlc_getopt) \
214         $(SOURCES_libvlc_httpd) \
215         $(SOURCES_libvlc_sout) \
216         $(SOURCES_libvlc_vlm) \
217         $(NULL)
218 if HAVE_BEOS
219 libvlccore_la_SOURCES += $(SOURCES_libvlc_beos)
220 else
221 if HAVE_DARWIN
222 libvlccore_la_SOURCES += $(SOURCES_libvlc_darwin)
223 else
224 if HAVE_LINUX
225 libvlccore_la_SOURCES += $(SOURCES_libvlc_linux)
226 else
227 if HAVE_WIN32
228 libvlccore_la_SOURCES += $(SOURCES_libvlc_win32)
229 else
230 if HAVE_WINCE
231 libvlccore_la_SOURCES += $(SOURCES_libvlc_win32)
232 else
233 libvlccore_la_SOURCES += $(SOURCES_libvlc_other)
234 endif
235 endif
236 endif
237 endif
238 endif
239 if BUILD_DIRENT
240 libvlccore_la_SOURCES += $(SOURCES_libvlc_dirent)
241 endif
242 if BUILD_GETOPT
243 libvlccore_la_SOURCES += $(SOURCES_libvlc_getopt)
244 endif
245 if BUILD_HTTPD
246 libvlccore_la_SOURCES += $(SOURCES_libvlc_httpd)
247 endif
248 if ENABLE_SOUT
249 libvlccore_la_SOURCES += $(SOURCES_libvlc_sout)
250 if ENABLE_VLM
251 libvlccore_la_SOURCES += $(SOURCES_libvlc_vlm)
252 endif
253 endif
254
255 SOURCES_libvlc_beos = \
256         misc/pthread.c \
257         $(NULL)
258
259 SOURCES_libvlc_darwin = \
260         misc/pthread.c \
261         misc/darwin_specific.c \
262         $(NULL)
263
264 SOURCES_libvlc_linux = \
265         misc/pthread.c \
266         misc/linux_specific.c \
267         $(NULL)
268
269 SOURCES_libvlc_win32 = \
270         misc/w32thread.c \
271         misc/win32_specific.c \
272         network/winsock.c \
273         $(NULL)
274
275 SOURCES_libvlc_other = \
276         misc/pthread.c \
277         misc/not_specific.c
278
279 SOURCES_libvlc_dirent = \
280         extras/dirent.c \
281         $(NULL)
282
283 SOURCES_libvlc_getopt = \
284         extras/getopt.c \
285         extras/getopt.h \
286         extras/getopt1.c \
287         $(NULL)
288
289 SOURCES_libvlc_common = \
290         libvlc.c \
291         libvlc.h \
292         libvlc-module.c \
293         missing.c \
294         version.c \
295         interface/dialog.c \
296         interface/interface.c \
297         interface/intf_eject.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/vlm_event.h \
339         input/resource.h \
340         input/resource.c \
341         input/stream.c \
342         input/stream_demux.c \
343         input/stream_filter.c \
344         input/stream_memory.c \
345         input/subtitles.c \
346         input/var.c \
347         video_output/video_output.c \
348         video_output/vout_pictures.c \
349         video_output/vout_pictures.h \
350         video_output/video_text.c \
351         video_output/video_widgets.c \
352         video_output/vout_subpictures.c \
353         video_output/vout_intf.c \
354         video_output/vout_internal.h \
355         video_output/vout_control.h \
356         audio_output/aout_internal.h \
357         audio_output/common.c \
358         audio_output/dec.c \
359         audio_output/filters.c \
360         audio_output/input.c \
361         audio_output/mixer.c \
362         audio_output/output.c \
363         audio_output/intf.c \
364         osd/osd.c \
365         osd/osd_text.c \
366         osd/osd_widgets.c \
367         network/acl.c \
368         network/getaddrinfo.c \
369         network/io.c \
370         network/tcp.c \
371         network/udp.c \
372         network/rootbind.c \
373         network/tls.c \
374         network/poll.c \
375         text/charset.c \
376         text/strings.c \
377         text/unicode.c \
378         text/filesystem.c \
379         text/wincp.c \
380         text/iso_lang.c \
381         text/iso-639_def.h \
382         misc/md5.c \
383         misc/rand.c \
384         misc/mtime.c \
385         misc/block.c \
386         misc/fourcc.c \
387         misc/es_format.c \
388         modules/modules.h \
389         modules/modules.c \
390         modules/cache.c \
391         modules/entry.c \
392         modules/os.c \
393         misc/threads.c \
394         misc/stats.c \
395         misc/cpu.c \
396         misc/action.c \
397         config/configuration.h \
398         config/core.c \
399         config/dirs.c \
400         config/chain.c \
401         config/file.c \
402         config/intf.c \
403         config/cmdline.c \
404         misc/events.c \
405         misc/image.c \
406         misc/messages.c \
407         misc/objects.c \
408         misc/variables.h \
409         misc/variables.c \
410         misc/error.c \
411         misc/update.h \
412         misc/update.c \
413         misc/xml.c \
414         misc/devices.c \
415         extras/libc.c \
416         misc/filter.c \
417         misc/filter_chain.c \
418         misc/http_auth.c \
419         $(NULL)
420
421 SOURCES_libvlc_httpd = \
422         network/httpd.c \
423         $(NULL)
424
425 SOURCES_libvlc_sout = \
426         stream_output/stream_output.c \
427         stream_output/stream_output.h \
428         stream_output/announce.c \
429         stream_output/sap.c \
430         stream_output/sdp.c \
431         $(NULL)
432
433 SOURCES_libvlc_vlm = \
434         input/vlm.c \
435         input/vlm_event.c \
436         input/vlmshell.c \
437         $(NULL)
438
439 SOURCES_libvlc = \
440         $(SOURCES_libvlc_common) \
441         $(OPT_SOURCES_libvlc_beos) \
442         $(OPT_SOURCES_libvlc_darwin) \
443         $(OPT_SOURCES_libvlc_win32) \
444         $(OPT_SOURCES_libvlc_dirent) \
445         $(OPT_SOURCES_libvlc_getopt) \
446         $(NULL)
447
448 SOURCES_libvlc_control = \
449         control/libvlc_internal.h \
450         control/event_internal.h \
451         control/media_internal.h \
452         control/media_list_internal.h \
453         control/media_list_view_internal.h \
454         control/media_player_internal.h \
455         control/core.c \
456         control/log.c \
457         control/playlist.c \
458         control/vlm.c \
459         control/video.c \
460         control/audio.c \
461         control/event.c \
462         control/event_async.c \
463         control/flat_media_list_view.c \
464         control/hierarchical_media_list_view.c \
465         control/hierarchical_node_media_list_view.c \
466         control/media.c \
467         control/media_player.c \
468         control/media_list.c \
469         control/media_list_path.h \
470         control/media_list_player.c \
471         control/media_list_view.c \
472         control/media_library.c \
473         control/mediacontrol_internal.h \
474         control/mediacontrol_core.c \
475         control/mediacontrol_util.c \
476         control/mediacontrol_audio_video.c \
477         control/media_discoverer.c
478
479 ###############################################################################
480 # GIT revision
481 ###############################################################################
482
483 BUILT_SOURCES += stamp-revision
484 CLEANFILES += revision.txt revision.c
485
486 revision.c: revision.txt
487         rm -f -- revision.c
488         echo "const char psz_vlc_changeset[] = \"$$(cat revision.txt)\";" \
489                 > revision.c
490
491 revision.txt:
492         $(MAKE) stamp-revision
493         touch revision.txt
494
495 stamp-revision:
496         rm -f -- revision.tmp
497         (git --git-dir="$(top_srcdir)/.git/" describe --tags --long \
498                 --always || echo exported) > revision.tmp
499         diff revision.tmp revision.txt >/dev/null 2>&1 || \
500         mv -f -- revision.tmp revision.txt
501
502 ###############################################################################
503 # Unit/regression test
504 ###############################################################################
505
506 dist_check_SCRIPTS = check_symbols check_headers
507 TESTS = check_symbols
508
509 check_DATA = libvlc-headers.sym libvlc-sorted.sym
510 CLEANFILES += $(check_DATA)
511
512 libvlc-sorted.sym: libvlccore.sym
513         rm -f libvlc-sorted.sym
514         sort -fdu < "$(srcdir)/libvlccore.sym" > libvlc-sorted.sym
515
516 libvlc-headers.sym:
517         rm -f libvlc-headers.sym
518         cat ${srcdir}/../include/vlc_*.h ${srcdir}/control/*.h | \
519         sed -n -e 's/^[ ]*VLC_EXPORT[ ]*([^,]*,\([^,]*\),.*/\1/p' | \
520         sed -e 's/[^a-zA-Z0-9_]*//' | \
521         sort -fdu > libvlc-headers.sym
522
523 .PHONY: libvlc-headers.sym
524
525 check-local:
526         for h in `echo $(pkginclude_HEADERS) | sed -e s,\.\./include/,,g`; \
527         do \
528                 echo grep - "#include <$$h>" $(srcdir)/test/headers.c ; \
529                 if ! grep -- "#include <$$h>" $(srcdir)/test/headers.c ; \
530                 then \
531                         echo "Header $$h not included in test/headers.c!"; \
532                         exit 1; \
533                 fi ; \
534         done
535         $(srcdir)/check_headers $(pkginclude_HEADERS)
536         $(srcdir)/check_headers $(pluginsinclude_HEADERS)
537
538 FORCE:
539         @echo "Generated source cannot be phony. Go away." >&2
540         @exit 1
541
542 .PHONY: FORCE