It took me a while to compile LibiCal for the arm64 architecture and x86_64 for iOS (device and simulator). Thought it might be useful to others. Here are the steps that I followed to compile LibiCal-1.0. I took the code from the link below
Compilation libical
and changed the bit for Xcode 5.1
1) download LibiCal from the site below
http://sourceforge.net/projects/freeassociation/
Disconnect and enter the libCal-1.0 folder. Then run
./ self-loading
(you must download the make tools from http://www.jattcode.com/installing-autoconf-automake-libtool-on-mac-osx-mountain-lion/ )
Use below script
#!/bin/sh
PATH="`xcode-select -print-path`/usr/bin:/usr/bin:/bin"
PREFIX=${HOME}/Library/libical
OUTPUTDIR=../libical-build
export ARCH=arm64
export SDKVER="7.1"
export DEVROOT=`xcode-select --print-path`
export SDKROOT=$DEVROOT/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS${SDKVER}.sdk
export IOSROOT=$DEVROOT/Platforms/iPhoneOS.platform
if [ ! -d $DEVROOT ]
then
echo "Developer Root not found! - $DEVROOT"
exit
fi
echo "DEVROOT = $DEVROOT"
if [ ! -d $SDKROOT ]
then
echo "SDK Root not found! - $SDKROOT"
exit
fi
echo "SDKROOT = $SDKROOT"
if [ ! -d $IOSROOT ]
then
echo "iOS Root not found! - $IOSROOT"
exit
fi
echo "IOSROOT = $IOSROOT"
export CPPFLAGS="-arch $ARCH -I$SDKROOT/usr/include -I$IOSROOT/Developer/usr/llvm-gcc-4.2/lib/gcc/arm-apple-darwin10/4.2.1/include"
export CFLAGS="$CPPFLAGS -pipe -no-cpp-precomp -isysroot $SDKROOT"
export CXXFLAGS="$CFLAGS"
export LDFLAGS="-L$SDKROOT/usr/lib/ -arch $ARCH"
export CLANG=$DEVROOT/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
export CC=$CLANG
export CXX=$CLANG
export LD=$IOSROOT/Developer/usr/bin/ld
export AR=$IOSROOT/Developer/usr/bin/ar
export AS=$IOSROOT/Developer/usr/bin/as
export LIBTOOL=$IOSROOT/usr/bin/libtool
export STRIP=$IOSROOT/Developer/usr/bin/strip
export RANLIB=$IOSROOT/Developer/usr/bin/ranlib
HOST=arm-apple-darwin10
if [ ! -f $CC ]
then
echo "C Compiler not found! - $CC"
exit
fi
if [ ! -f $CXX ]
then
echo "C++ Compiler not found! - $CXX"
exit
fi
if [ ! -f $LD ]
then
echo "Linker not found! - $LD"
exit
fi
if [ -d $OUTPUTDIR/$ARCH ]
then
rm -rf $OUTPUTDIR/$ARCH
fi
find . -name \*.a -exec rm {} \;
make clean
./configure --prefix=$PREFIX --disable-dependency-tracking --host $HOST CXX=$CXX CC=$CC LD=$LD AR=$AR AS=$AS LIBTOOL=$LIBTOOL STRIP=$STRIP RANLIB=$RANLIB
make -j4
mkdir -p $OUTPUTDIR
mkdir -p $OUTPUTDIR/$ARCH
cp `find . -name \*.a` $OUTPUTDIR/$ARCH/
xcrun -sdk iphoneos lipo -info $OUTPUTDIR/$ARCH/*.a
echo $ARCH DONE
echo "See $OUTPUTDIR"
change the line: "export ARCH = arm64" to get the desired architecture, i.e. arm64, armv7, armv7s.
.. /libical -build.
x86_64.
get build x86_64.
tar -xovf libical-1.0.tar
cd libical-1.0
./bootstrap
./configure
make
libical.a src/libical/.libs/libical.a.
, . (, lipo).
export DEVROT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lip
$DEVROOT/usr/bin/lipo
-arch arm64 $OUTPUTDIR/armv6/libical.a
-arch i386 $OUTPUTDIR/i386/libical_Simulator.a
-arch armv7 $OUTPUTDIR/x86_64/libical.a
-arch armv7s $OUTPUTDIR/x86_64/libical.a
-arch x86_64 $OUTPUTDIR/x86_64/libical.a
-create -output $OUTPUTDIR/libical_fat_universal.a
OUTPUTDIR.
, -, Libical iOS.