PREFIX=/User/rain3k/compiled

ERRSTR="Usage: ./ios-configure.sh <simulator | device>"

if [[ $# != 1 ]]; then

    echo $ERRSTR

    exit

fi


if [[ "$1" == simulator ]]; then

    ARCH=i386

    DEVICE=Simulator

    HOST=i386

elif [[ "$1" == device ]]; then

    ARCH=armv7

    DEVICE=OS

    CFLAGS_FLAGS="-mcpu=cortex-a8 -marm"

    HOST=arm

else

    echo $ERRSTR

    exit

fi


DEVROOT=/Developer/Platforms/iPhone${DEVICE}.platform/Developer

SDKROOT=${DEVROOT}/SDKs/iPhone${DEVICE}4.3.sdk

export CFLAGS="-isysroot ${SDKROOT} ${CFLAGS_FLAGS}"

export LDFLAGS="-isysroot ${SDKROOT}"

./configure CC="${DEVROOT}/usr/bin/gcc -arch ${ARCH}" LD=$CC --host=${HOST}-apple-darwin

신고
Posted by genius3k

티스토리 툴바