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