1
mirror of https://code.videolan.org/videolan/vlc synced 2024-09-12 13:44:56 +02:00
vlc/modules/common.am
Rémi Denis-Courmont 8ac45478b4 Move libvlccore and libcompat to LDFLAGS from LIBADD
An ABI change to libvlccore or libcompat will always be signaled by a
change in a header file. That change will trigger a recompilation and
then relinking of affected plugins.

Thus, there is no need for libvlccore.la and libcompat.la to be
explicit dependencies of plugins. This small hack avoids relinking
every plugin whenever the libvlccore is rebuilt.
2012-09-09 16:27:10 +03:00

43 lines
1.1 KiB
Plaintext

# 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 =
libvlcdir = $(vlclibdir)/plugins/$(basedir)
EXTRA_DIST = Modules.am
BUILT_SOURCES =
CLEANFILES = $(BUILT_SOURCES)
LTLIBVLCCORE = $(top_builddir)/src/libvlccore.la
# 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)\"
if HAVE_DYNAMIC_PLUGINS
AM_CPPFLAGS += -D__PLUGIN__
endif
AM_CFLAGS =
AM_CXXFLAGS =
AM_OBJCFLAGS =
AM_LIBADD = $(LIBPTHREAD)
AM_LDFLAGS = -rpath '$(libvlcdir)' \
-avoid-version -module \
-export-symbols-regex ^vlc_entry \
-shrext $(LIBEXT) \
-no-undefined \
$(LTLIBVLCCORE) $(top_builddir)/compat/libcompat.la
include $(srcdir)/Modules.am
if MAINTAINER_MODE
$(srcdir)/Makefile.am: $(srcdir)/Modules.am $(top_srcdir)/modules/genmf
$(AM_V_GEN)cd \$(top_srcdir) && \$(SHELL) modules/genmf $(dir)
endif