| 46 | | include Modules.am |
|---|
| 47 | | |
|---|
| 48 | | if HAVE_PLUGINS |
|---|
| 49 | | LTLIBVLC = \$(top_builddir)/src/libvlc.la |
|---|
| 50 | | |
|---|
| 51 | | AM_LDFLAGS = -rpath '\$(libvlcdir)' -avoid-version \\ |
|---|
| 52 | | -module -no-undefined -shrext \$(LIBEXT) |
|---|
| 53 | | if HAVE_COMPILER_EXPORT |
|---|
| 54 | | AM_LDFLAGS += -export-dynamic |
|---|
| 55 | | else |
|---|
| 56 | | AM_LDFLAGS += -export-symbol-regex ^vlc_entry |
|---|
| 57 | | endif |
|---|
| 58 | | AM_LIBADD = \$(LTLIBVLC) |
|---|
| 59 | | endif |
|---|
| 60 | | |
|---|
| 61 | | all: all-modules |
|---|
| 62 | | |
|---|
| 63 | | nice: |
|---|
| 64 | | \$(top_builddir)/compile |
|---|
| 65 | | |
|---|
| 66 | | # Find out which modules were enabled and tell make to build them |
|---|
| 67 | | all-modules: |
|---|
| 68 | | @set fnord \$\$MAKEFLAGS; amf=\$\$2; targets=\`\\ |
|---|
| 69 | | z=\$\$(\$(VLC_CONFIG) --list plugin); for mod in \$(mods); do case "\$\$z " in *\ \$\${mod}\ *) echo lib\$\${mod}_plugin.la;; esac; done; \\ |
|---|
| 70 | | \`; case "\$\$targets" in *lib*) \$(MAKE) \$(AM_MAKEFLAGS) \$\$targets || case "\$\$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; ;; esac; \\ |
|---|
| 71 | | test -z "\$\$fail" |
|---|
| 72 | | |
|---|
| 73 | | # Build a plugin with the adequate linker and linker's flags |
|---|
| 74 | | _plugin.la_plugin\$(LIBEXT): |
|---|
| 75 | | @mod="\$*" ; mod=\$\${mod#lib} ; \ |
|---|
| 76 | | ldfl="\`\$(VLC_CONFIG) --libs plugin \$\$mod\` \$(LIBVLC) -u \$(SYMPREF)\$(VLC_ENTRY)" ; \ |
|---|
| 77 | | case \`\$(VLC_CONFIG) --linkage \$\$mod\` in \\ |
|---|
| 78 | | c++) ld="\$(CXXLINK)" ;; \ |
|---|
| 79 | | objc) ld="\$(OBJCLINK)" ;; \ |
|---|
| 80 | | c|*) ld="\$(LINK)" ;; \ |
|---|
| 81 | | esac ; \ |
|---|
| 82 | | echo \$\$ld \$< \$\$ldfl ; \ |
|---|
| 83 | | \$\$ld \$< \$\$ldfl |
|---|
| 84 | | |
|---|
| 85 | | if MAINTAINER_MODE |
|---|
| 86 | | \$(srcdir)/Makefile.am: \$(srcdir)/Modules.am \$(top_srcdir)/modules/genmf |
|---|
| 87 | | cd \$(top_srcdir) && \$(SHELL) modules/genmf ${dir} |
|---|
| 88 | | endif |
|---|
| 89 | | |
|---|
| 90 | | mostlyclean-local: |
|---|
| 91 | | -rm -f -- *.la |
|---|
| 92 | | |
|---|
| 93 | | ### automake creates libvlcdir after running install-*-local |
|---|
| 94 | | ### so we have to create it ourselves first |
|---|
| 95 | | install-exec-local: all-modules |
|---|
| 96 | | @if test -z "\$(libvlc_LTLIBRARIES)"; then \ |
|---|
| 97 | | z=\$\$(\$(VLC_CONFIG) --list plugin); \ |
|---|
| 98 | | m=\`for mod in \$(mods); do case "\$\$z " in *\ \$\${mod}\ *) printf " lib\$\${mod}_plugin.la" ;; esac; done\` ; \ |
|---|
| 99 | | test -z "\$\$m" || \ |
|---|
| 100 | | \$(MAKE) \$(AM_MAKEFLAGS) libvlc_LTLIBRARIES="\$\$m" install-libvlcLTLIBRARIES || exit \$\$? ; \ |
|---|
| 101 | | fi |
|---|
| 102 | | |
|---|
| 103 | | uninstall-local: |
|---|
| 104 | | @if test -z "\$(libvlc_LTLIBRARIES)"; then \ |
|---|
| 105 | | z=\$\$(\$(VLC_CONFIG) --list plugin); \ |
|---|
| 106 | | m=\`for mod in \$(mods); do case "\$\$z " in *\ \$\${mod}\ *) printf " lib\$\${mod}_plugin.la" ;; esac; done\` ; \ |
|---|
| 107 | | test -z "\$\$m" || \ |
|---|
| 108 | | \$(MAKE) \$(AM_MAKEFLAGS) libvlc_LTLIBRARIES="\$\$m" uninstall-libvlcLTLIBRARIES || exit \$\$?; \ |
|---|
| 109 | | fi |
|---|
| | 36 | include \$(top_srcdir)/modules/common.am |
|---|