Using llvm 3.3 and android cxx-stl 4.7.

This commit is contained in:
James Chen 2013-06-21 21:27:45 +08:00
parent 4a8eabd97f
commit 992ea78f53
3 changed files with 25 additions and 12 deletions

View File

@ -7,10 +7,10 @@ prefix = cocos2dx
# all classes will be embedded in that namespace
target_namespace = cc
android_headers = -I%(androidndkdir)s/platforms/android-14/arch-arm/usr/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.6/include
android_headers = -I%(androidndkdir)s/platforms/android-14/arch-arm/usr/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.7/libs/armeabi-v7a/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.7/include
android_flags = -D_SIZE_T_DEFINED_
clang_headers = -I%(clangllvmdir)s/lib/clang/3.1/include
clang_headers = -I%(clangllvmdir)s/lib/clang/3.3/include
clang_flags = -nostdinc -x c++ -std=c++11
cocos_headers = -I%(cocosdir)s/cocos2dx/include -I%(cocosdir)s/cocos2dx/platform -I%(cocosdir)s/cocos2dx/platform/android -I%(cocosdir)s/cocos2dx -I%(cocosdir)s/cocos2dx/kazmath/include

View File

@ -7,10 +7,10 @@ prefix = cocos2dx_extension
# all classes will be embedded in that namespace
target_namespace = cc
android_headers = -I%(androidndkdir)s/platforms/android-14/arch-arm/usr/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.6/include
android_headers = -I%(androidndkdir)s/platforms/android-14/arch-arm/usr/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.7/libs/armeabi-v7a/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.7/include
android_flags = -D_SIZE_T_DEFINED_
clang_headers = -I%(clangllvmdir)s/lib/clang/3.1/include
clang_headers = -I%(clangllvmdir)s/lib/clang/3.3/include
clang_flags = -nostdinc -x c++ -std=c++11
cocos_headers = -I%(cocosdir)s/cocos2dx/include -I%(cocosdir)s/cocos2dx/platform -I%(cocosdir)s/cocos2dx/platform/android -I%(cocosdir)s/cocos2dx -I%(cocosdir)s/cocos2dx/kazmath/include -I%(cocosdir)s/extensions

View File

@ -6,6 +6,10 @@ set -e
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
COCOS2DX_ROOT="$DIR"/../..
HOST_NAME=""
LLVM_VERSION=""
LLVM_PACKAGE=""
LLVM_PACKAGE_SUFFIX=""
mkdir -p $HOME/bin
pushd $HOME/bin
@ -28,18 +32,27 @@ install_android_ndk()
install_llvm()
{
LLVM_VERSION="3.3"
if [ "$PLATFORM"x = "ios"x ]; then
HOST_NAME="apple-darwin11"
LLVM_PACKAGE="clang+llvm-3.3-x86_64-apple-darwin12"
LLVM_PACKAGE_SUFFIX = ".tar.gz"
else
HOST_NAME="linux-ubuntu_12.04"
LLVM_PACKAGE="clang+llvm-3.3-Ubuntu-13.04-x86_64-linux-gnu"
LLVM_PACKAGE_SUFFIX = ".tar.bz2"
fi
# Download llvm3.1
echo "Download clang+llvm-3.1-x86_64-${HOST_NAME}.tar.gz"
curl -O http://llvm.org/releases/3.1/clang+llvm-3.1-x86_64-${HOST_NAME}.tar.gz
echo "Decompress clang+llvm-3.1-x86_64-${HOST_NAME}.tar.gz ..."
tar xzf clang+llvm-3.1-x86_64-${HOST_NAME}.tar.gz
# Download llvm
echo "Download ${LLVM_PACKAGE} ..."
curl -O http://llvm.org/releases/${LLVM_VERSION}/${LLVM_PACKAGE}${LLVM_PACKAGE_SUFFIX}
echo "Decompress ${LLVM_PACKAGE} ..."
if [ "$PLATFORM"x = "ios"x ]; then
tar xzf ${LLVM_PACKAGE}${LLVM_PACKAGE_SUFFIX}
else
tar xjf ${LLVM_PACKAGE}${LLVM_PACKAGE_SUFFIX}
fi
# Rename llvm
mv clang+llvm-3.1-x86_64-${HOST_NAME} clang+llvm-3.1
mv ${LLVM_PACKAGE} clang+llvm-${LLVM_VERSION}
}
install_llvm_3_2()