[FFmpeg-devel] [Patch] Alternative OS/2 patch
Diego Biurrun
diego
Sun Nov 4 02:19:44 CET 2007
On Mon, Oct 29, 2007 at 04:27:40PM -0700, Dave Yeo wrote:
> On 10/24/07 10:10 pm, Dave Yeo wrote:
>> As mentioned in the other thread this was my original idea for a patch.
>> This patch is much clearer and imho more proper.
>> Basically echos everything needed to a DEF file then runs emxexp on the
>> objects to extract the exports.
>> After building the DLL it runs emximp on the DEF (could also run on the
>> DLL) to create the import libs. Both OMF and a.out format.
>> This fits in much better to the build process, no overwriting DLLs or
>> other weirdness just create a DEF and link with it. Also unlike previous
>> patch supports --enable-shared --disable-static.
>> While right now this patch builds working ffmpeg etc, but the description
>> field of the DEF is broken. I'm not sure how to escape things so ending up
>> with a line something like
>> DESCRIPTION "avcodec-51.47.1.dll"
>> I'd also like to expand the description, ideally in a form that the
>> bldlevel tool can extract.
>> I've also added stripping with lxlite. I should of before but was having
>> problems testing on the command line. Works fine when called by make
>> anyways shrinks eg avcodec-51.47.1.dll by 8647793 bytes of which close to
>> 7MBs is debug code.
> Slightly updated patch attached. Simplified the SLIB_INSTALL_EXTRA_CMD and
> fixed echoing of DESCRIPTION. Seems there is no way to escape a single
> quote in a single quoted string
> --- configure (revision 10872)
> +++ configure (working copy)
> @@ -1211,6 +1213,33 @@
> + os/2)
> + SLIB_CREATE_DEF_CMD="echo LIBRARY \$(FULLNAME) INITINSTANCE TERMINSTANCE > \$(FULLNAME).def; \
> + echo DESCRIPTION '\"\$(SLIBNAME_WITH_VERSION)\"' >> \$(FULLNAME).def; \
> + echo PROTMODE >> \$(FULLNAME).def; \
> + echo CODE PRELOAD MOVEABLE DISCARDABLE >> \$(FULLNAME).def; \
> + echo DATA PRELOAD MOVEABLE MULTIPLE NONSHARED >> \$(FULLNAME).def; \
tabs
> + echo EXPORTS >> \$(FULLNAME).def; \
> + emxexp -o \$(SHARED_OBJS) >> \$(FULLNAME).def"
> + SLIB_EXTRA_CMD='emximp -o $(LIBPREF)$(FULLNAME)_dll.a $(FULLNAME).def; emximp -o $(LIBPREF)$(FULLNAME)_dll.lib $(FULLNAME).def'
I think it should be just SLIB_EXTRA_CMD unless SLIB_CREATE_DEF_CMD gets
reused on another platform.
> + SLIB_INSTALL_EXTRA_CMD='install -m 644 $(LIBPREF)$(FULLNAME)_dll.lib $(LIBPREF)$(FULLNAME)_dll.a $(LIBDIR)'
> + SLIB_UNINSTALL_EXTRA_CMD='rm -f $(LIBDIR)/$(LIBPREF)$(FULLNAME)_dll.lib; rm -f $(LIBDIR)/$(LIBPREF)$(FULLNAME)_dll.a'
Both of these need quoting, $(LIBDIR) might contain spaces.
Diego
More information about the ffmpeg-devel
mailing list