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