[Ffmpeg-devel] [patch] add dll version info for mingw32

Måns Rullgård mru
Thu Dec 21 22:47:06 CET 2006


Ramiro Polla <angustia at arrozcru.no-ip.org> writes:

> M?ns Rullg?rd wrote:
>> Diego Biurrun <diego at biurrun.de> writes:
>>
>>
>>> On Tue, Dec 19, 2006 at 12:57:56PM -0800, Tom Harper wrote:
>>>
>>>> The following patch properly adds version information to the ffmpeg
>>>> dlls for windows.  It would be more ideal obviously if the rc files were
>>>> generated on the fly.  For now the version info needs to be added
>>>> manually to the rc, which should be fine for those people building
>>>> on that platform.
>>>>
>>> System-depended hackery in Makefiles/common.mak is not allowed.  Find
>>> another way to do this through configure.
>>>
>>
>> Seconded.  Furthermore, those version files should be generated with
>> correct numbers.
>>
>>
>
> Would this patch be appropriate for building? I'm still working on the
> dllinfo.rc files themselves.
>
> Ramiro Polla
> Index: configure
> ===================================================================
> --- configure	(revision 7339)
> +++ configure	(working copy)
> @@ -1088,6 +1088,7 @@
>      SLIBNAME_WITH_VERSION='$(SLIBPREF)$(NAME)-$(LIBVERSION)$(SLIBSUF)'
>      SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME)-$(LIBMAJOR)$(SLIBSUF)'
>      SLIB_EXTRA_CMD="-lib /machine:i386 /def:\$(@:${SLIBSUF}=.def)"
> +    SLIB_EXTRA_OBJS="dllinfo.rco"
>      SHFLAGS="-shared -Wl,--output-def,\$(@:${SLIBSUF}=.def),--out-implib,lib\$(SLIBNAME:\$(SLIBSUF)=.dll.a) -Wl,--enable-runtime-pseudo-reloc"
>  fi
>
> @@ -1935,6 +1936,7 @@
>    echo "SLIBNAME_WITH_VERSION=${SLIBNAME_WITH_VERSION}" >> config.mak
>    echo "SLIBNAME_WITH_MAJOR=${SLIBNAME_WITH_MAJOR}" >> config.mak
>    echo "SLIB_EXTRA_CMD=${SLIB_EXTRA_CMD}" >> config.mak
> +  echo "SLIB_EXTRA_OBJS=${SLIB_EXTRA_OBJS}" >> config.mak
>  fi
>  echo "LIB_INSTALL_EXTRA_CMD=${LIB_INSTALL_EXTRA_CMD}" >> config.mak
>  echo "EXTRALIBS=$extralibs" >> config.mak
> Index: common.mak
> ===================================================================
> --- common.mak	(revision 7339)
> +++ common.mak	(working copy)
> @@ -9,7 +9,7 @@
>            -D_ISOC9X_SOURCE -I$(BUILD_ROOT) -I$(SRC_PATH) \
>            -I$(SRC_PATH)/libavutil $(OPTFLAGS)
>  SRCS := $(OBJS:.o=.c) $(ASM_OBJS:.o=.S) $(CPPOBJS:.o=.cpp)
> -OBJS := $(OBJS) $(ASM_OBJS) $(CPPOBJS)
> +OBJS := $(OBJS) $(ASM_OBJS) $(CPPOBJS) $(SLIB_EXTRA_OBJS)
>  STATIC_OBJS := $(OBJS) $(STATIC_OBJS)
>  SHARED_OBJS := $(OBJS) $(SHARED_OBJS)

SLIB_EXTRA_OBJS should be added to SHARED_OBJS since it's useless
(possibly even harmful) for static builds.

-- 
M?ns Rullg?rd
mru at inprovide.com




More information about the ffmpeg-devel mailing list