]> git.sesse.net Git - vlc/blob - src/Makefile.am
more libtool updates, removed some ol' crust
[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 = $(LTLIBINTL)
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         -version-info 1:0:0
114 if HAVE_COMPILER_EXPORT
115 libvlc_la_LDFLAGS += -export-dynamic
116 else
117 libvlc_la_LDFLAGS += -export-symbols $(srcdir)/libvlc.sym 
118 endif
119
120 libvlc_la_DEPENDENCIES = libvlc.sym
121
122 libvlc_control_la_SOURCES = $(SOURCES_libvlc_control)
123 libvlc_control_la_LIBADD = libvlc.la
124 libvlc_control_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc`
125 libvlc_control_la_LDFLAGS = $(AM_LDFLAGS) -version-info 0:0:0
126 if HAVE_COMPILER_EXPORT
127 libvlc_control_la_LDFLAGS += -export-dynamic
128 else
129 libvlc_control_la_LDFLAGS += -export-symbols-regex '^_?(libvlc|mediacontrol)_.*'
130 endif
131
132 EXTRA_libvlc_la_SOURCES = \
133         $(SOURCES_libvlc_beos) \
134         $(SOURCES_libvlc_darwin) \
135         $(SOURCES_libvlc_win32) \
136         $(SOURCES_libvlc_dirent) \
137         $(SOURCES_libvlc_getopt) \
138         $(NULL)
139 if HAVE_BEOS
140 libvlc_la_SOURCES += $(SOURCES_libvlc_beos)
141 endif
142 if HAVE_DARWIN
143 libvlc_la_SOURCES += $(SOURCES_libvlc_darwin)
144 endif
145 if HAVE_WIN32
146 libvlc_la_SOURCES += $(SOURCES_libvlc_win32)
147 endif
148 if HAVE_WINCE
149 libvlc_la_SOURCES += $(SOURCES_libvlc_win32)
150 endif
151 if BUILD_DIRENT
152 libvlc_la_SOURCES += $(SOURCES_libvlc_dirent)
153 endif
154 if BUILD_GETOPT
155 libvlc_la_SOURCES += $(SOURCES_libvlc_getopt)
156 endif
157
158 SOURCES_libvlc_beos = \
159         misc/beos_specific.cpp \
160         $(NULL)
161
162 SOURCES_libvlc_darwin = \
163         misc/darwin_specific.c \
164         $(NULL)
165
166 SOURCES_libvlc_win32 = \
167         misc/win32_specific.c \
168         $(NULL)
169
170 SOURCES_libvlc_dirent = \
171         extras/dirent.c \
172         $(NULL)
173
174 SOURCES_libvlc_getopt = \
175         extras/getopt.c \
176         extras/getopt.h \
177         extras/getopt1.c \
178         $(NULL)
179
180 SOURCES_libvlc_common = \
181         libvlc.c \
182         libvlc-common.c \
183         libvlc.h \
184         libvlc-module.c \
185         interface/interface.h \
186         interface/interface.c \
187         interface/intf_eject.c \
188         interface/interaction.c \
189         playlist/playlist_internal.h \
190         playlist/thread.c \
191         playlist/control.c \
192         playlist/engine.c \
193         playlist/sort.c \
194         playlist/loadsave.c \
195         playlist/tree.c \
196         playlist/item.c \
197         playlist/search.c \
198         playlist/services_discovery.c \
199         input/item.c \
200         input/access.c \
201         input/clock.c \
202         input/control.c \
203         input/decoder.c \
204         input/demux.c \
205         input/es_out.c \
206         input/input.c \
207         input/meta.c \
208         input/input_internal.h \
209         input/vlm_internal.h \
210         input/stream.c \
211         input/mem_stream.c \
212         input/subtitles.c \
213         input/var.c \
214         video_output/video_output.c \
215         video_output/vout_pictures.c \
216         video_output/vout_pictures.h \
217         video_output/video_text.c \
218         video_output/video_widgets.c \
219         video_output/vout_subpictures.c \
220         video_output/vout_synchro.c \
221         video_output/vout_intf.c \
222         audio_output/aout_internal.h \
223         audio_output/common.c \
224         audio_output/dec.c \
225         audio_output/filters.c \
226         audio_output/input.c \
227         audio_output/mixer.c \
228         audio_output/output.c \
229         audio_output/intf.c \
230         stream_output/stream_output.c \
231         stream_output/stream_output.h \
232         stream_output/announce.c \
233         stream_output/profiles.c \
234         stream_output/sap.c \
235         stream_output/sdp.c \
236         osd/osd.c \
237         osd/osd_parser.c \
238         osd/osd_text.c \
239         osd/osd_widgets.c \
240         network/acl.c \
241         network/getaddrinfo.c \
242         network/io.c \
243         network/error.c \
244         network/tcp.c \
245         network/udp.c \
246         network/httpd.c \
247         network/rootwrap.c \
248         network/tls.c \
249         network/poll.c \
250         text/charset.c \
251         text/strings.c \
252         text/unicode.c \
253         text/wincp.c \
254         text/iso_lang.c \
255         text/iso-639_def.h \
256         misc/md5.c \
257         misc/mtime.c \
258         misc/block.c \
259         modules/modules.h \
260         modules/modules.c \
261         modules/entry.c \
262         misc/threads.c \
263         misc/stats.c \
264         misc/cpu.c \
265         modules/configuration.h \
266         modules/configuration.c \
267         modules/configuration_chain.c \
268         misc/image.c \
269         misc/messages.c \
270         misc/objects.c \
271         misc/variables.h \
272         misc/variables.c \
273         misc/error.c \
274         misc/update.c \
275         input/vlm.c \
276         misc/xml.c \
277         misc/devices.c \
278         extras/libc.c \
279         $(NULL)
280
281 SOURCES_libvlc = \
282         $(SOURCES_libvlc_common) \
283         $(OPT_SOURCES_libvlc_beos) \
284         $(OPT_SOURCES_libvlc_darwin) \
285         $(OPT_SOURCES_libvlc_win32) \
286         $(OPT_SOURCES_libvlc_dirent) \
287         $(OPT_SOURCES_libvlc_getopt) \
288         $(NULL)
289
290 SOURCES_libvlc_control = \
291         control/libvlc_internal.h \
292         control/core.c \
293         control/log.c \
294         control/playlist.c \
295         control/vlm.c \
296         control/video.c \
297         control/audio.c \
298         control/event.c \
299         control/media_descriptor.c \
300         control/media_instance.c \
301         control/mediacontrol_internal.h \
302         control/mediacontrol_core.c \
303         control/mediacontrol_util.c \
304         control/mediacontrol_audio_video.c
305
306 ###############################################################################
307 # Stamp rules
308 ###############################################################################
309
310 misc/revision.c:
311         rm -f $@ $@.tmp
312         echo "/* AUTOGENERATED FILE - DO NOT EDIT */" > $@.tmp
313         REVISION="$$(LANG=C svnversion "$(top_srcdir)" 2>/dev/null || echo exported)" ; \
314         echo "const char psz_vlc_changeset[] = \"$$REVISION\";" >> $@.tmp
315         mv -f $@.tmp $@
316
317 ###############################################################################
318 # Unit/regression test
319 ###############################################################################
320 check_PROGRAMS = test_i18n_atof test_url test_utf8
321 TESTS = $(check_PROGRAMS)
322
323 CFLAGS_tests = `$(VLC_CONFIG) --cflags libvlc`
324
325 test_i18n_atof_SOURCES = test/i18n_atof.c text/charset.c
326 test_i18n_atof_CFLAGS = $(CFLAGS_tests)
327
328 test_url_SOURCES = test/url.c
329 test_url_LDADD = libvlc.la
330 test_url_CFLAGS = $(CFLAGS_tests)
331
332 test_utf8_SOURCES = test/utf8.c
333 test_utf8_LDADD = libvlc.la
334 test_utf8_CFLAGS = $(CFLAGS_tests)
335
336 FORCE:
337         @echo "Generated source cannot be phony. Go away." >&2
338         @exit 1
339
340 .PHONY: FORCE