-
Notifications
You must be signed in to change notification settings - Fork 3
/
build-webos.sh
77 lines (60 loc) · 1.42 KB
/
build-webos.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/bin/sh
#p=$(dirname $_)
#echo "$p"
#path=$(dirname $0)
#path=${path/\./$(pwd)}
#echo $path
p=.
if [ ! -d "lib" ]; then
mkdir "lib"
fi
if [ ! -d "lib/webos" ]; then
mkdir "lib/webos"
fi
if [ ! -d "lib/webos/Debug" ]; then
mkdir "lib/webos/Debug"
fi
if [ ! -d "lib/webos/Release" ]; then
mkdir "lib/webos/Release"
fi
# copy cocosdenshino depended libs into lib/webos/Debug/
#cp CocosDenshion/third_party/fmod/api/lib/*.so lib/webos/Debug
if [ $# -ne 0 ]; then
if [ $1 = "clean" ]; then
cd $p/cocos2dx/proj.webos
make clean
cd ../../
cd $p/CocosDenshion/proj.webos
make clean
cd ../..
cd $p/Box2D/proj.webos
make clean
cd ../..
cd $p/chipmunk/proj.webos
make clean
cd ../../
rm -r lib/webos/Debug/*.so
rm -r lib/webos/Debug/*.a
fi
else
cd $p/cocos2dx/proj.webos
echo "**********************building cocos2dx**************************"
make
cp -f libcocos2d.so ../../lib/webos/Debug
# echo "**********************building cocosdenshion*********************"
cd ../../
cd $p/CocosDenshion/proj.webos
make
cp -f libcocosdenshion.so ../../lib/webos/Debug
echo "**********************building Box2D******************************"
cd ../..
cd $p/Box2D/proj.webos
make
cp -f libbox2d.a ../../lib/webos/Debug
echo "**********************building chipmunk***************************"
cd ../..
cd $p/chipmunk/proj.webos
make
cp -f libchipmunk.a ../../lib/webos/Debug
cd ../../
fi