common.am 1.08 KB
Newer Older
1 2 3 4 5 6 7 8
# Common code for VLC modules/.../Makefile.am
#
# Copyright (C) 2005-2007 the VideoLAN team
# Copyright (C) 2005-2008 Rémi Denis-Courmont
#
# Authors: Sam Hocevar <sam@zoy.org>

NULL =
9
libvlcdir = $(vlclibdir)/plugins/$(basedir)
10 11
EXTRA_DIST = Modules.am
BUILT_SOURCES =
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
12
CLEANFILES = $(BUILT_SOURCES)
13

14
LTLIBVLCCORE = $(top_builddir)/src/libvlccore.la
15

16
# Module name from object or executable file name.
17
MODULE_NAME = $$(p="$@"; p="$${p\#\#*/}"; p="$${p\#lib}"; echo "$${p%_plugin*}")
18 19 20 21

AM_CPPFLAGS = \
	-DMODULE_NAME=$(MODULE_NAME) \
	-DMODULE_NAME_IS_$(MODULE_NAME) \
22
	-DMODULE_STRING=\"$(MODULE_NAME)\"
Rafaël Carré's avatar
Rafaël Carré committed
23
if HAVE_DYNAMIC_PLUGINS
24 25
AM_CPPFLAGS += -D__PLUGIN__
endif
26 27 28
AM_CFLAGS =
AM_CXXFLAGS =
AM_OBJCFLAGS =
29
AM_LDFLAGS = -rpath '$(libvlcdir)' \
30
	-avoid-version -module \
31
	-export-symbols-regex ^vlc_entry \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
32
	-shrext $(LIBEXT) \
33 34
	-no-undefined
AM_LIBADD = $(LTLIBVLCCORE) $(top_builddir)/compat/libcompat.la $(LIBS_plugin)
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
35

Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
36
include $(srcdir)/Modules.am
37 38 39

if MAINTAINER_MODE
$(srcdir)/Makefile.am: $(srcdir)/Modules.am $(top_srcdir)/modules/genmf
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
40
	$(AM_V_GEN)cd \$(top_srcdir) && \$(SHELL) modules/genmf $(dir)
41
endif