X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fcommon.am;h=9bb5143547c26e4e7ff6c65576b4e3f20f12025e;hb=104e93696ed1b9dfb35c3a7d2715c040e2ef200a;hp=4eaeb42bd1954d4b2462a899e90c727044903402;hpb=c7eabcd9174667cfd57430f0220407bb5d806f98;p=vlc diff --git a/modules/common.am b/modules/common.am index 4eaeb42bd1..9bb5143547 100644 --- a/modules/common.am +++ b/modules/common.am @@ -5,36 +5,38 @@ # # Authors: Sam Hocevar +AUTOMAKE_OPTIONS = subdir-objects + NULL = -SUFFIXES = -libvlcdir = $(vlclibdir)/modules/$(basedir) -EXTRA_DIST = Modules.am +pluginsdir = $(vlclibdir)/plugins BUILT_SOURCES = CLEANFILES = $(BUILT_SOURCES) LTLIBVLCCORE = $(top_builddir)/src/libvlccore.la -AM_CFLAGS = `$(VLC_CONFIG) --cflags plugin $@` -AM_CXXFLAGS = `$(VLC_CONFIG) --cxxflags plugin $@` -AM_OBJCFLAGS = `$(VLC_CONFIG) --objcflags plugin $@` -AM_LDFLAGS = -rpath '$(libvlcdir)' \ +# Module name from object or executable file name. +MODULE_NAME = $$(p="$@"; p="$${p\#\#*/}"; p="$${p\#lib}"; p="$${p%_plugin*}"; p="$${p%.lo}"; echo "$$p") + +AM_CPPFLAGS = -DMODULE_STRING=\"$(MODULE_NAME)\" +if HAVE_DYNAMIC_PLUGINS +AM_CPPFLAGS += -D__PLUGIN__ +else +AM_CPPFLAGS += -DMODULE_NAME=$(MODULE_NAME) +endif +AM_CFLAGS = +AM_CXXFLAGS = +AM_OBJCFLAGS = +AM_LDFLAGS = \ -avoid-version -module \ - -export-symbol-regex ^vlc_entry \ + -export-symbols-regex ^vlc_entry \ -shrext $(LIBEXT) \ - -rpath "$(libvlcdir)" \ -no-undefined \ - `$(VLC_CONFIG) --ldflags plugin $@` -AM_LIBADD = `$(VLC_CONFIG) -libs plugin $@` \ - $(LTLIBVLCCORE) $(top_builddir)/compat/libcompat.la - -include $(srcdir)/Modules.am - -if MAINTAINER_MODE -$(srcdir)/Makefile.am: $(srcdir)/Modules.am $(top_srcdir)/modules/genmf - cd \$(top_srcdir) && \$(SHELL) modules/genmf $(dir) + $(top_builddir)/compat/libcompat.la $(LTLIBVLCCORE) +if HAVE_WIN32 +AM_LDFLAGS += $(top_builddir)/modules/module.rc.lo endif -nice: - $(top_builddir)/compile +SUFFIXES = .asm -.PHONY: nice +.asm.lo: + $(LIBTOOL) --mode=compile --tag=ASM $(YASM) $(YASMFLAGS) $< -o $@