2011-09-20 15:41:25 +08:00
|
|
|
#!/bin/sh
|
2011-09-20 18:13:24 +08:00
|
|
|
#p=$(dirname $_)
|
|
|
|
#echo "$p"
|
|
|
|
|
2011-09-28 13:56:06 +08:00
|
|
|
#path=$(dirname $0)
|
|
|
|
#path=${path/\./$(pwd)}
|
|
|
|
#echo $path
|
|
|
|
p=.
|
2011-09-20 15:41:25 +08:00
|
|
|
|
|
|
|
if [ ! -d "lib" ]; then
|
|
|
|
mkdir "lib"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -d "lib/linux" ]; then
|
|
|
|
mkdir "lib/linux"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -d "lib/linux/Debug" ]; then
|
|
|
|
mkdir "lib/linux/Debug"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -d "lib/linux/Release" ]; then
|
|
|
|
mkdir "lib/linux/Release"
|
|
|
|
fi
|
|
|
|
|
2011-10-14 17:30:49 +08:00
|
|
|
# copy cocosdenshino depended libs into lib/linux/Debug/
|
|
|
|
cp CocosDenshion/third_party/fmod/api/lib/*.so lib/linux/Debug
|
|
|
|
|
2011-09-20 15:41:25 +08:00
|
|
|
if [ $# -ne 0 ]; then
|
|
|
|
if [ $1 = "clean" ]; then
|
2011-09-20 18:13:24 +08:00
|
|
|
cd $p/cocos2dx/proj.linux
|
2011-09-20 15:41:25 +08:00
|
|
|
make clean
|
|
|
|
|
|
|
|
cd ../../
|
2011-09-20 18:13:24 +08:00
|
|
|
cd $p/CocosDenshion/proj.linux
|
2011-09-20 15:41:25 +08:00
|
|
|
make clean
|
|
|
|
|
2011-09-28 13:56:06 +08:00
|
|
|
cd ../..
|
|
|
|
cd $p/Box2D/proj.linux
|
|
|
|
make clean
|
|
|
|
|
|
|
|
cd ../..
|
|
|
|
cd $p/chipmunk/proj.linux
|
|
|
|
make clean
|
|
|
|
|
2011-09-20 15:41:25 +08:00
|
|
|
cd ../../
|
2011-09-20 18:13:24 +08:00
|
|
|
rm -r lib/linux/Debug/*.so
|
2011-09-20 15:41:25 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
else
|
2011-09-20 18:13:24 +08:00
|
|
|
cd $p/cocos2dx/proj.linux
|
2011-09-28 13:56:06 +08:00
|
|
|
echo "**********************building cocos2dx**************************"
|
2011-09-20 15:41:25 +08:00
|
|
|
make
|
|
|
|
cp -f libcocos2d.so ../../lib/linux/Debug
|
2011-09-28 13:56:06 +08:00
|
|
|
|
|
|
|
echo "**********************building cocosdenshion*********************"
|
2011-09-20 15:41:25 +08:00
|
|
|
cd ../../
|
2011-09-20 18:13:24 +08:00
|
|
|
cd $p/CocosDenshion/proj.linux
|
2011-09-20 15:41:25 +08:00
|
|
|
make
|
2011-09-28 13:56:06 +08:00
|
|
|
cp -f libcocosdenshion.so ../../lib/linux/Debug
|
|
|
|
|
|
|
|
echo "**********************building Box2D******************************"
|
|
|
|
cd ../..
|
|
|
|
cd $p/Box2D/proj.linux
|
|
|
|
make
|
|
|
|
cp -f libbox2d.a ../../lib/linux/Debug
|
2011-09-20 15:41:25 +08:00
|
|
|
|
2011-09-28 13:56:06 +08:00
|
|
|
echo "**********************building chipmunk***************************"
|
|
|
|
cd ../..
|
|
|
|
cd $p/chipmunk/proj.linux
|
|
|
|
make
|
|
|
|
cp -f libchipmunk.a ../../lib/linux/Debug
|
2011-09-20 15:41:25 +08:00
|
|
|
|
|
|
|
cd ../../
|
|
|
|
fi
|
|
|
|
|