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