build-scripts/fatbuild.sh
changeset 1646 7c53bb4b1db4
parent 1645 2a55580b767b
child 1648 9f59d4c5aaea
equal deleted inserted replaced
1645:2a55580b767b 1646:7c53bb4b1db4
   114 fi
   114 fi
   115 
   115 
   116 #
   116 #
   117 # Combine into fat binary
   117 # Combine into fat binary
   118 #
   118 #
   119 target=`echo build/x86/build/.libs/*.dylib | sed 's|.*/||'`
   119 target=`find x86 -type f -name '*.dylib' | sed 's|.*/||'`
   120 if test x$merge = xyes; then
   120 if test x$merge = xyes; then
   121     (cd build && \
   121     (cd build && \
   122      lipo -create -o $target */build/.libs/libSDL.dylib &&
   122      lipo -create -o $target `find ppc x86 -type f -name "*.dylib"` &&
       
   123      ln -s $target libSDL-1.2.0.dylib
       
   124      ln -s $target libSDL.dylib
   123      lipo -create -o SDLMain.o */build/SDLMain.o &&
   125      lipo -create -o SDLMain.o */build/SDLMain.o &&
   124      ar cru libSDLmain.a SDLMain.o && ranlib libSDLmain.a &&
   126      ar cru libSDLmain.a SDLMain.o && ranlib libSDLmain.a &&
   125      echo "Build complete!" &&
   127      echo "Build complete!" &&
   126      echo "Files can be found in the build directory.") || exit 4
   128      echo "Files can be found in the build directory.") || exit 4
   127 fi
   129 fi