common.am 1.2 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 17 18 19 20 21 22 23
# Module name from object or executable file name.
MODULE_NAME = `p="$@"; p="$${p\#\#*/}"; p="$${p\#lib}"; echo "$${p%_plugin*}"`

AM_CPPFLAGS = \
	-DMODULE_NAME=$(MODULE_NAME) \
	-DMODULE_NAME_IS_$(MODULE_NAME) \
	-DMODULE_STRING=\"$(MODULE_NAME)\"
	-D__PLUGIN__
24 25 26
AM_CFLAGS = `$(VLC_CONFIG) --cflags plugin $@`
AM_CXXFLAGS = `$(VLC_CONFIG) --cxxflags plugin $@`
AM_OBJCFLAGS = `$(VLC_CONFIG) --objcflags plugin $@`
27
AM_LDFLAGS = -rpath '$(libvlcdir)' \
28
	-avoid-version -module \
29
	-export-symbols-regex ^vlc_entry \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
30
	-shrext $(LIBEXT) \
31
	-no-undefined \
32 33
	 `$(VLC_CONFIG) --ldflags plugin $@`
AM_LIBADD = `$(VLC_CONFIG) -libs plugin $@` \
34
	$(LTLIBVLCCORE) $(top_builddir)/compat/libcompat.la
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