[MPlayer-dev-eng] [Q] How to build a universal binary for the Mac OS X?
Mohammad A. Haque
mhaque at haque.net
Tue Sep 26 18:50:42 CEST 2006
On Sep 26, 2006, at 11:31 AM, Guillaume POIRIER wrote:
> Hi,
>
> On 9/26/06, Mohammad A. Haque <mhaque at haque.net> wrote:
>> On Sep 26, 2006, at 6:47 AM, Michael Niedermayer wrote:
>
> [..]
>
>
>> > well, if crosscompilation doesnt work then that should be fixed ...
>>
>> Crosscompilation does work. I've been doing my unofficial binaries on
>> my MBP and they run fine on PPC machines.
>>
>> Unless I'm really high and imagining things.
>
> Could you document how you do this? I'd be interested to know how it
> works... and possibly add the procedure to our official doc...
>
> Guillaume
I can give you something formal later unless Nicholas gets to it but
here's the gist of it and assumes you are building on an intel mac:
check out mplayer code
check out mplayerosx code
% mkdir build
% cd build
% mkdir main_intel main_ppc main_noaltivec
% for dir in *; do cd $dir; lndir ../../<mplayer source dir>; cd ../;
done
% cd main_intel and configure/compile using --disable-mp3lib;
% cd ../main_ppc and configure/compile using --target=ppc-darwin --
cc=powerpc-apple-darwin8-gcc-4.0.1 --enable-cross-compile --enable-
altivec
% cd ../main_noaltivec and configure/compile usinf --target=ppc-
darwin --cc=powerpc-apple-darwin8-gcc-4.0.1 --enable-cross-compile --
disable-altivec
% cd ../mplayerosx
% lipo -create ../main_ppc/mplayer ../main_intel/mplayer -output
External_Binaries/mplayer.app/Contents/MacOS/mplayer
% cp -a ../main_noaltivec/mplayer_noaltivec External_Binaries/
mplayer.app/Contents/MacOS/mplayer_noaltivec
% make dist
--
=====================================================================
Mohammad A. Haque http://www.haque.net/
mhaque at haque.net
"Alcohol and calculus don't mix.
Don't drink and derive." --Unknown
=====================================================================
More information about the MPlayer-dev-eng
mailing list