input: add an input_item_t arg to input_CreateFilename()
[vlc.git] / Makefile.am
blob87516e3a6a493c649ab17cc9d70d14c3d519be44
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/package/macosx/package.mak \
14         extras/package/win32/package.mak \
15         extras/package/npapi.am
17 dist_noinst_SCRIPTS = bootstrap
18 nodist_noinst_SCRIPTS = compile
20 BUILT_SOURCES_distclean =
22 BUILT_SOURCES = $(BUILT_SOURCES_distclean)
24 SUFFIXES = 
26 DISTCHECK_CONFIGURE_FLAGS = \
27         --enable-fast-install \
28         --disable-a52 \
29         --disable-alsa \
30         --disable-avcodec --disable-avformat \
31         --disable-postproc --disable-swscale \
32         --disable-dbus \
33         --disable-mad --disable-libmpeg2 \
34         --disable-faad --disable-skins2 \
35         --disable-live555 \
36         --disable-lua \
37         --disable-fribidi \
38         --disable-mkv \
39         --with-kde-solid='$${datadir}/kde4/apps'
41 ACLOCAL_AMFLAGS = -I m4
42 AUTOMAKE_OPTIONS = \
43         1.11 \
44         -Wall \
45         check-news \
46         dist-xz \
47         no-dist-gzip
48 #       std-options
50 ChangeLog: Makefile.am
51         rm -f -- "$@"
52         cd doc && $(MAKE) $(AM_MAKEFLAGS) changelogs
53         $(LN_S) -f doc/ChangeLog-2015 "$@"
56 ###############################################################################
57 # tools (needed for contrib)
58 ##############################################################################
59 EXTRA_DIST += \
60         extras/tools/bootstrap \
61         extras/tools/packages.mak \
62         extras/tools/tools.mak \
63         extras/tools/SHA512SUMS \
64         extras/tools/bison-macOS-7df04f9.patch \
65         extras/tools/bison-macOS-c41f233c.patch \
66         extras/tools/libtool-2.4.2-bitcode.patch \
67         extras/tools/libtool-2.4.2-san.patch \
68         extras/tools/ragel-6.8-javacodegen.patch
70 ###############################################################################
71 # Various utilities ( editor syntax files, D-Bus controller ... )
72 ##############################################################################
73 EXTRA_DIST += \
74         extras/analyser/zsh_completion.sh \
75         extras/analyser/zsh.cpp \
76         extras/analyser/emacs.init \
77         extras/analyser/vlc.vim \
78         extras/analyser/valgrind.suppressions \
79         extras/buildsystem/make.pl \
80         extras/misc/mpris.py \
81         extras/misc/mpris.xml
83 ###############################################################################
84 # Scripts for building dependencies.
85 ##############################################################################
86 EXTRA_DIST += \
87         contrib/bootstrap \
88         contrib/src
90 ###############################################################################
91 # Building libvlc
92 ###############################################################################
94 CLEANFILES =
95 DISTCLEANFILES = $(BUILT_SOURCES_distclean) compile doltcompile doltlibtool
96 MAINTAINERCLEANFILES = ChangeLog
98 # Shortcut for developers to rebuild the core (libvlc + vlc)
99 # Don't use it if you don't know what it is about.
100 # Don't complain if it doesn't work. -- Courmisch
101 libcompat:
102         cd compat && $(MAKE) $(AM_MAKEFLAGS)
104 libvlccore: libcompat
105         cd src && $(MAKE) $(AM_MAKEFLAGS) libvlccore.la
107 libvlc: libvlccore
108         cd lib && $(MAKE) $(AM_MAKEFLAGS) libvlc.la
110 core: libvlc vlc$(EXEEXT)
111         cd bin && $(MAKE) $(AM_MAKEFLAGS) vlc$(EXEEXT) vlc-static$(EXEEXT)
113 doc:
114         cd doc && $(MAKE) $(AM_MAKEFLAGS) doc
116 .PHONY: libvlc core doc
118 ###############################################################################
119 # Building aliases
120 ###############################################################################
122 ALL_ALIASES = cvlc rvlc svlc qvlc nvlc
123 bin_SCRIPTS = $(ALIASES)
124 CLEANFILES += $(ALIASES) $(noinst_SCRIPTS)
125 EXTRA_SCRIPTS = $(ALL_ALIASES)
127 dist_noinst_SCRIPTS += make-alias
129 MKALIAS = bindir="$(bindir)" transform="$(transform)" program_prefix="$(program_prefix)" program_suffix="$(program_suffix)" $(top_srcdir)/make-alias $@
131 cvlc: make-alias Makefile
132         $(AM_V_GEN)$(MKALIAS) dummy
134 rvlc: make-alias Makefile
135         $(AM_V_GEN)$(MKALIAS) rc
137 svlc: make-alias Makefile
138         $(AM_V_GEN)$(MKALIAS) skins2
140 qvlc: make-alias Makefile
141         $(AM_V_GEN)$(MKALIAS) qt
143 nvlc: make-alias Makefile
144         $(AM_V_GEN)$(MKALIAS) ncurses
146 if BUILD_VLC
147 noinst_SCRIPTS = vlc$(EXEEXT)
148 endif
150 vlc$(EXEEXT):
151 if HAVE_DARWIN
152         $(AM_V_GEN)$(LN_S) -f bin/vlc-osx-static vlc
153 else
154         $(AM_V_GEN)$(LN_S) -f bin/vlc-static$(EXEEXT) vlc$(EXEEXT)
155 endif
157 TESTS = test/run_vlc.sh
158 dist_noinst_SCRIPTS += test/run_vlc.sh
160 if BUILD_VLC
161 ###############################################################################
162 # Installing plugins cache
163 ###############################################################################
164 install-exec-hook:
165         if test "$(build)" = "$(host)"; then \
166                 PATH="$(DESTDIR)$(bindir):$$PATH" \
167                 LD_LIBRARY_PATH="$(DESTDIR)$(libdir):$$LD_LIBRARY_PATH" \
168                 "$(DESTDIR)$(pkglibexecdir)/vlc-cache-gen$(EXEEXT)" \
169                          "$(DESTDIR)$(pkglibdir)/plugins" ; \
170         else \
171                 echo "Cross-compilation: cache generation skipped!" ; \
172         fi
173 endif
175 uninstall-hook:
176         rm -f -- "$(DESTDIR)$(pkglibdir)/plugins/plugins.dat"
178 ###############################################################################
179 # Test coverage
180 ###############################################################################
182 lcov-raw.out:
183         $(MAKE) $(AM_MAKEFLAGS) all
184         lcov -z -d .
185         $(MAKE) $(AM_MAKEFLAGS) check
186         lcov -c -d . -o lcov-raw.out
188 lcov.out: lcov-raw.out
189         lcov -r lcov-raw.out -o lcov.out \
190                 '*test*' 'contrib/*' '/usr/include/*'
192 lcov: lcov.out
193         rm -Rf lcov lcov.tmp
194         prefix="$$(cd "$(top_srcdir)" && pwd)" ; \
195         genhtml -p "$$prefix" -o lcov.tmp lcov.out >/dev/null
196         mv lcov.tmp lcov
198 .PHONY: lcov-raw.out
201 ###############################################################################
202 # PO translation files update
203 ###############################################################################
204 .PHONY: update-po
206 update-po:
207         cd po && $(MAKE) POTFILES vlc.pot update-po
209 ###############################################################################
210 # OS Packaging rules
211 ###############################################################################
212 include extras/package/macosx/package.mak
213 include extras/package/win32/package.mak
214 include extras/package/win32/msi.mak