]> git.sesse.net Git - vlc/blob - src/Makefile.am
Revert silly commit
[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 ../include/vlc_about.h
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_fixups.h \
56         ../include/vlc_httpd.h \
57         ../include/vlc_image.h \
58         ../include/vlc_input.h \
59         ../include/vlc_interface.h \
60         ../include/vlc_intf_strings.h \
61         ../include/vlc_keys.h \
62         ../include/vlc_md5.h \
63         ../include/vlc_messages.h \
64         ../include/vlc_meta.h \
65         ../include/vlc_modules.h \
66         ../include/vlc_modules_macros.h \
67         ../include/vlc_mtime.h \
68         ../include/vlc_network.h \
69         ../include/vlc_objects.h \
70         ../include/vlc_os_specific.h \
71         ../include/vlc_osd.h \
72         ../include/vlc_pgpkey.h \
73         ../include/vlc_playlist.h \
74         ../include/vlc_plugin.h \
75         ../include/vlc_rand.h \
76         ../include/vlc_services_discovery.h \
77         ../include/vlc_sout.h \
78         ../include/vlc_stream.h \
79         ../include/vlc_streaming.h \
80         ../include/vlc_strings.h \
81         ../include/vlc_threads.h \
82         ../include/vlc_threads_funcs.h \
83         ../include/vlc_tls.h \
84         ../include/vlc_update.h \
85         ../include/vlc_url.h \
86         ../include/vlc_variables.h \
87         ../include/vlc_vlm.h \
88         ../include/vlc_vod.h \
89         ../include/vlc_vout.h \
90         ../include/vlc_xml.h \
91         $(NULL)
92
93 modules/builtin.h: modules/builtin.h.in ../vlc-config Makefile.am
94         rm -f -- "$@.tmp"
95         cat "$(srcdir)/modules/builtin.h.in" > "$@.tmp"
96 if !HAVE_PLUGINS
97         plugins="$$($(VLC_CONFIG) --list plugin)" ; \
98         test -n "$${plugins}" && \
99         for p in $${plugins}; do \
100                 echo "int vlc_entry__$$p (module_t *);" ; \
101         done >> "$@.tmp"
102 endif
103         echo "#define ALLOCATE_ALL_BUILTINS() \\" >> "$@.tmp"
104         echo "    do \\" >> "$@.tmp"
105         echo "    { \\" >> "$@.tmp"
106 if !HAVE_PLUGINS
107         plugins="$$($(VLC_CONFIG) --list plugin)" ; \
108         test -n "$${plugins}" && \
109         for p in $${plugins}; do \
110                 echo "        ALLOCATE_BUILTIN($$p); \\" ; \
111         done >> "$@.tmp"
112 endif
113         echo '    } while( 0 );' >> "$@.tmp"
114         mv -f -- "$@.tmp" "$@"
115
116 modules/modules.c: modules/builtin.h
117
118 ../include/vlc_about.h: Makefile.am $(top_srcdir)/COPYING $(top_srcdir)/THANKS $(top_srcdir)/AUTHORS
119         rm -f -- "$@.tmp"
120         mkdir -p -- ../include
121         echo "/* Automatically generated file - DO NOT EDIT */" > "$@.tmp"
122         echo "static const char psz_license[] =" >> "$@.tmp"
123         cat $(top_srcdir)/COPYING | sed s/'"'/'\\"'/g | $(AWK) '{ print "\""$$0"\\n\"" }' >> "$@.tmp"
124         echo ";" >> "$@.tmp"
125         echo "static const char psz_thanks[] =" >> "$@.tmp"
126         grep -v '$$Id:'  $(top_srcdir)/THANKS | sed s/'"'/'\\"'/g | $(AWK) '{ print "\""$$0"\\n\"" }'|sed s/"<.*.> "// >> "$@.tmp"
127         echo ";" >> "$@.tmp"
128         echo "static const char psz_authors[] =" >> "$@.tmp"
129         grep N: $(top_srcdir)/AUTHORS | cut -d" " -f 2- | sed s/'"'/'\\"'/g | $(AWK) '{ print "\""$$0"\\n\"" }' >> "$@.tmp"
130         echo ";" >> "$@.tmp"
131         mv -f -- "$@.tmp" "$@"
132 ###############################################################################
133 # Building libvlc
134 ###############################################################################
135
136 nice:
137         $(top_builddir)/compile
138
139 lib_LTLIBRARIES = libvlc.la libvlc-control.la
140
141 AM_LDFLAGS = -no-undefined -no-install
142 if HAVE_WIN32
143 AM_LDFLAGS += -avoid-version
144 endif
145
146 libvlc_la_SOURCES = $(SOURCES_libvlc)
147 nodist_libvlc_la_SOURCES = misc/revision.c
148 libvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc`
149 libvlc_la_CXXFLAGS = `$(VLC_CONFIG) --cxxflags libvlc`
150 libvlc_la_OBJCFLAGS = `$(VLC_CONFIG) --objcflags libvlc`
151 libvlc_la_LDFLAGS = `$(VLC_CONFIG) --ldflags libvlc` $(AM_LDFLAGS) \
152         -version-info 1:0:0
153 if HAVE_COMPILER_EXPORT
154 libvlc_la_LDFLAGS += -export-dynamic
155 else
156 libvlc_la_LDFLAGS += -export-symbols $(srcdir)/libvlc.sym 
157 endif
158 libvlc_la_LIBADD = `$(VLC_CONFIG) -libs libvlc` $(AM_LIBADD) $(LTLIBINTL)
159
160 libvlc_la_DEPENDENCIES = libvlc.sym
161
162 libvlc_control_la_SOURCES = $(SOURCES_libvlc_control)
163 libvlc_control_la_LIBADD = libvlc.la
164 libvlc_control_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc`
165 libvlc_control_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:0:0
166 if HAVE_COMPILER_EXPORT
167 libvlc_control_la_LDFLAGS += -export-dynamic
168 else
169 libvlc_control_la_LDFLAGS += -export-symbols-regex '^_?(libvlc|mediacontrol)_.*'
170 endif
171
172 EXTRA_libvlc_la_SOURCES = \
173         $(SOURCES_libvlc_beos) \
174         $(SOURCES_libvlc_darwin) \
175         $(SOURCES_libvlc_win32) \
176         $(SOURCES_libvlc_dirent) \
177         $(SOURCES_libvlc_getopt) \
178         $(NULL)
179 if HAVE_BEOS
180 libvlc_la_SOURCES += $(SOURCES_libvlc_beos)
181 endif
182 if HAVE_DARWIN
183 libvlc_la_SOURCES += $(SOURCES_libvlc_darwin)
184 endif
185 if HAVE_WIN32
186 libvlc_la_SOURCES += $(SOURCES_libvlc_win32)
187 endif
188 if HAVE_WINCE
189 libvlc_la_SOURCES += $(SOURCES_libvlc_win32)
190 endif
191 if BUILD_DIRENT
192 libvlc_la_SOURCES += $(SOURCES_libvlc_dirent)
193 endif
194 if BUILD_GETOPT
195 libvlc_la_SOURCES += $(SOURCES_libvlc_getopt)
196 endif
197
198 SOURCES_libvlc_beos = \
199         misc/beos_specific.cpp \
200         $(NULL)
201
202 SOURCES_libvlc_darwin = \
203         misc/darwin_specific.c \
204         $(NULL)
205
206 SOURCES_libvlc_win32 = \
207         misc/win32_specific.c \
208         $(NULL)
209
210 SOURCES_libvlc_dirent = \
211         extras/dirent.c \
212         $(NULL)
213
214 SOURCES_libvlc_getopt = \
215         extras/getopt.c \
216         extras/getopt.h \
217         extras/getopt1.c \
218         $(NULL)
219
220 SOURCES_libvlc_common = \
221         libvlc.c \
222         libvlc-common.c \
223         libvlc.h \
224         libvlc-module.c \
225         interface/interface.h \
226         interface/interface.c \
227         interface/intf_eject.c \
228         interface/interaction.c \
229         playlist/playlist_internal.h \
230         playlist/thread.c \
231         playlist/control.c \
232         playlist/engine.c \
233         playlist/sort.c \
234         playlist/loadsave.c \
235         playlist/tree.c \
236         playlist/item.c \
237         playlist/search.c \
238         playlist/services_discovery.c \
239         input/item.c \
240         input/access.c \
241         input/clock.c \
242         input/control.c \
243         input/decoder.c \
244         input/decoder_synchro.c \
245         input/demux.c \
246         input/es_out.c \
247         input/input.c \
248         input/meta.c \
249         input/input_internal.h \
250         input/vlm_internal.h \
251         input/stream.c \
252         input/mem_stream.c \
253         input/subtitles.c \
254         input/var.c \
255         video_output/video_output.c \
256         video_output/vout_pictures.c \
257         video_output/vout_pictures.h \
258         video_output/video_text.c \
259         video_output/video_widgets.c \
260         video_output/vout_subpictures.c \
261         video_output/vout_intf.c \
262         audio_output/aout_internal.h \
263         audio_output/common.c \
264         audio_output/dec.c \
265         audio_output/filters.c \
266         audio_output/input.c \
267         audio_output/mixer.c \
268         audio_output/output.c \
269         audio_output/intf.c \
270         stream_output/stream_output.c \
271         stream_output/stream_output.h \
272         stream_output/announce.c \
273         stream_output/profiles.c \
274         stream_output/sap.c \
275         stream_output/sdp.c \
276         osd/osd.c \
277         osd/osd_text.c \
278         osd/osd_widgets.c \
279         network/acl.c \
280         network/getaddrinfo.c \
281         network/io.c \
282         network/error.c \
283         network/tcp.c \
284         network/udp.c \
285         network/httpd.c \
286         network/rootwrap.c \
287         network/tls.c \
288         network/poll.c \
289         text/charset.c \
290         text/strings.c \
291         text/unicode.c \
292         text/wincp.c \
293         text/iso_lang.c \
294         text/iso-639_def.h \
295         misc/md5.c \
296         misc/rand.c \
297         misc/mtime.c \
298         misc/block.c \
299         modules/modules.h \
300         modules/modules.c \
301         modules/cache.c \
302         modules/entry.c \
303         modules/os.c \
304         misc/threads.c \
305         misc/stats.c \
306         misc/cpu.c \
307         config/configuration.h \
308         config/core.c \
309         config/chain.c \
310         config/file.c \
311         config/intf.c \
312         config/cmdline.c \
313         misc/events.c \
314         misc/image.c \
315         misc/messages.c \
316         misc/objects.c \
317         misc/variables.h \
318         misc/variables.c \
319         misc/error.c \
320         misc/update.c \
321         input/vlm.c \
322         misc/xml.c \
323         misc/devices.c \
324         extras/libc.c \
325         $(NULL)
326
327 SOURCES_libvlc = \
328         $(SOURCES_libvlc_common) \
329         $(OPT_SOURCES_libvlc_beos) \
330         $(OPT_SOURCES_libvlc_darwin) \
331         $(OPT_SOURCES_libvlc_win32) \
332         $(OPT_SOURCES_libvlc_dirent) \
333         $(OPT_SOURCES_libvlc_getopt) \
334         $(NULL)
335
336 SOURCES_libvlc_control = \
337         control/libvlc_internal.h \
338         control/core.c \
339         control/log.c \
340         control/playlist.c \
341         control/vlm.c \
342         control/video.c \
343         control/audio.c \
344         control/dynamic_media_list.c \
345         control/event.c \
346         control/flat_media_list_view.c \
347         control/hierarchical_media_list_view.c \
348         control/hierarchical_node_media_list_view.c \
349         control/media_descriptor.c \
350         control/media_instance.c \
351         control/media_list.c \
352         control/media_list_path.h \
353         control/media_list_player.c \
354         control/media_list_view.c \
355         control/media_library.c \
356         control/mediacontrol_internal.h \
357         control/mediacontrol_core.c \
358         control/mediacontrol_util.c \
359         control/mediacontrol_audio_video.c \
360         control/media_discoverer.c \
361         control/tag_query.c
362
363 ###############################################################################
364 # Stamp rules
365 ###############################################################################
366
367 misc/revision.c:
368         rm -f $@ $@.tmp
369         echo "/* AUTOGENERATED FILE - DO NOT EDIT */" > $@.tmp
370         REVISION="$$(LANG=C svnversion "$(top_srcdir)" 2>/dev/null || echo exported)" ; \
371         echo "const char psz_vlc_changeset[] = \"$$REVISION\";" >> $@.tmp
372         mv -f $@.tmp $@
373
374 ###############################################################################
375 # Unit/regression test
376 ###############################################################################
377 check_PROGRAMS = \
378         test_i18n_atof \
379         test_url \
380         test_utf8 \
381         test_headers \
382         test_control \
383         $(NULL)
384
385 dist_check_SCRIPTS = check_symbols
386 TESTS = $(check_PROGRAMS) $(dist_check_SCRIPTS)
387
388 CFLAGS_tests = `$(VLC_CONFIG) --cflags libvlc`
389
390 test_i18n_atof_SOURCES = test/i18n_atof.c text/charset.c
391 test_i18n_atof_LDADD = libvlc.la
392 test_i18n_atof_CFLAGS = $(CFLAGS_tests)
393
394 test_url_SOURCES = test/url.c
395 test_url_LDADD = libvlc.la
396 test_url_CFLAGS = $(CFLAGS_tests)
397
398 test_utf8_SOURCES = test/utf8.c
399 test_utf8_LDADD = libvlc.la
400 test_utf8_CFLAGS = $(CFLAGS_tests)
401
402 test_headers_SOURCES = test/headers.c
403 test_headers_CFLAGS = $(CFLAGS_tests)
404
405 test_control_SOURCES = control/testapi.c
406 test_control_LDADD = libvlc-control.la
407 test_control_CFLAGS = $(CFLAGS_tests)
408
409 check-local:
410         for h in `echo $(dist_pkginclude_HEADERS) $(pkginclude_HEADERS) | sed -e s,\.\./include/,,g`; \
411         do \
412                 echo grep - "#include <$$h>" $(srcdir)/test/headers.c ; \
413                 if ! grep -- "#include <$$h>" $(srcdir)/test/headers.c ; \
414                 then \
415                         echo "Header $$h not included in test/headers.c!"; \
416                         exit 1; \
417                 fi ; \
418         done
419
420 FORCE:
421         @echo "Generated source cannot be phony. Go away." >&2
422         @exit 1
423
424 .PHONY: FORCE