lib: add libvlc_media_tracklist API
[vlc.git] / Makefile.am
blobd85c002d77c2faaec38da0ab6062e204d915161c
1 ###############################################################################
2 # Automake targets and declarations
3 ###############################################################################
5 # SUBDIRS stores the directories where a "make" is required when building
6 # something. DIST_SUBDIRS stores the directories where nothing is built but
7 # which have makefiles with distribution information.
8 #  - src (libvlccore) is nedeed by modules
9 SUBDIRS = compat doc po share src modules lib bin test
10 DIST_SUBDIRS = m4 $(SUBDIRS)
12 EXTRA_DIST = \
13         extras/include/x86/x86inc.asm \
14         extras/include/x86/x86util.asm \
15         extras/package/macosx/package.mak \
16         extras/package/win32/package.mak \
17         extras/package/npapi.am
19 dist_noinst_SCRIPTS = bootstrap
20 nodist_noinst_SCRIPTS = compile
22 BUILT_SOURCES_distclean =
24 BUILT_SOURCES = $(BUILT_SOURCES_distclean)
26 SUFFIXES = 
28 DISTCHECK_CONFIGURE_FLAGS = \
29         --enable-fast-install \
30         --disable-a52 \
31         --disable-alsa \
32         --disable-avcodec --disable-avformat \
33         --disable-postproc --disable-swscale \
34         --disable-dbus \
35         --disable-mad --disable-libmpeg2 \
36         --disable-faad --disable-skins2 \
37         --disable-live555 \
38         --disable-lua \
39         --disable-fribidi \
40         --disable-mkv \
41         --with-kde-solid='$${datadir}/kde4/apps'
43 ACLOCAL_AMFLAGS = -I m4
44 AUTOMAKE_OPTIONS = \
45         1.11 \
46         -Wall \
47         check-news \
48         dist-xz \
49         no-dist-gzip
50 #       std-options
52 ChangeLog: Makefile.am
53         rm -f -- "$@"
54         cd doc && $(MAKE) $(AM_MAKEFLAGS) changelogs
55         $(LN_S) -f doc/ChangeLog-2015 "$@"
58 ###############################################################################
59 # tools (needed for contrib)
60 ##############################################################################
61 EXTRA_DIST += \
62         extras/tools/bootstrap \
63         extras/tools/packages.mak \
64         extras/tools/tools.mak \
65         extras/tools/SHA512SUMS \
66         extras/tools/automake-clang.patch \
67         extras/tools/bison-macOS-7df04f9.patch \
68         extras/tools/bison-macOS-c41f233c.patch \
69         extras/tools/libtool-2.4.6-bitcode.patch \
70         extras/tools/libtool-2.4.6-clang-libs.patch \
71         extras/tools/libtool-2.4.6-response-files.patch \
72         extras/tools/libtool-2.4.6-san.patch \
73         extras/tools/ragel-6.8-javacodegen.patch
75 ###############################################################################
76 # Various utilities ( editor syntax files, D-Bus controller ... )
77 ##############################################################################
78 EXTRA_DIST += \
79         extras/analyser/zsh_completion.sh \
80         extras/analyser/zsh.cpp \
81         extras/analyser/emacs.init \
82         extras/analyser/vlc.vim \
83         extras/analyser/valgrind.suppressions \
84         extras/buildsystem/make.pl \
85         extras/misc/mpris.py \
86         extras/misc/mpris.xml
88 ###############################################################################
89 # Scripts for building dependencies.
90 ##############################################################################
91 EXTRA_DIST += \
92         contrib/bootstrap \
93         contrib/src
95 ###############################################################################
96 # Building libvlc
97 ###############################################################################
99 CLEANFILES =
100 DISTCLEANFILES = $(BUILT_SOURCES_distclean) compile doltcompile doltlibtool
101 MAINTAINERCLEANFILES = ChangeLog
103 # Shortcut for developers to rebuild the core (libvlc + vlc)
104 # Don't use it if you don't know what it is about.
105 # Don't complain if it doesn't work. -- Courmisch
106 libcompat:
107         cd compat && $(MAKE) $(AM_MAKEFLAGS)
109 libvlccore: libcompat
110         cd src && $(MAKE) $(AM_MAKEFLAGS) libvlccore.la
112 libvlc: libvlccore
113         cd lib && $(MAKE) $(AM_MAKEFLAGS) libvlc.la
115 core: libvlc vlc$(EXEEXT)
116         cd bin && $(MAKE) $(AM_MAKEFLAGS) vlc$(EXEEXT) vlc-static$(EXEEXT)
118 doc:
119         cd doc && $(MAKE) $(AM_MAKEFLAGS) doc
121 .PHONY: libvlc core doc
123 ###############################################################################
124 # Building aliases
125 ###############################################################################
127 ALL_ALIASES = cvlc rvlc svlc qvlc nvlc
128 bin_SCRIPTS = $(ALIASES)
129 CLEANFILES += $(ALIASES) $(noinst_SCRIPTS)
130 EXTRA_SCRIPTS = $(ALL_ALIASES)
132 dist_noinst_SCRIPTS += make-alias
134 MKALIAS = bindir="$(bindir)" transform="$(transform)" program_prefix="$(program_prefix)" program_suffix="$(program_suffix)" $(top_srcdir)/make-alias $@
136 cvlc: make-alias Makefile
137         $(AM_V_GEN)$(MKALIAS) dummy
139 rvlc: make-alias Makefile
140         $(AM_V_GEN)$(MKALIAS) rc
142 svlc: make-alias Makefile
143         $(AM_V_GEN)$(MKALIAS) skins2
145 qvlc: make-alias Makefile
146         $(AM_V_GEN)$(MKALIAS) qt
148 nvlc: make-alias Makefile
149         $(AM_V_GEN)$(MKALIAS) ncurses
151 if BUILD_VLC
152 noinst_SCRIPTS = vlc$(EXEEXT)
153 endif
155 vlc$(EXEEXT):
156 if HAVE_DARWIN
157         $(AM_V_GEN)$(LN_S) -f bin/vlc-osx-static vlc
158 else
159         $(AM_V_GEN)$(LN_S) -f bin/vlc-static$(EXEEXT) vlc$(EXEEXT)
160 endif
162 TESTS = test/run_vlc.sh
163 dist_noinst_SCRIPTS += test/run_vlc.sh
165 if BUILD_VLC
166 ###############################################################################
167 # Installing plugins cache
168 ###############################################################################
169 install-exec-hook:
170         if test "$(build)" = "$(host)"; then \
171                 PATH="$(DESTDIR)$(bindir):$$PATH" \
172                 LD_LIBRARY_PATH="$(DESTDIR)$(libdir):$$LD_LIBRARY_PATH" \
173                 "$(DESTDIR)$(pkglibexecdir)/vlc-cache-gen$(EXEEXT)" \
174                          "$(DESTDIR)$(pkglibdir)/plugins" ; \
175         else \
176                 echo "Cross-compilation: cache generation skipped!" ; \
177         fi
178 endif
180 uninstall-hook:
181         rm -f -- "$(DESTDIR)$(pkglibdir)/plugins/plugins.dat"
183 ###############################################################################
184 # Test coverage
185 ###############################################################################
187 lcov-raw.out:
188         $(MAKE) $(AM_MAKEFLAGS) all
189         lcov -z -d .
190         $(MAKE) $(AM_MAKEFLAGS) check
191         lcov -c -d . -o lcov-raw.out
193 lcov.out: lcov-raw.out
194         lcov -r lcov-raw.out -o lcov.out \
195                 '*test*' 'contrib/*' '/usr/include/*' '*mock*'
197 lcov: lcov.out
198         rm -Rf lcov lcov.tmp
199         prefix="$$(cd "$(top_srcdir)" && pwd)" ; \
200         genhtml -p "$$prefix" -o lcov.tmp lcov.out >/dev/null
201         mv lcov.tmp lcov
203 .PHONY: lcov-raw.out
206 ###############################################################################
207 # PO translation files update
208 ###############################################################################
209 .PHONY: update-po
211 update-po:
212         cd po && $(MAKE) POTFILES vlc.pot update-po
214 ###############################################################################
215 # OS Packaging rules
216 ###############################################################################
217 include extras/package/macosx/package.mak
218 include extras/package/win32/package.mak
219 include extras/package/win32/msi.mak