playlist: m3u speed up url lookup
[vlc.git] / Makefile.am
blobbd988c75e8d5beaf9764e9b09700b8836d3067d3
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 DIST_SUBDIRS = m4 compat doc po share src modules lib bin test
10 SUBDIRS = compat doc po share src modules lib
11 if BUILD_VLC
12 SUBDIRS += bin
13 endif
14 SUBDIRS += test
16 EXTRA_DIST = \
17         extras/package/macosx/package.mak \
18         extras/package/win32/package.mak \
19         extras/package/npapi.am
21 dist_noinst_SCRIPTS = bootstrap
22 nodist_noinst_SCRIPTS = compile
24 BUILT_SOURCES_distclean =
26 BUILT_SOURCES = $(BUILT_SOURCES_distclean)
28 SUFFIXES = 
30 DISTCHECK_CONFIGURE_FLAGS = \
31         --enable-fast-install \
32         --disable-a52 \
33         --disable-alsa \
34         --disable-avcodec --disable-avformat \
35         --disable-postproc --disable-swscale \
36         --disable-dbus \
37         --disable-mad --disable-libmpeg2 \
38         --disable-faad --disable-skins2 \
39         --disable-live555 \
40         --disable-lua \
41         --disable-fribidi \
42         --disable-mkv \
43         --with-kde-solid='$${datadir}/kde4/apps'
45 ACLOCAL_AMFLAGS = -I m4
46 AUTOMAKE_OPTIONS = \
47         1.11 \
48         -Wall \
49         check-news \
50         dist-xz \
51         no-dist-gzip
52 #       std-options
54 ChangeLog: Makefile.am
55         rm -f -- "$@"
56         cd doc && $(MAKE) $(AM_MAKEFLAGS) changelogs
57         $(LN_S) -f doc/ChangeLog-2015 "$@"
60 ###############################################################################
61 # tools (needed for contrib)
62 ##############################################################################
63 EXTRA_DIST += \
64         extras/tools/bootstrap \
65         extras/tools/packages.mak \
66         extras/tools/tools.mak \
67         extras/tools/ragel-6.8-javacodegen.patch
69 ###############################################################################
70 # Various utilities ( editor syntax files, D-Bus controller ... )
71 ##############################################################################
72 EXTRA_DIST += \
73         extras/analyser/zsh_completion.sh \
74         extras/analyser/zsh.cpp \
75         extras/analyser/emacs.init \
76         extras/analyser/vlc.vim \
77         extras/analyser/valgrind.suppressions \
78         extras/buildsystem/make.pl \
79         extras/misc/mpris.py \
80         extras/misc/mpris.xml
82 ###############################################################################
83 # Scripts for building dependencies.
84 ##############################################################################
85 EXTRA_DIST += \
86         contrib/bootstrap \
87         contrib/src
89 ###############################################################################
90 # Building libvlc
91 ###############################################################################
93 CLEANFILES =
94 DISTCLEANFILES = $(BUILT_SOURCES_distclean) compile doltcompile doltlibtool
95 MAINTAINERCLEANFILES = ChangeLog
97 # Shortcut for developers to rebuild the core (libvlc + vlc)
98 # Don't use it if you don't know what it is about.
99 # Don't complain if it doesn't work. -- Courmisch
100 libcompat:
101         cd compat && $(MAKE) $(AM_MAKEFLAGS)
103 libvlccore: libcompat
104         cd src && $(MAKE) $(AM_MAKEFLAGS) libvlccore.la
106 libvlc: libvlccore
107         cd lib && $(MAKE) $(AM_MAKEFLAGS) libvlc.la
109 core: libvlc vlc$(EXEEXT)
110         cd bin && $(MAKE) $(AM_MAKEFLAGS) vlc$(EXEEXT) vlc-static$(EXEEXT)
112 doc:
113         cd doc && $(MAKE) $(AM_MAKEFLAGS) doc
115 .PHONY: libvlc core doc
117 ###############################################################################
118 # Building aliases
119 ###############################################################################
121 ALL_ALIASES = cvlc rvlc svlc qvlc nvlc
122 bin_SCRIPTS = $(ALIASES)
123 CLEANFILES += $(ALIASES) $(noinst_SCRIPTS)
124 EXTRA_SCRIPTS = $(ALL_ALIASES)
126 dist_noinst_SCRIPTS += make-alias
128 MKALIAS = bindir="$(bindir)" transform="$(transform)" program_prefix="$(program_prefix)" program_suffix="$(program_suffix)" $(top_srcdir)/make-alias $@
130 cvlc: make-alias Makefile
131         $(AM_V_GEN)$(MKALIAS) dummy
133 rvlc: make-alias Makefile
134         $(AM_V_GEN)$(MKALIAS) rc
136 svlc: make-alias Makefile
137         $(AM_V_GEN)$(MKALIAS) skins2
139 qvlc: make-alias Makefile
140         $(AM_V_GEN)$(MKALIAS) qt
142 nvlc: make-alias Makefile
143         $(AM_V_GEN)$(MKALIAS) ncurses
145 if BUILD_VLC
146 noinst_SCRIPTS = vlc$(EXEEXT)
147 endif
149 vlc$(EXEEXT):
150 if HAVE_DARWIN
151         $(AM_V_GEN)$(LN_S) -f bin/vlc-osx-static vlc
152 else
153         $(AM_V_GEN)$(LN_S) -f bin/vlc-static$(EXEEXT) vlc$(EXEEXT)
154 endif
156 TESTS = test/run_vlc.sh
157 dist_noinst_SCRIPTS += test/run_vlc.sh
159 if BUILD_VLC
160 ###############################################################################
161 # Installing plugins cache
162 ###############################################################################
163 install-exec-hook:
164         if test "$(build)" = "$(host)"; then \
165                 PATH="$(DESTDIR)$(bindir):$$PATH" \
166                 LD_LIBRARY_PATH="$(DESTDIR)$(libdir):$$LD_LIBRARY_PATH" \
167                 "$(DESTDIR)$(vlclibdir)/vlc-cache-gen$(EXEEXT)" \
168                          "$(DESTDIR)$(vlclibdir)/plugins" ; \
169         else \
170                 echo "Cross-compilation: cache generation skipped!" ; \
171         fi
172 endif
174 uninstall-hook:
175         rm -f -- "$(DESTDIR)$(vlclibdir)/plugins/plugins.dat"
177 ###############################################################################
178 # Test coverage
179 ###############################################################################
181 lcov-raw.out:
182         $(MAKE) $(AM_MAKEFLAGS) all
183         lcov -z -d .
184         $(MAKE) $(AM_MAKEFLAGS) check
185         lcov -c -d . -o lcov-raw.out
187 lcov.out: lcov-raw.out
188         lcov -r lcov-raw.out -o lcov.out \
189                 '*test*' 'contrib/*' '/usr/include/*'
191 lcov: lcov.out
192         rm -Rf lcov lcov.tmp
193         prefix="$$(cd "$(top_srcdir)" && pwd)" ; \
194         genhtml -p "$$prefix" -o lcov.tmp lcov.out >/dev/null
195         mv lcov.tmp lcov
197 .PHONY: lcov-raw.out
200 ###############################################################################
201 # PO translation files update
202 ###############################################################################
203 .PHONY: update-po
205 update-po:
206         cd po && $(MAKE) POTFILES vlc.pot update-po
208 ###############################################################################
209 # OS Packaging rules
210 ###############################################################################
211 include extras/package/macosx/package.mak
212 include extras/package/win32/package.mak
213 include extras/package/win32/msi.mak