]> git.sesse.net Git - vlc/blob - src/Makefile.am
Ignored language specified as 'und' (close #4077).
[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 .rc.in .rc
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.h \
33         ../include/vlc/libvlc_media_discoverer.h \
34         ../include/vlc/libvlc_media_library.h \
35         ../include/vlc/libvlc_media_list.h \
36         ../include/vlc/libvlc_media_list_player.h \
37         ../include/vlc/libvlc_media_player.h \
38         ../include/vlc/libvlc_structures.h \
39         ../include/vlc/libvlc_vlm.h \
40         $(NULL)
41
42 pluginsinclude_HEADERS = \
43         ../include/vlc_access.h \
44         ../include/vlc_acl.h \
45         ../include/vlc_aout.h \
46         ../include/vlc_aout_mixer.h \
47         ../include/vlc_arrays.h \
48         ../include/vlc_art_finder.h \
49         ../include/vlc_atomic.h \
50         ../include/vlc_avcodec.h \
51         ../include/vlc_bits.h \
52         ../include/vlc_block.h \
53         ../include/vlc_block_helper.h \
54         ../include/vlc_charset.h \
55         ../include/vlc_codec.h \
56         ../include/vlc_common.h \
57         ../include/vlc_config.h \
58         ../include/vlc_config_cat.h \
59         ../include/vlc_configuration.h \
60         ../include/vlc_cpu.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_fs.h \
70         ../include/vlc_gcrypt.h \
71         ../include/vlc_http.h \
72         ../include/vlc_httpd.h \
73         ../include/vlc_image.h \
74         ../include/vlc_inhibit.h \
75         ../include/vlc_input.h \
76         ../include/vlc_input_item.h \
77         ../include/vlc_main.h \
78         ../include/vlc_md5.h \
79         ../include/vlc_messages.h \
80         ../include/vlc_meta.h \
81         ../include/vlc_media_library.h \
82         ../include/vlc_modules.h \
83         ../include/vlc_mouse.h \
84         ../include/vlc_mtime.h \
85         ../include/vlc_objects.h \
86         ../include/vlc_picture.h \
87         ../include/vlc_picture_fifo.h \
88         ../include/vlc_picture_pool.h \
89         ../include/vlc_playlist.h \
90         ../include/vlc_plugin.h \
91         ../include/vlc_probe.h \
92         ../include/vlc_rand.h \
93         ../include/vlc_services_discovery.h \
94         ../include/vlc_sql.h \
95         ../include/vlc_sout.h \
96         ../include/vlc_spu.h \
97         ../include/vlc_stream.h \
98         ../include/vlc_strings.h \
99         ../include/vlc_subpicture.h \
100         ../include/vlc_text_style.h \
101         ../include/vlc_threads.h \
102         ../include/vlc_url.h \
103         ../include/vlc_variables.h \
104         ../include/vlc_vlm.h \
105         ../include/vlc_video_splitter.h \
106         ../include/vlc_vout.h \
107         ../include/vlc_vout_display.h \
108         ../include/vlc_vout_opengl.h \
109         ../include/vlc_vout_osd.h \
110         ../include/vlc_vout_window.h \
111         ../include/vlc_xml.h \
112         ../include/vlc_xlib.h \
113         $(NULL)
114
115 noinst_HEADERS = \
116         ../include/vlc_codec_synchro.h \
117         ../include/vlc_codecs.h \
118         ../include/vlc_extensions.h \
119         ../include/vlc_fixups.h \
120         ../include/vlc_interface.h \
121         ../include/vlc_intf_strings.h \
122         ../include/vlc_iso_lang.h \
123         ../include/vlc_keys.h \
124         ../include/vlc_memory.h \
125         ../include/vlc_network.h \
126         ../include/vlc_osd.h \
127         ../include/vlc_pgpkey.h \
128         ../include/vlc_tls.h \
129         ../include/vlc_update.h \
130         ../include/vlc_vod.h \
131         ../include/vlc_vout_wrapper.h \
132         ../include/vlc_windows_interfaces.h \
133         $(NULL)
134
135 ../include/vlc_about.h: Makefile.am $(top_srcdir)/COPYING $(top_srcdir)/THANKS $(top_srcdir)/AUTHORS
136         $(AM_V_at)rm -f -- "$@.tmp"
137         $(AM_V_at)mkdir -p -- ../include
138         $(AM_V_GEN)(echo "/* Automatically generated file - DO NOT EDIT */" && \
139         echo "static const char psz_license[] =" && \
140         sed 's/"/\\"/g;s/^.*$$/\"&\\n\"/' "$(top_srcdir)/COPYING" && \
141         echo ";" && \
142         echo "static const char psz_thanks[] =" && \
143         sed '/\$$Id:/d;s/"/\\"/g;s/<.*.> //;s/^.*$$/\"&\\n\"/' \
144                 "$(top_srcdir)/THANKS" && \
145         echo ";" && \
146         echo "static const char psz_authors[] =" && \
147         sed '/\$$Id:/d;s/"/\\"/g;s/<.*.> //;s/^.*$$/\"&\\n\"/' \
148                 "$(top_srcdir)/AUTHORS" && \
149         echo ";") >> "$@.tmp"
150         $(AM_V_at)mv -f -- "$@.tmp" "$@"
151
152 ###############################################################################
153 # pkg-config integration
154 ###############################################################################
155
156 pkgconfigdir = $(libdir)/pkgconfig
157 pkgconfig_DATA = libvlc.pc vlc-plugin.pc
158 CLEANFILES += $(pkgconfig_DATA)
159
160 .pc.in.pc: $(top_builddir)/config.status
161         $(AM_V_GEN)cd "$(top_builddir)" && \
162         $(SHELL) ./config.status --file="src/$@"
163
164 ##############################################################################
165 # Windows resource files
166 ##############################################################################
167
168 if HAVE_WIN32
169 noinst_DATA = libvlc_win32_rc.rc
170 endif
171 EXTRA_DIST += libvlc_win32_rc.rc.in
172
173 .rc.in.rc: $(top_builddir)/config.status
174         cd "$(top_builddir)" && \
175         $(SHELL) ./config.status --file="src/$@"
176
177 ###############################################################################
178 # Building libvlc
179 ###############################################################################
180
181 lib_LTLIBRARIES = libvlccore.la libvlc.la
182
183 AM_LDFLAGS = -no-undefined
184 if HAVE_WIN32
185 AM_LDFLAGS += -avoid-version
186 endif
187 if HAVE_WINCE
188 AM_LDFLAGS += -avoid-version
189 endif
190
191 libvlccore_la_SOURCES = $(SOURCES_libvlc)
192 nodist_libvlccore_la_SOURCES = revision.c
193 libvlccore_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlccore` \
194         -DMODULE_STRING=\"main\" \
195         -DLOCALEDIR=\"$(localedir)\" \
196         -DSYSCONFDIR=\"$(sysconfdir)\" \
197         -DDATA_PATH=\"$(vlcdatadir)\" \
198         -DPKGLIBDIR=\"$(vlclibdir)\"
199 libvlccore_la_LDFLAGS = `$(VLC_CONFIG) --ldflags libvlccore` $(AM_LDFLAGS) \
200         -no-undefined \
201         -export-symbols $(srcdir)/libvlccore.sym \
202         -version-info 5:0:0
203 libvlccore_la_LIBADD = `$(VLC_CONFIG) -libs libvlccore` $(AM_LIBADD) \
204         $(LTLIBINTL) ../compat/libcompat.la
205 libvlccore_la_DEPENDENCIES = libvlccore.sym
206 if HAVE_WIN32
207 libvlccore_la_DEPENDENCIES += libvlc_win32_rc.$(OBJEXT)
208 libvlccore_la_LDFLAGS += -Wl,libvlc_win32_rc.$(OBJEXT)
209 endif
210
211 libvlc_win32_rc.$(OBJEXT): libvlc_win32_rc.rc
212         $(WINDRES) --include-dir $(top_srcdir)/share -i $< -o $@
213
214 libvlc_la_SOURCES = $(SOURCES_libvlc_control)
215 nodist_libvlc_la_SOURCES = revision.c
216 libvlc_la_LIBADD = `$(VLC_CONFIG) -libs libvlc` \
217         libvlccore.la ../compat/libcompat.la
218 libvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc`
219 libvlc_la_LDFLAGS = $(AM_LDFLAGS) `$(VLC_CONFIG) --ldflags libvlc` \
220         -version-info 6:0:1 \
221         -export-symbols $(srcdir)/libvlc.sym
222 libvlc_la_DEPENDENCIES = libvlc.sym libvlccore.la
223 if HAVE_WIN32
224 libvlc_la_DEPENDENCIES += $(DATA_win32_rc_lib)
225 libvlc_la_LDFLAGS += -Wl,$(DATA_win32_rc_lib)
226 endif
227
228
229 EXTRA_libvlccore_la_SOURCES = \
230         $(SOURCES_libvlc_beos) \
231         $(SOURCES_libvlc_darwin) \
232         $(SOURCES_libvlc_linux) \
233         $(SOURCES_libvlc_win32) \
234         $(SOURCES_libvlc_other) \
235         $(SOURCES_libvlc_httpd) \
236         $(SOURCES_libvlc_sout) \
237         $(SOURCES_libvlc_vlm) \
238         $(NULL)
239 if HAVE_BEOS
240 libvlccore_la_SOURCES += $(SOURCES_libvlc_beos)
241 else
242 if HAVE_DARWIN
243 libvlccore_la_SOURCES += $(SOURCES_libvlc_darwin)
244 else
245 if HAVE_LINUX
246 libvlccore_la_SOURCES += $(SOURCES_libvlc_linux)
247 else
248 if HAVE_WIN32
249 libvlccore_la_SOURCES += $(SOURCES_libvlc_win32)
250 else
251 if HAVE_WINCE
252 libvlccore_la_SOURCES += $(SOURCES_libvlc_win32)
253 else
254 libvlccore_la_SOURCES += $(SOURCES_libvlc_other)
255 endif
256 endif
257 endif
258 endif
259 endif
260 if BUILD_HTTPD
261 libvlccore_la_SOURCES += $(SOURCES_libvlc_httpd)
262 endif
263 if ENABLE_SOUT
264 libvlccore_la_SOURCES += $(SOURCES_libvlc_sout)
265 if ENABLE_VLM
266 libvlccore_la_SOURCES += $(SOURCES_libvlc_vlm)
267 endif
268 endif
269
270 SOURCES_libvlc_beos = \
271         misc/atomic.c \
272         misc/pthread.c \
273         $(NULL)
274
275 SOURCES_libvlc_darwin = \
276         config/dirs_macos.c \
277         misc/atomic.c \
278         misc/pthread.c \
279         misc/darwin_specific.c \
280         $(NULL)
281
282 SOURCES_libvlc_linux = \
283         config/dirs_xdg.c \
284         misc/atomic.c \
285         misc/pthread.c \
286         misc/linux_specific.c \
287         $(NULL)
288
289 SOURCES_libvlc_win32 = \
290         win32/dirs.c \
291         win32/specific.c \
292         win32/atomic.c \
293         win32/thread.c \
294         win32/winsock.c \
295         $(NULL)
296
297 SOURCES_libvlc_other = \
298         config/dirs_xdg.c \
299         misc/atomic.c \
300         misc/pthread.c \
301         misc/not_specific.c
302
303 SOURCES_libvlc_common = \
304         libvlc.c \
305         libvlc.h \
306         libvlc-module.c \
307         missing.c \
308         version.c \
309         interface/dialog.c \
310         interface/interface.c \
311         interface/intf_eject.c \
312         playlist/playlist_internal.h \
313         playlist/art.c \
314         playlist/art.h \
315         playlist/thread.c \
316         playlist/control.c \
317         playlist/engine.c \
318         playlist/fetcher.c \
319         playlist/fetcher.h \
320         playlist/sort.c \
321         playlist/loadsave.c \
322         playlist/preparser.c \
323         playlist/preparser.h \
324         playlist/tree.c \
325         playlist/item.c \
326         playlist/search.c \
327         playlist/services_discovery.c \
328         input/item.c \
329         input/access.c \
330         input/clock.c \
331         input/control.c \
332         input/decoder.c \
333         input/decoder_synchro.c \
334         input/demux.c \
335         input/es_out.c \
336         input/es_out_timeshift.c \
337         input/event.c \
338         input/input.c \
339         input/info.h \
340         input/meta.c \
341         input/access.h \
342         input/clock.h \
343         input/decoder.h \
344         input/demux.h \
345         input/es_out.h \
346         input/es_out_timeshift.h \
347         input/event.h \
348         input/item.h \
349         input/stream.h \
350         input/input_internal.h \
351         input/input_interface.h \
352         input/vlm_internal.h \
353         input/vlm_event.h \
354         input/resource.h \
355         input/resource.c \
356         input/stream.c \
357         input/stream_demux.c \
358         input/stream_filter.c \
359         input/stream_memory.c \
360         input/subtitles.c \
361         input/var.c \
362         video_output/chrono.h \
363         video_output/control.c \
364         video_output/control.h \
365         video_output/display.c \
366         video_output/display.h \
367         video_output/event.h \
368         video_output/inhibit.c \
369         video_output/inhibit.h \
370         video_output/interlacing.c \
371         video_output/interlacing.h \
372         video_output/snapshot.c \
373         video_output/snapshot.h \
374         video_output/statistic.h \
375         video_output/postprocessing.c \
376         video_output/postprocessing.h \
377         video_output/video_output.c \
378         video_output/vout_pictures.c \
379         video_output/video_text.c \
380         video_output/video_epg.c \
381         video_output/video_widgets.c \
382         video_output/vout_subpictures.c \
383         video_output/window.c \
384         video_output/vout_intf.c \
385         video_output/vout_internal.h \
386         video_output/vout_control.h \
387         video_output/vout_wrapper.c \
388         audio_output/aout_internal.h \
389         audio_output/common.c \
390         audio_output/dec.c \
391         audio_output/filters.c \
392         audio_output/input.c \
393         audio_output/mixer.c \
394         audio_output/output.c \
395         audio_output/intf.c \
396         osd/osd.c \
397         osd/osd_text.c \
398         network/acl.c \
399         network/getaddrinfo.c \
400         network/io.c \
401         network/tcp.c \
402         network/udp.c \
403         network/rootbind.c \
404         network/tls.c \
405         network/poll.c \
406         text/charset.c \
407         text/strings.c \
408         text/unicode.c \
409         text/filesystem.c \
410         text/iso_lang.c \
411         text/iso-639_def.h \
412         misc/md5.c \
413         misc/probe.c \
414         misc/rand.c \
415         misc/mtime.c \
416         misc/block.c \
417         misc/fourcc.c \
418         misc/es_format.c \
419         misc/picture_fifo.c \
420         misc/picture_pool.c \
421         modules/modules.h \
422         modules/modules.c \
423         modules/cache.c \
424         modules/entry.c \
425         modules/os.c \
426         modules/textdomain.c \
427         misc/threads.c \
428         misc/stats.c \
429         misc/cpu.c \
430         misc/action.c \
431         misc/epg.c \
432         misc/exit.c \
433         config/configuration.h \
434         config/core.c \
435         config/chain.c \
436         config/file.c \
437         config/intf.c \
438         config/keys.c \
439         config/cmdline.c \
440         config/dirs.c \
441         config/getopt.c \
442         config/vlc_getopt.h \
443         misc/events.c \
444         misc/image.c \
445         misc/messages.c \
446         misc/objects.c \
447         misc/variables.h \
448         misc/variables.c \
449         misc/error.c \
450         misc/update.h \
451         misc/update.c \
452         misc/update_crypto.c \
453         misc/xml.c \
454         misc/media_library.c \
455         extras/libc.c \
456         extras/tdestroy.c \
457         misc/filter.c \
458         misc/filter_chain.c \
459         misc/http_auth.c \
460         misc/sql.c \
461         misc/text_style.c \
462         misc/subpicture.c \
463         misc/subpicture.h \
464         $(NULL)
465
466 SOURCES_libvlc_httpd = \
467         network/httpd.c \
468         $(NULL)
469
470 SOURCES_libvlc_sout = \
471         stream_output/stream_output.c \
472         stream_output/stream_output.h \
473         stream_output/announce.c \
474         stream_output/sap.c \
475         stream_output/sdp.c \
476         $(NULL)
477
478 SOURCES_libvlc_vlm = \
479         input/vlm.c \
480         input/vlm_event.c \
481         input/vlmshell.c \
482         $(NULL)
483
484 SOURCES_libvlc = \
485         $(SOURCES_libvlc_common) \
486         $(OPT_SOURCES_libvlc_beos) \
487         $(OPT_SOURCES_libvlc_darwin) \
488         $(OPT_SOURCES_libvlc_win32) \
489         $(NULL)
490
491 SOURCES_libvlc_control = \
492         control/libvlc_internal.h \
493         control/event_internal.h \
494         control/media_internal.h \
495         control/media_list_internal.h \
496         control/media_player_internal.h \
497         control/core.c \
498         control/error.c \
499         control/log.c \
500         control/playlist.c \
501         control/vlm.c \
502         control/video.c \
503         control/audio.c \
504         control/event.c \
505         control/event_async.c \
506         control/media.c \
507         control/media_player.c \
508         control/media_list.c \
509         control/media_list_path.h \
510         control/media_list_player.c \
511         control/media_library.c \
512         control/media_discoverer.c
513
514 ###############################################################################
515 # GIT revision
516 ###############################################################################
517
518 BUILT_SOURCES += stamp-revision
519 CLEANFILES += revision.txt revision.c
520
521 revision.c: revision.txt
522         $(AM_V_at)rm -f -- revision.c
523         $(AM_V_GEN)echo "const char psz_vlc_changeset[] = \"$$(cat revision.txt)\";" \
524                 > revision.c
525
526 revision.txt: Makefile.am
527         $(AM_V_at)$(MAKE) stamp-revision
528         $(AM_V_GEN)touch revision.txt
529
530 stamp-revision:
531         $(AM_V_at)rm -f -- revision.tmp
532         $(AM_V_GEN)(git --git-dir="$(top_srcdir)/.git/" describe --tags --long \
533                 --match '?.*.*' --always || echo exported) > revision.tmp
534         $(AM_V_at)if diff revision.tmp revision.txt >/dev/null 2>&1; then \
535                 rm -f -- revision.tmp; \
536         else \
537                 mv -f -- revision.tmp revision.txt; \
538         fi 2>&1
539
540 ###############################################################################
541 # Unit/regression test
542 ###############################################################################
543
544 dist_check_SCRIPTS = check_symbols check_headers
545 TESTS = check_symbols
546
547 check_DATA = libvlc-headers.sym libvlc-sorted.sym
548 CLEANFILES += $(check_DATA)
549
550 libvlc-sorted.sym: libvlccore.sym
551         rm -f libvlc-sorted.sym
552         sort -fdu < "$(srcdir)/libvlccore.sym" > libvlc-sorted.sym
553
554 libvlc-headers.sym:
555         rm -f libvlc-headers.sym
556         cat ${srcdir}/../include/vlc_*.h ${srcdir}/control/*.h | \
557         sed -n -e 's/^[ ]*VLC_EXPORT[ ]*([^,]*,\([^,]*\),.*/\1/p' | \
558         sed -e 's/[^a-zA-Z0-9_]*//' | \
559         sort -fdu > libvlc-headers.sym
560
561 .PHONY: libvlc-headers.sym
562
563 check-local:
564         for h in `echo $(pkginclude_HEADERS) | sed -e s,\.\./include/,,g`; \
565         do \
566                 echo grep - "#include <$$h>" $(srcdir)/test/headers.c ; \
567                 if ! grep -- "#include <$$h>" $(srcdir)/test/headers.c ; \
568                 then \
569                         echo "Header $$h not included in test/headers.c!"; \
570                         exit 1; \
571                 fi ; \
572         done
573         $(srcdir)/check_headers $(pkginclude_HEADERS)
574         $(srcdir)/check_headers $(pluginsinclude_HEADERS)
575
576 FORCE:
577         @echo "Generated source cannot be phony. Go away." >&2
578         @exit 1
579
580 .PHONY: FORCE