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