1 # Common code for VLC modules/.../Makefile.am
3 # Copyright (C) 2005-2007 the VideoLAN team
4 # Copyright (C) 2005-2008 RĂ©mi Denis-Courmont
6 # Authors: Sam Hocevar <sam@zoy.org>
8 AUTOMAKE_OPTIONS = subdir-objects
11 pluginsdir = $(vlclibdir)/plugins
13 CLEANFILES = $(BUILT_SOURCES)
15 LTLIBVLCCORE = $(top_builddir)/src/libvlccore.la
17 # Module name from object or executable file name.
18 MODULE_NAME = $$(p="$@"; p="$${p\#\#*/}"; p="$${p\#lib}"; echo "$${p%_plugin*}")
21 -DMODULE_STRING=\"$(MODULE_NAME)\"
22 if HAVE_DYNAMIC_PLUGINS
23 AM_CPPFLAGS += -D__PLUGIN__
25 AM_CPPFLAGS += -DMODULE_NAME=$(MODULE_NAME)
30 AM_LIBADD = $(LIBPTHREAD)
32 -avoid-version -module \
33 -export-symbols-regex ^vlc_entry \
36 $(LTLIBVLCCORE) $(top_builddir)/compat/libcompat.la
39 AM_LDFLAGS += -Wl,lib$(MODULE_NAME)_plugin.rc.$(OBJEXT)
41 $(top_builddir)/modules/module.rc: $(top_builddir)/modules/module.rc.in $(top_builddir)/config.status
42 $(AM_V_GEN) cd "$(top_builddir)" && $(SHELL) ./config.status --file="modules/module.rc"
44 lib%_plugin.rc.$(OBJEXT): $(top_builddir)/modules/module.rc
45 $(AM_V_GEN) $(WINDRES) -DMODULE_NAME=\\\"$(MODULE_NAME)\\\" --include-dir $(top_srcdir)/share --include-dir $(top_srcdir)/extras/package/win32 -i $< -o $@