Makefile.am 6.37 KB
Newer Older
1 2 3
###############################################################################
# Automake targets and declarations
###############################################################################
4

5 6 7
# SUBDIRS stores the directories where a "make" is required when building
# something. DIST_SUBDIRS stores the directories where nothing is built but
# which have makefiles with distribution information.
Rafaël Carré's avatar
Rafaël Carré committed
8
#  - src (libvlccore) is nedeed by modules
9 10
SUBDIRS = compat doc po share src modules lib bin test
DIST_SUBDIRS = m4 $(SUBDIRS)
11

12
EXTRA_DIST = \
13 14
	extras/include/x86/x86inc.asm \
	extras/include/x86/x86util.asm \
15 16 17
	extras/package/macosx/package.mak \
	extras/package/win32/package.mak \
	extras/package/npapi.am
18

19
dist_noinst_SCRIPTS = bootstrap
20
nodist_noinst_SCRIPTS = compile
21

Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
22
BUILT_SOURCES_distclean =
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
23

24
BUILT_SOURCES = $(BUILT_SOURCES_distclean)
25

26 27
SUFFIXES = 

28 29
DISTCHECK_CONFIGURE_FLAGS = \
	--enable-fast-install \
30
	--disable-a52 \
31
	--disable-alsa \
32 33
	--disable-avcodec --disable-avformat \
	--disable-postproc --disable-swscale \
34
	--disable-dbus \
35 36
	--disable-mad --disable-libmpeg2 \
	--disable-faad --disable-skins2 \
37
	--disable-live555 \
38
	--disable-lua \
39
	--disable-fribidi \
40
	--disable-mkv \
41
	--with-kde-solid='$${datadir}/kde4/apps'
42

43
ACLOCAL_AMFLAGS = -I m4
44
AUTOMAKE_OPTIONS = \
45
	1.11 \
46 47
	-Wall \
	check-news \
48
	dist-xz \
49
	no-dist-gzip
50
#	std-options
51

52 53
ChangeLog: Makefile.am
	rm -f -- "$@"
54
	cd doc && $(MAKE) $(AM_MAKEFLAGS) changelogs
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
55
	$(LN_S) -f doc/ChangeLog-2015 "$@"
56

Felix Paul Kühne's avatar
Felix Paul Kühne committed
57

58 59 60 61 62 63
###############################################################################
# tools (needed for contrib)
##############################################################################
EXTRA_DIST += \
	extras/tools/bootstrap \
	extras/tools/packages.mak \
64
	extras/tools/tools.mak \
65
	extras/tools/SHA512SUMS \
Konstantin Pavlov's avatar
Konstantin Pavlov committed
66
	extras/tools/automake-clang.patch \
67 68
	extras/tools/bison-macOS-7df04f9.patch \
	extras/tools/bison-macOS-c41f233c.patch \
Konstantin Pavlov's avatar
Konstantin Pavlov committed
69 70 71 72 73
	extras/tools/cmake-msys-FindPkg.patch \
	extras/tools/libtool-2.4.6-bitcode.patch \
	extras/tools/libtool-2.4.6-clang-libs.patch \
	extras/tools/libtool-2.4.6-response-files.patch \
	extras/tools/libtool-2.4.6-san.patch \
74
	extras/tools/ragel-6.8-javacodegen.patch
75 76

###############################################################################
Rafaël Carré's avatar
Rafaël Carré committed
77
# Various utilities ( editor syntax files, D-Bus controller ... )
78 79
##############################################################################
EXTRA_DIST += \
80
	extras/analyser/zsh_completion.sh \
81 82 83 84
	extras/analyser/zsh.cpp \
	extras/analyser/emacs.init \
	extras/analyser/vlc.vim \
	extras/analyser/valgrind.suppressions \
85
	extras/buildsystem/make.pl \
86
	extras/misc/mpris.py \
Pierre Ynard's avatar
Pierre Ynard committed
87
	extras/misc/mpris.xml
88

89 90 91 92 93
###############################################################################
# Scripts for building dependencies.
##############################################################################
EXTRA_DIST += \
	contrib/bootstrap \
94
	contrib/src
95

96 97 98 99
###############################################################################
# Building libvlc
###############################################################################

100
CLEANFILES =
101
DISTCLEANFILES = $(BUILT_SOURCES_distclean) compile doltcompile doltlibtool
102
MAINTAINERCLEANFILES = ChangeLog
103

104
# Shortcut for developers to rebuild the core (libvlc + vlc)
105 106
# Don't use it if you don't know what it is about.
# Don't complain if it doesn't work. -- Courmisch
107 108 109
libcompat:
	cd compat && $(MAKE) $(AM_MAKEFLAGS)

110 111 112 113 114
libvlccore: libcompat
	cd src && $(MAKE) $(AM_MAKEFLAGS) libvlccore.la

libvlc: libvlccore
	cd lib && $(MAKE) $(AM_MAKEFLAGS) libvlc.la
115

116
core: libvlc vlc$(EXEEXT)
117
	cd bin && $(MAKE) $(AM_MAKEFLAGS) vlc$(EXEEXT) vlc-static$(EXEEXT)
118

119 120 121 122
doc:
	cd doc && $(MAKE) $(AM_MAKEFLAGS) doc

.PHONY: libvlc core doc
123

124 125 126 127
###############################################################################
# Building aliases
###############################################################################

128
ALL_ALIASES = cvlc rvlc svlc qvlc nvlc
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
129
bin_SCRIPTS = $(ALIASES)
130
CLEANFILES += $(ALIASES) $(noinst_SCRIPTS)
131 132 133 134
EXTRA_SCRIPTS = $(ALL_ALIASES)

dist_noinst_SCRIPTS += make-alias

135
MKALIAS = bindir="$(bindir)" transform="$(transform)" program_prefix="$(program_prefix)" program_suffix="$(program_suffix)" $(top_srcdir)/make-alias $@
136

137
cvlc: make-alias Makefile
138
	$(AM_V_GEN)$(MKALIAS) dummy
139

140
rvlc: make-alias Makefile
141
	$(AM_V_GEN)$(MKALIAS) rc
142

143
svlc: make-alias Makefile
144
	$(AM_V_GEN)$(MKALIAS) skins2
145

146
qvlc: make-alias Makefile
147
	$(AM_V_GEN)$(MKALIAS) qt
148

149
nvlc: make-alias Makefile
150
	$(AM_V_GEN)$(MKALIAS) ncurses
151

152
if BUILD_VLC
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
153
noinst_SCRIPTS = vlc$(EXEEXT)
154
endif
155

156
vlc$(EXEEXT):
157 158 159
if HAVE_DARWIN
	$(AM_V_GEN)$(LN_S) -f bin/vlc-osx-static vlc
else
160
	$(AM_V_GEN)$(LN_S) -f bin/vlc-static$(EXEEXT) vlc$(EXEEXT)
161
endif
162

163
TESTS = test/run_vlc.sh
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
164
dist_noinst_SCRIPTS += test/run_vlc.sh
165

166
if BUILD_VLC
167 168 169 170 171
###############################################################################
# Installing plugins cache
###############################################################################
install-exec-hook:
	if test "$(build)" = "$(host)"; then \
172
		PATH="$(DESTDIR)$(bindir):$$PATH" \
173
		LD_LIBRARY_PATH="$(DESTDIR)$(libdir):$$LD_LIBRARY_PATH" \
174
		"$(DESTDIR)$(pkglibexecdir)/vlc-cache-gen$(EXEEXT)" \
175
			 "$(DESTDIR)$(pkglibdir)/plugins" ; \
176 177 178
	else \
		echo "Cross-compilation: cache generation skipped!" ; \
	fi
179
endif
180

181
uninstall-hook:
182
	rm -f -- "$(DESTDIR)$(pkglibdir)/plugins/plugins.dat"
183

184 185 186 187 188 189 190 191 192 193 194 195
###############################################################################
# Test coverage
###############################################################################

lcov-raw.out:
	$(MAKE) $(AM_MAKEFLAGS) all
	lcov -z -d .
	$(MAKE) $(AM_MAKEFLAGS) check
	lcov -c -d . -o lcov-raw.out

lcov.out: lcov-raw.out
	lcov -r lcov-raw.out -o lcov.out \
Thomas Guillem's avatar
Thomas Guillem committed
196
		'*test*' 'contrib/*' '/usr/include/*' '*mock*'
197 198 199

lcov: lcov.out
	rm -Rf lcov lcov.tmp
200 201
	prefix="$$(cd "$(top_srcdir)" && pwd)" ; \
	genhtml -p "$$prefix" -o lcov.tmp lcov.out >/dev/null
202 203 204 205 206
	mv lcov.tmp lcov

.PHONY: lcov-raw.out


207 208 209 210 211 212
###############################################################################
# PO translation files update
###############################################################################
.PHONY: update-po

update-po:
213
	cd po && $(MAKE) POTFILES vlc.pot update-po
214 215 216 217 218 219

###############################################################################
# OS Packaging rules
###############################################################################
include extras/package/macosx/package.mak
include extras/package/win32/package.mak
Ludovic Fauvet's avatar
Ludovic Fauvet committed
220
include extras/package/win32/msi.mak
221