2 # This is the shell script used to create this framework
3 # from the sources available from the GMP web page at
4 # http://www.swox.com/gmp/
5 # To build your own, copy this file next to a GMP source tree,
6 # update the SrcDir variable if necessary and execute
7 # sh build-framework.sh
12 LibraryName=libgmp.dylib
13 ExtraThings="$SrcDir/StagingAreaPPC/info $SrcDir/README $SrcDir/COPYING.LIB $SrcDir/ChangeLog build-framework.sh"
15 pushd $SrcDir || exit 1
18 CFLAGS='-arch ppc' ./configure --enable-cxx --host=powerpc-apple-darwin --disable-static --enable-shared --prefix=`pwd`/StagingAreaPPC || exit 1
19 make CCLD='gcc -Wc,-arch -Wc,ppc' || exit 1
20 make install || exit 1
23 CFLAGS='-arch i386' ./configure --enable-cxx --host=none-apple-darwin --disable-static --enable-shared --prefix=`pwd`/StagingAreaIntel || exit 1
24 make CCLD='gcc -Wc,-arch -Wc,i386' || exit 1
25 make install || exit 1
30 rm -rf $FrameworkName.framework
32 FWVDir=$FrameworkName.framework/Versions/$FrameworkVersion
35 cp -R $SrcDir/StagingAreaPPC/include $FWVDir/Headers
36 # cp $SrcDir/StagingArea/lib/$LibraryName $FWVDir/$FrameworkName
37 lipo -arch ppc $SrcDir/StagingAreaPPC/lib/$LibraryName -arch i386 $SrcDir/StagingAreaIntel/lib/$LibraryName -create -output $FWVDir/$FrameworkName
39 install_name_tool -id $FWVDir/$FrameworkName $FWVDir/$FrameworkName
41 ln -sf Versions/$FrameworkVersion/$FrameworkName $FrameworkName.framework/$FrameworkName
42 ln -sf Versions/$FrameworkVersion/Headers $FrameworkName.framework/Headers
44 for i in $ExtraThings; do
45 cp -R $i $FrameworkName.framework/
48 echo "Framework $FrameworkName.framework created."