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