Source: http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2009-October/076618.html
I am pleased to announce that FFMPEG can now be built unpatched
The iPhone. The process is still not entirely without pain, however.
Here's how it's done:
1. download and install the iPhone sdks 3.1.
2. Get the latest gas-Preprocessor and install it in/usr/local/bin
Or some other directory in your $ path.
Http://github.com/yuvi/gas-preprocessor/
3. Get the latest FFMPEG from SVN (minimum r20151 ).
4. Configure FFMPEG with one of the following commands. These give
Clean build with a default installation of iPhone sdks 3.1 on OSX leopard.
Other versions may vary.
4A. For iPhone 3gs or iPod Touch 3G 32 GB/64 GB, use this command:
. /Configure-CC =/developer/platforms/iphoneos. platform/developer/usr/bin/arm-apple-darwin9-gcc-4.2.1-as = 'Gas-Preprocessor. PL/developer/platforms/iphoneos. platform/developer/usr/bin/arm-apple-darwin9-gcc-4.2.1 '-sysroot =/developer/platforms/iphoneos. platform/developer/sdks/iphoneos3.1.sdk-enable-Cross-compile-target-OS = Darwin-arch = arm-CPU = cortex-a8-enable-pic
4b. For other iPhone or iPod Touch models, use this command:
. /Configure-CC =/developer/platforms/iphoneos. platform/developer/usr/bin/arm-apple-darwin9-gcc-4.2.1-as = 'Gas-Preprocessor. PL/developer/platforms/iphoneos. platform/developer/usr/bin/arm-apple-darwin9-gcc-4.2.1 '-sysroot =/developer/platforms/iphoneos. platform/developer/sdks/iphoneos3.1.sdk-enable-Cross-compile-target-OS = Darwin-arch = arm-CPU = arm1176jzf-s
5. Run make.
It is important to specify a correct-CPU option, and not merely
Architecture version. Failure to specify the exact CPU will give
Broken build.
For the iPhone 3gs and compatible iPods,-enable-pic is required
Avoid some nasty-looking linker warnings about relocations.
I have not tested the builds on an iPhone/iPod, so there may still be
Remaining Issues. Please report any problems you encounter.
Export thanks to David Conrad for the gas-Preprocessor script,
Which this wocould not be possible.