]> git.sesse.net Git - vlc/blob - src/Makefile.am
The current libvlc-control ABI is not compatible with the 0.8.6 one. Change SONAME.
[vlc] / src / Makefile.am
1 ###############################################################################
2 # Automake targets and declarations
3 ###############################################################################
4
5 AUTOMAKE_OPTIONS = subdir-objects
6
7 NULL =
8 EXTRA_DIST = extras/COPYING modules/builtin.h.in libvlc.sym
9
10 BUILT_SOURCES = modules/builtin.h misc/revision.c
11 CLEANFILES = $(BUILT_SOURCES)
12
13 ###############################################################################
14 # Headers
15 ###############################################################################
16
17 pkgincludedir = $(includedir)/vlc
18
19 dist_pkginclude_HEADERS = \
20         ../include/vlc/vlc.h \
21         ../include/vlc/libvlc.h \
22         ../include/vlc/libvlc_structures.h \
23         ../include/vlc/mediacontrol.h \
24         ../include/vlc/mediacontrol_structures.h \
25         $(NULL)
26
27 noinst_HEADERS = $(HEADERS_include)
28
29 HEADERS_include = \
30         ../include/iso_lang.h \
31         ../include/main.h \
32         ../include/mmx.h \
33         ../include/vlc_access.h \
34         ../include/vlc_acl.h \
35         ../include/vlc_aout.h \
36         ../include/vlc_arrays.h \
37         ../include/vlc_bits.h \
38         ../include/vlc_block.h \
39         ../include/vlc_block_helper.h \
40         ../include/vlc_charset.h \
41         ../include/vlc_codec.h \
42         ../include/vlc_codec_synchro.h \
43         ../include/vlc_codecs.h \
44         ../include/vlc_common.h \
45         ../include/vlc_config.h \
46         ../include/vlc_config_cat.h \
47         ../include/vlc_configuration.h \
48         ../include/vlc_demux.h \
49         ../include/vlc_devices.h \
50         ../include/vlc_epg.h \
51         ../include/vlc_es.h \
52         ../include/vlc_es_out.h \
53         ../include/vlc_events.h \
54         ../include/vlc_filter.h \
55         ../include/vlc_httpd.h \
56         ../include/vlc_image.h \
57         ../include/vlc_input.h \
58         ../include/vlc_interface.h \
59         ../include/vlc_intf_strings.h \
60         ../include/vlc_keys.h \
61         ../include/vlc_md5.h \
62         ../include/vlc_messages.h \
63         ../include/vlc_meta.h \
64         ../include/vlc_modules.h \
65         ../include/vlc_modules_macros.h \
66         ../include/vlc_mtime.h \
67         ../include/vlc_network.h \
68         ../include/vlc_objects.h \
69         ../include/vlc_os_specific.h \
70         ../include/vlc_osd.h \
71         ../include/vlc_playlist.h \
72         ../include/vlc_rand.h \
73         ../include/vlc_services_discovery.h \
74         ../include/vlc_sout.h \
75         ../include/vlc_stream.h \
76         ../include/vlc_streaming.h \
77         ../include/vlc_strings.h \
78         ../include/vlc_threads.h \
79         ../include/vlc_threads_funcs.h \
80         ../include/vlc_tls.h \
81         ../include/vlc_update.h \
82         ../include/vlc_url.h \
83         ../include/vlc_variables.h \
84         ../include/vlc_vlm.h \
85         ../include/vlc_vod.h \
86         ../include/vlc_vout.h \
87         ../include/vlc_xml.h \
88         $(NULL)
89
90 modules/builtin.h: modules/builtin.h.in ../vlc-config Makefile.am
91         rm -f -- "$@.tmp"
92         cat "$(srcdir)/modules/builtin.h.in" > "$@.tmp"
93 if !HAVE_PLUGINS
94         plugins="$$($(VLC_CONFIG) --list plugin)" ; \
95         test -n "$${plugins}" && \
96         for p in $${plugins}; do \
97                 echo "int vlc_entry__$$p (module_t *);" ; \
98         done >> "$@.tmp"
99 endif
100         echo "#define ALLOCATE_ALL_BUILTINS() \\" >> "$@.tmp"
101         echo "    do \\" >> "$@.tmp"
102         echo "    { \\" >> "$@.tmp"
103 if !HAVE_PLUGINS
104         plugins="$$($(VLC_CONFIG) --list plugin)" ; \
105         test -n "$${plugins}" && \
106         for p in $${plugins}; do \
107                 echo "        ALLOCATE_BUILTIN($$p); \\" ; \
108         done >> "$@.tmp"
109 endif
110         echo '    } while( 0 );' >> "$@.tmp"
111         mv -f -- "$@.tmp" "$@"
112
113 modules/modules.c: modules/builtin.h
114
115 ###############################################################################
116 # Building libvlc
117 ###############################################################################
118
119 nice:
120         $(top_builddir)/compile
121
122 lib_LTLIBRARIES = libvlc.la libvlc-control.la
123
124 AM_LDFLAGS = -no-undefined -no-install
125 if HAVE_WIN32
126 AM_LDFLAGS += -avoid-version
127 endif
128
129 libvlc_la_SOURCES = $(SOURCES_libvlc)
130 nodist_libvlc_la_SOURCES = misc/revision.c
131 libvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc`
132 libvlc_la_CXXFLAGS = `$(VLC_CONFIG) --cxxflags libvlc`
133 libvlc_la_OBJCFLAGS = `$(VLC_CONFIG) --objcflags libvlc`
134 libvlc_la_LDFLAGS = `$(VLC_CONFIG) --ldflags libvlc` $(AM_LDFLAGS) \
135         -version-info 1:0:0
136 if HAVE_COMPILER_EXPORT
137 libvlc_la_LDFLAGS += -export-dynamic
138 else
139 libvlc_la_LDFLAGS += -export-symbols $(srcdir)/libvlc.sym 
140 endif
141 libvlc_la_LIBADD = `$(VLC_CONFIG) -libs libvlc` $(AM_LIBADD) $(LTLIBINTL)
142
143 libvlc_la_DEPENDENCIES = libvlc.sym
144
145 libvlc_control_la_SOURCES = $(SOURCES_libvlc_control)
146 libvlc_control_la_LIBADD = libvlc.la
147 libvlc_control_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc`
148 libvlc_control_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:0:0
149 if HAVE_COMPILER_EXPORT
150 libvlc_control_la_LDFLAGS += -export-dynamic
151 else
152 libvlc_control_la_LDFLAGS += -export-symbols-regex '^_?(libvlc|mediacontrol)_.*'
153 endif
154
155 EXTRA_libvlc_la_SOURCES = \
156         $(SOURCES_libvlc_beos) \
157         $(SOURCES_libvlc_darwin) \
158         $(SOURCES_libvlc_win32) \
159         $(SOURCES_libvlc_dirent) \
160         $(SOURCES_libvlc_getopt) \
161         $(NULL)
162 if HAVE_BEOS
163 libvlc_la_SOURCES += $(SOURCES_libvlc_beos)
164 endif
165 if HAVE_DARWIN
166 libvlc_la_SOURCES += $(SOURCES_libvlc_darwin)
167 endif
168 if HAVE_WIN32
169 libvlc_la_SOURCES += $(SOURCES_libvlc_win32)
170 endif
171 if HAVE_WINCE
172 libvlc_la_SOURCES += $(SOURCES_libvlc_win32)
173 endif
174 if BUILD_DIRENT
175 libvlc_la_SOURCES += $(SOURCES_libvlc_dirent)
176 endif
177 if BUILD_GETOPT
178 libvlc_la_SOURCES += $(SOURCES_libvlc_getopt)
179 endif
180
181 SOURCES_libvlc_beos = \
182         misc/beos_specific.cpp \
183         $(NULL)
184
185 SOURCES_libvlc_darwin = \
186         misc/darwin_specific.c \
187         $(NULL)
188
189 SOURCES_libvlc_win32 = \
190         misc/win32_specific.c \
191         $(NULL)
192
193 SOURCES_libvlc_dirent = \
194         extras/dirent.c \
195         $(NULL)
196
197 SOURCES_libvlc_getopt = \
198         extras/getopt.c \
199         extras/getopt.h \
200         extras/getopt1.c \
201         $(NULL)
202
203 SOURCES_libvlc_common = \
204         libvlc.c \
205         libvlc-common.c \
206         libvlc.h \
207         libvlc-module.c \
208         interface/interface.h \
209         interface/interface.c \
210         interface/intf_eject.c \
211         interface/interaction.c \
212         playlist/playlist_internal.h \
213         playlist/thread.c \
214         playlist/control.c \
215         playlist/engine.c \
216         playlist/sort.c \
217         playlist/loadsave.c \
218         playlist/tree.c \
219         playlist/item.c \
220         playlist/search.c \
221         playlist/services_discovery.c \
222         input/item.c \
223         input/access.c \
224         input/clock.c \
225         input/control.c \
226         input/decoder.c \
227         input/decoder_synchro.c \
228         input/demux.c \
229         input/es_out.c \
230         input/input.c \
231         input/meta.c \
232         input/input_internal.h \
233         input/vlm_internal.h \
234         input/stream.c \
235         input/mem_stream.c \
236         input/subtitles.c \
237         input/var.c \
238         video_output/video_output.c \
239         video_output/vout_pictures.c \
240         video_output/vout_pictures.h \
241         video_output/video_text.c \
242         video_output/video_widgets.c \
243         video_output/vout_subpictures.c \
244         video_output/vout_intf.c \
245         audio_output/aout_internal.h \
246         audio_output/common.c \
247         audio_output/dec.c \
248         audio_output/filters.c \
249         audio_output/input.c \
250         audio_output/mixer.c \
251         audio_output/output.c \
252         audio_output/intf.c \
253         stream_output/stream_output.c \
254         stream_output/stream_output.h \
255         stream_output/announce.c \
256         stream_output/profiles.c \
257         stream_output/sap.c \
258         stream_output/sdp.c \
259         osd/osd.c \
260         osd/osd_parser.c \
261         osd/osd_text.c \
262         osd/osd_widgets.c \
263         network/acl.c \
264         network/getaddrinfo.c \
265         network/io.c \
266         network/error.c \
267         network/tcp.c \
268         network/udp.c \
269         network/httpd.c \
270         network/rootwrap.c \
271         network/tls.c \
272         network/poll.c \
273         text/charset.c \
274         text/strings.c \
275         text/unicode.c \
276         text/wincp.c \
277         text/iso_lang.c \
278         text/iso-639_def.h \
279         misc/md5.c \
280         misc/rand.c \
281         misc/mtime.c \
282         misc/block.c \
283         modules/modules.h \
284         modules/modules.c \
285         modules/entry.c \
286         misc/threads.c \
287         misc/stats.c \
288         misc/cpu.c \
289         modules/configuration.h \
290         modules/configuration.c \
291         modules/configuration_chain.c \
292         misc/events.c \
293         misc/image.c \
294         misc/messages.c \
295         misc/objects.c \
296         misc/variables.h \
297         misc/variables.c \
298         misc/error.c \
299         misc/update.c \
300         input/vlm.c \
301         misc/xml.c \
302         misc/devices.c \
303         extras/libc.c \
304         $(NULL)
305
306 SOURCES_libvlc = \
307         $(SOURCES_libvlc_common) \
308         $(OPT_SOURCES_libvlc_beos) \
309         $(OPT_SOURCES_libvlc_darwin) \
310         $(OPT_SOURCES_libvlc_win32) \
311         $(OPT_SOURCES_libvlc_dirent) \
312         $(OPT_SOURCES_libvlc_getopt) \
313         $(NULL)
314
315 SOURCES_libvlc_control = \
316         control/libvlc_internal.h \
317         control/core.c \
318         control/log.c \
319         control/playlist.c \
320         control/vlm.c \
321         control/video.c \
322         control/audio.c \
323         control/dynamic_media_list.c \
324         control/event.c \
325         control/flat_media_list_view.c \
326         control/media_descriptor.c \
327         control/media_instance.c \
328         control/media_list.c \
329         control/media_list_path.h \
330         control/media_list_player.c \
331         control/media_list_view.c \
332         control/media_library.c \
333         control/mediacontrol_internal.h \
334         control/mediacontrol_core.c \
335         control/mediacontrol_util.c \
336         control/mediacontrol_audio_video.c \
337         control/media_discoverer.c \
338         control/tag_query.c
339
340 ###############################################################################
341 # Stamp rules
342 ###############################################################################
343
344 misc/revision.c:
345         rm -f $@ $@.tmp
346         echo "/* AUTOGENERATED FILE - DO NOT EDIT */" > $@.tmp
347         REVISION="$$(LANG=C svnversion "$(top_srcdir)" 2>/dev/null || echo exported)" ; \
348         echo "const char psz_vlc_changeset[] = \"$$REVISION\";" >> $@.tmp
349         mv -f $@.tmp $@
350
351 ###############################################################################
352 # Unit/regression test
353 ###############################################################################
354 check_PROGRAMS = test_i18n_atof test_url test_utf8
355 TESTS = $(check_PROGRAMS)
356
357 CFLAGS_tests = `$(VLC_CONFIG) --cflags libvlc`
358
359 test_i18n_atof_SOURCES = test/i18n_atof.c text/charset.c
360 test_i18n_atof_CFLAGS = $(CFLAGS_tests)
361
362 test_url_SOURCES = test/url.c
363 test_url_LDADD = libvlc.la
364 test_url_CFLAGS = $(CFLAGS_tests)
365
366 test_utf8_SOURCES = test/utf8.c
367 test_utf8_LDADD = libvlc.la
368 test_utf8_CFLAGS = $(CFLAGS_tests)
369
370 FORCE:
371         @echo "Generated source cannot be phony. Go away." >&2
372         @exit 1
373
374 .PHONY: FORCE