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