Martin Storsjö <[email protected]> writes:

> DEP_LIBS is part of $^, since DEP_LIBS is a dependency of the
> test tools. The libs, that originate in the FFLIBS variable,
> are added into FFEXTRALIBS already (normally in the form -lavutil),
> but via DEP_LIBS in the literal form as libavutil/libavutil.so.
>
> Previously, when building test tools, the make file invoked
> the linker with the parameters "libavutil/libavutil.so -lavutil".
> On linux this worked just fine.
>
> On mingw, the linker actually can handle being given both the literal
> DLL name or using the -lavutil parameter (and handle multiple copies
> of them), but when using both forms at the same time for the same
> library, the mingw linker trips up.
>
> On msvc, the linker can't handle being passed the literal DLL name
> at all.
>
> This fixes running fate on mingw with DLLs enabled.
> ---
>  library.mak |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/library.mak b/library.mak
> index a68ab14..ca368a0 100644
> --- a/library.mak
> +++ b/library.mak
> @@ -36,7 +36,7 @@ install-libs-$(CONFIG_SHARED): install-lib$(NAME)-shared
>
>  define RULES
>  $(EXAMPLES) $(TESTPROGS) $(TOOLS): %$(EXESUF): %.o
> -     $$(LD) $(LDFLAGS) $$(LD_O) $$^ $(FFEXTRALIBS) $$(ELIBS)
> +     $$(LD) $(LDFLAGS) $$(LD_O) $$(filter-out $(DEP_LIBS), $$^) 
> $(FFEXTRALIBS) $$(ELIBS)

$$(filter %.o,$$^) seems simpler and possibly more robust.  We already
use this for creating the actual shared libs.

-- 
Måns Rullgård
[email protected]
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to