]> git.sesse.net Git - vlc/blob - src/Makefile.am
Merge branch '1.0'
[vlc] / src / Makefile.am
1 ###############################################################################
2 # Automake targets and declarations
3 ###############################################################################
4
5 AUTOMAKE_OPTIONS = subdir-objects
6 SUBDIRS = . test
7
8 NULL =
9 EXTRA_DIST = extras/COPYING \
10         misc/beos_specific.cpp \
11         libvlc.pc.in \
12         vlc-plugin.pc.in \
13         libvlc.sym \
14         libvlccore.sym
15
16 BUILT_SOURCES = ../include/vlc_about.h
17 CLEANFILES = $(BUILT_SOURCES)
18
19 SUFFIXES = .pc.in .pc
20
21 ###############################################################################
22 # Headers
23 ###############################################################################
24
25 pluginsincludedir = $(pkgincludedir)/plugins
26
27 pkginclude_HEADERS = \
28         ../include/vlc/vlc.h \
29         ../include/vlc/deprecated.h \
30         ../include/vlc/libvlc.h \
31         ../include/vlc/libvlc_events.h \
32         ../include/vlc/libvlc_media_list.h \
33         ../include/vlc/libvlc_media.h \
34         ../include/vlc/libvlc_media_discoverer.h \
35         ../include/vlc/libvlc_media_library.h \
36         ../include/vlc/libvlc_media_list.h \
37         ../include/vlc/libvlc_media_list_player.h \
38         ../include/vlc/libvlc_media_list_view.h \
39         ../include/vlc/libvlc_media_player.h \
40         ../include/vlc/libvlc_structures.h \
41         ../include/vlc/libvlc_vlm.h \
42         ../include/vlc/mediacontrol.h \
43         ../include/vlc/mediacontrol_structures.h \
44         $(NULL)
45
46 pluginsinclude_HEADERS = \
47         ../include/vlc_access.h \
48         ../include/vlc_acl.h \
49         ../include/vlc_aout.h \
50         ../include/vlc_arrays.h \
51         ../include/vlc_avcodec.h \
52         ../include/vlc_bits.h \
53         ../include/vlc_block.h \
54         ../include/vlc_block_helper.h \
55         ../include/vlc_charset.h \
56         ../include/vlc_codec.h \
57         ../include/vlc_common.h \
58         ../include/vlc_config.h \
59         ../include/vlc_config_cat.h \
60         ../include/vlc_configuration.h \
61         ../include/vlc_dialog.h \
62         ../include/vlc_demux.h \
63         ../include/vlc_epg.h \
64         ../include/vlc_es.h \
65         ../include/vlc_es_out.h \
66         ../include/vlc_events.h \
67         ../include/vlc_filter.h \
68         ../include/vlc_fourcc.h \
69         ../include/vlc_gcrypt.h \
70         ../include/vlc_httpd.h \
71         ../include/vlc_image.h \
72         ../include/vlc_input.h \
73         ../include/vlc_input_item.h \
74         ../include/vlc_main.h \
75         ../include/vlc_md5.h \
76         ../include/vlc_messages.h \
77         ../include/vlc_meta.h \
78         ../include/vlc_modules.h \
79         ../include/vlc_mtime.h \
80         ../include/vlc_objects.h \
81         ../include/vlc_picture.h \
82         ../include/vlc_playlist.h \
83         ../include/vlc_plugin.h \
84         ../include/vlc_rand.h \
85         ../include/vlc_services_discovery.h \
86         ../include/vlc_sout.h \
87         ../include/vlc_stream.h \
88         ../include/vlc_strings.h \
89         ../include/vlc_subpicture.h \
90         ../include/vlc_threads.h \
91         ../include/vlc_url.h \
92         ../include/vlc_variables.h \
93         ../include/vlc_vlm.h \
94         ../include/vlc_vout.h \
95         ../include/vlc_window.h \
96         ../include/vlc_xml.h \
97         $(NULL)
98
99 noinst_HEADERS = \
100         ../include/mmx.h \
101         ../include/vlc_codec_synchro.h \
102         ../include/vlc_codecs.h \
103         ../include/vlc_devices.h \
104         ../include/vlc_fixups.h \
105         ../include/vlc_interface.h \
106         ../include/vlc_intf_strings.h \
107         ../include/vlc_iso_lang.h \
108         ../include/vlc_keys.h \
109         ../include/vlc_network.h \
110         ../include/vlc_osd.h \
111         ../include/vlc_pgpkey.h \
112         ../include/vlc_tls.h \
113         ../include/vlc_update.h \
114         ../include/vlc_vod.h \
115         $(NULL)
116
117 ../include/vlc_about.h: Makefile.am $(top_srcdir)/COPYING $(top_srcdir)/THANKS $(top_srcdir)/AUTHORS
118         rm -f -- "$@.tmp"
119         mkdir -p -- ../include
120         echo "/* Automatically generated file - DO NOT EDIT */" > "$@.tmp"
121         echo "static const char psz_license[] =" >> "$@.tmp"
122         cat $(top_srcdir)/COPYING | sed s/'"'/'\\"'/g | $(AWK) '{ print "\""$$0"\\n\"" }' >> "$@.tmp"
123         echo ";" >> "$@.tmp"
124         echo "static const char psz_thanks[] =" >> "$@.tmp"
125         grep -v '$$Id:'  $(top_srcdir)/THANKS | sed s/'"'/'\\"'/g | $(AWK) '{ print "\""$$0"\\n\"" }'|sed s/"<.*.> "// >> "$@.tmp"
126         echo ";" >> "$@.tmp"
127         echo "static const char psz_authors[] =" >> "$@.tmp"
128         grep N: $(top_srcdir)/AUTHORS | cut -d" " -f 2- | sed s/'"'/'\\"'/g | $(AWK) '{ print "\""$$0"\\n\"" }' >> "$@.tmp"
129         echo ";" >> "$@.tmp"
130         mv -f -- "$@.tmp" "$@"
131
132 ###############################################################################
133 # pkg-config integration
134 ###############################################################################
135
136 pkgconfigdir = $(libdir)/pkgconfig
137 pkgconfig_DATA = libvlc.pc vlc-plugin.pc
138 CLEANFILES += $(pkgconfig_DATA)
139
140 .pc.in.pc: $(top_builddir)/config.status
141         cd "$(top_builddir)" && \
142         $(SHELL) ./config.status --file="src/$@"
143
144 ###############################################################################
145 # Building libvlc
146 ###############################################################################
147
148 nice:
149         $(top_builddir)/compile
150
151 lib_LTLIBRARIES = libvlccore.la libvlc.la
152
153 AM_LDFLAGS = -no-undefined
154 if HAVE_WIN32
155 AM_LDFLAGS += -avoid-version
156 endif
157 if HAVE_WINCE
158 AM_LDFLAGS += -avoid-version
159 endif
160
161 libvlccore_la_SOURCES = $(SOURCES_libvlc)
162 libvlccore_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlccore` \
163         -DMODULE_STRING=\"main\" \
164         -DLOCALEDIR=\"$(localedir)\" \
165         -DSYSCONFDIR=\"$(sysconfdir)\" \
166         -DDATA_PATH=\"$(vlcdatadir)\" \
167         -DLIBDIR=\"$(libdir)\" \
168         -DPLUGIN_PATH=\"$(vlclibdir)\"
169 libvlccore_la_LDFLAGS = `$(VLC_CONFIG) --ldflags libvlccore` $(AM_LDFLAGS) \
170         -no-undefined \
171         -export-symbols $(srcdir)/libvlccore.sym \
172         -version-info 3:0:0
173 libvlccore_la_LIBADD = `$(VLC_CONFIG) -libs libvlccore` $(AM_LIBADD) \
174         $(LTLIBINTL) ../compat/libcompat.la
175 libvlccore_la_DEPENDENCIES = libvlccore.sym
176 if HAVE_WIN32
177 libvlccore_la_DEPENDENCIES += libvlc_win32_rc.$(OBJEXT)
178 libvlccore_la_LDFLAGS += -Wl,libvlc_win32_rc.$(OBJEXT)
179 endif
180
181 libvlc_win32_rc.$(OBJEXT): $(top_builddir)/share/libvlc_win32_rc.rc
182         $(WINDRES) --include-dir $(top_srcdir)/share -i $< -o $@
183
184 libvlc_la_SOURCES = $(SOURCES_libvlc_control)
185 libvlc_la_LIBADD = `$(VLC_CONFIG) -libs libvlc` \
186         libvlccore.la ../compat/libcompat.la
187 libvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc`
188 libvlc_la_LDFLAGS = $(AM_LDFLAGS) `$(VLC_CONFIG) --ldflags libvlc` \
189         -version-info 5:0:0 \
190         -export-symbols $(srcdir)/libvlc.sym
191 libvlc_la_DEPENDENCIES = libvlc.sym libvlccore.la
192 if HAVE_WIN32
193 libvlc_la_DEPENDENCIES += $(DATA_win32_rc_lib)
194 libvlc_la_LDFLAGS += -Wl,$(DATA_win32_rc_lib)
195 endif
196
197
198 EXTRA_libvlccore_la_SOURCES = \
199         $(SOURCES_libvlc_beos) \
200         $(SOURCES_libvlc_darwin) \
201         $(SOURCES_libvlc_linux) \
202         $(SOURCES_libvlc_win32) \
203         $(SOURCES_libvlc_other) \
204         $(SOURCES_libvlc_dirent) \
205         $(SOURCES_libvlc_getopt) \
206         $(SOURCES_libvlc_httpd) \
207         $(SOURCES_libvlc_sout) \
208         $(SOURCES_libvlc_vlm) \
209         $(NULL)
210 if HAVE_BEOS
211 libvlccore_la_SOURCES += $(SOURCES_libvlc_beos)
212 else
213 if HAVE_DARWIN
214 libvlccore_la_SOURCES += $(SOURCES_libvlc_darwin)
215 else
216 if HAVE_LINUX
217 libvlccore_la_SOURCES += $(SOURCES_libvlc_linux)
218 else
219 if HAVE_WIN32
220 libvlccore_la_SOURCES += $(SOURCES_libvlc_win32)
221 else
222 if HAVE_WINCE
223 libvlccore_la_SOURCES += $(SOURCES_libvlc_win32)
224 else
225 libvlccore_la_SOURCES += $(SOURCES_libvlc_other)
226 endif
227 endif
228 endif
229 endif
230 endif
231 if BUILD_DIRENT
232 libvlccore_la_SOURCES += $(SOURCES_libvlc_dirent)
233 endif
234 if BUILD_GETOPT
235 libvlccore_la_SOURCES += $(SOURCES_libvlc_getopt)
236 endif
237 if BUILD_HTTPD
238 libvlccore_la_SOURCES += $(SOURCES_libvlc_httpd)
239 endif
240 if ENABLE_SOUT
241 libvlccore_la_SOURCES += $(SOURCES_libvlc_sout)
242 if ENABLE_VLM
243 libvlccore_la_SOURCES += $(SOURCES_libvlc_vlm)
244 endif
245 endif
246
247 SOURCES_libvlc_beos = \
248         misc/pthread.c \
249         $(NULL)
250
251 SOURCES_libvlc_darwin = \
252         misc/pthread.c \
253         misc/darwin_specific.c \
254         $(NULL)
255
256 SOURCES_libvlc_linux = \
257         misc/pthread.c \
258         misc/linux_specific.c \
259         $(NULL)
260
261 SOURCES_libvlc_win32 = \
262         misc/w32thread.c \
263         misc/win32_specific.c \
264         network/winsock.c \
265         $(NULL)
266
267 SOURCES_libvlc_other = \
268         misc/pthread.c \
269         misc/not_specific.c
270
271 SOURCES_libvlc_dirent = \
272         extras/dirent.c \
273         $(NULL)
274
275 SOURCES_libvlc_getopt = \
276         extras/getopt.c \
277         extras/getopt.h \
278         extras/getopt1.c \
279         $(NULL)
280
281 SOURCES_libvlc_common = \
282         libvlc.c \
283         libvlc.h \
284         libvlc-module.c \
285         missing.c \
286         version.c \
287         interface/dialog.c \
288         interface/interface.c \
289         interface/intf_eject.c \
290         playlist/playlist_internal.h \
291         playlist/art.c \
292         playlist/art.h \
293         playlist/thread.c \
294         playlist/control.c \
295         playlist/engine.c \
296         playlist/fetcher.c \
297         playlist/fetcher.h \
298         playlist/sort.c \
299         playlist/loadsave.c \
300         playlist/preparser.c \
301         playlist/preparser.h \
302         playlist/tree.c \
303         playlist/item.c \
304         playlist/search.c \
305         playlist/services_discovery.c \
306         input/item.c \
307         input/access.c \
308         input/clock.c \
309         input/control.c \
310         input/decoder.c \
311         input/decoder_synchro.c \
312         input/demux.c \
313         input/es_out.c \
314         input/es_out_timeshift.c \
315         input/event.c \
316         input/input.c \
317         input/meta.c \
318         input/access.h \
319         input/clock.h \
320         input/decoder.h \
321         input/demux.h \
322         input/es_out.h \
323         input/es_out_timeshift.h \
324         input/event.h \
325         input/item.h \
326         input/stream.h \
327         input/input_internal.h \
328         input/input_interface.h \
329         input/vlm_internal.h \
330         input/vlm_event.h \
331         input/resource.h \
332         input/resource.c \
333         input/stream.c \
334         input/stream_demux.c \
335         input/stream_filter.c \
336         input/stream_memory.c \
337         input/subtitles.c \
338         input/var.c \
339         video_output/video_output.c \
340         video_output/vout_pictures.c \
341         video_output/vout_pictures.h \
342         video_output/video_text.c \
343         video_output/video_widgets.c \
344         video_output/vout_subpictures.c \
345         video_output/vout_intf.c \
346         video_output/vout_internal.h \
347         video_output/vout_control.h \
348         audio_output/aout_internal.h \
349         audio_output/common.c \
350         audio_output/dec.c \
351         audio_output/filters.c \
352         audio_output/input.c \
353         audio_output/mixer.c \
354         audio_output/output.c \
355         audio_output/intf.c \
356         osd/osd.c \
357         osd/osd_text.c \
358         osd/osd_widgets.c \
359         network/acl.c \
360         network/getaddrinfo.c \
361         network/io.c \
362         network/tcp.c \
363         network/udp.c \
364         network/rootbind.c \
365         network/tls.c \
366         network/poll.c \
367         text/charset.c \
368         text/strings.c \
369         text/unicode.c \
370         text/filesystem.c \
371         text/wincp.c \
372         text/iso_lang.c \
373         text/iso-639_def.h \
374         misc/md5.c \
375         misc/rand.c \
376         misc/mtime.c \
377         misc/block.c \
378         misc/fourcc.c \
379         misc/es_format.c \
380         modules/modules.h \
381         modules/modules.c \
382         modules/cache.c \
383         modules/entry.c \
384         modules/os.c \
385         misc/threads.c \
386         misc/stats.c \
387         misc/cpu.c \
388         misc/action.c \
389         config/configuration.h \
390         config/core.c \
391         config/dirs.c \
392         config/chain.c \
393         config/file.c \
394         config/intf.c \
395         config/cmdline.c \
396         misc/events.c \
397         misc/image.c \
398         misc/messages.c \
399         misc/objects.c \
400         misc/variables.h \
401         misc/variables.c \
402         misc/error.c \
403         misc/update.h \
404         misc/update.c \
405         misc/xml.c \
406         misc/devices.c \
407         extras/libc.c \
408         misc/filter_chain.c \
409         $(NULL)
410
411 SOURCES_libvlc_httpd = \
412         network/httpd.c \
413         $(NULL)
414
415 SOURCES_libvlc_sout = \
416         stream_output/stream_output.c \
417         stream_output/stream_output.h \
418         stream_output/announce.c \
419         stream_output/sap.c \
420         stream_output/sdp.c \
421         $(NULL)
422
423 SOURCES_libvlc_vlm = \
424         input/vlm.c \
425         input/vlm_event.c \
426         input/vlmshell.c \
427         $(NULL)
428
429 SOURCES_libvlc = \
430         $(SOURCES_libvlc_common) \
431         $(OPT_SOURCES_libvlc_beos) \
432         $(OPT_SOURCES_libvlc_darwin) \
433         $(OPT_SOURCES_libvlc_win32) \
434         $(OPT_SOURCES_libvlc_dirent) \
435         $(OPT_SOURCES_libvlc_getopt) \
436         $(NULL)
437
438 SOURCES_libvlc_control = \
439         control/libvlc_internal.h \
440         control/media_internal.h \
441         control/media_list_internal.h \
442         control/media_list_view_internal.h \
443         control/media_player_internal.h \
444         control/core.c \
445         control/log.c \
446         control/playlist.c \
447         control/vlm.c \
448         control/video.c \
449         control/audio.c \
450         control/event.c \
451         control/flat_media_list_view.c \
452         control/hierarchical_media_list_view.c \
453         control/hierarchical_node_media_list_view.c \
454         control/media.c \
455         control/media_player.c \
456         control/media_list.c \
457         control/media_list_path.h \
458         control/media_list_player.c \
459         control/media_list_view.c \
460         control/media_library.c \
461         control/mediacontrol_internal.h \
462         control/mediacontrol_core.c \
463         control/mediacontrol_util.c \
464         control/mediacontrol_audio_video.c \
465         control/media_discoverer.c
466
467 ###############################################################################
468 # Unit/regression test
469 ###############################################################################
470
471 dist_check_SCRIPTS = check_symbols check_headers
472 TESTS = check_symbols
473
474 check-local:
475         for h in `echo $(pkginclude_HEADERS) | sed -e s,\.\./include/,,g`; \
476         do \
477                 echo grep - "#include <$$h>" $(srcdir)/test/headers.c ; \
478                 if ! grep -- "#include <$$h>" $(srcdir)/test/headers.c ; \
479                 then \
480                         echo "Header $$h not included in test/headers.c!"; \
481                         exit 1; \
482                 fi ; \
483         done
484         $(srcdir)/check_headers $(pkginclude_HEADERS)
485         $(srcdir)/check_headers $(pluginsinclude_HEADERS)
486
487 FORCE:
488         @echo "Generated source cannot be phony. Go away." >&2
489         @exit 1
490
491 .PHONY: FORCE