forked from AlericInglewood/3p-colladadom
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build-cmd.sh
executable file
·131 lines (104 loc) · 4.38 KB
/
build-cmd.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#!/bin/sh
# turn on verbose debugging output for parabuild logs.
set -x
# make errors fatal
set -e
if [ -z "$AUTOBUILD" ] ; then
fail
fi
if [ "$OSTYPE" = "cygwin" ] ; then
export AUTOBUILD="$(cygpath -u $AUTOBUILD)"
fi
#execute build from top-level checkout
cd "$(dirname "$0")"
# load autbuild provided shell functions and variables
set +x
eval "$("$AUTOBUILD" source_environment)"
set -x
top="$(pwd)"
case "$AUTOBUILD_PLATFORM" in
"windows")
build_sln "projects/vc10-1.4/dom.sln" "Debug|Win32"
build_sln "projects/vc10-1.4/dom.sln" "Release|Win32"
prefix="$top/stage/libraries/i686-win32"
mkdir -p "$prefix/include/collada"
cp -R include/* "$prefix/include/collada"
libdir="$prefix/lib"
mkdir -p "$libdir"/{debug,release}
mkdir -p $prefix/lib/{debug,release}
cp "build/vc10-1.4-d/libcollada14dom22-d.lib" \
"$prefix/lib/debug/libcollada14dom22-d.lib"
cp "build/vc10-1.4-d/libcollada14dom22-d.dll" \
"$prefix/lib/debug/libcollada14dom22-d.dll"
cp "build/vc10-1.4/libcollada14dom22.lib" \
"$prefix/lib/release/libcollada14dom22.lib"
cp "build/vc10-1.4/libcollada14dom22.dll" \
"$prefix/lib/release/libcollada14dom22.dll"
;;
"windows64")
#build_sln "projects/vc11-1.4/dom.sln" "Debug|x64"
#build_sln "projects/vc11-1.4/dom.sln" "Release|x64"
mkdir -p "stage/include/collada"
cp -R include/* "stage/include/collada"
mkdir -p stage/lib/{debug,release}
cp "build/vc11-1.4-d/libcollada14dom22-d.lib" \
"stage/lib/debug/libcollada14dom22-d.lib"
cp "build/vc11-1.4-d/libcollada14dom22-d.dll" \
"stage/lib/debug/libcollada14dom22-d.dll"
cp "build/vc11-1.4/libcollada14dom22.lib" \
"stage/lib/release/libcollada14dom22.lib"
cp "build/vc11-1.4/libcollada14dom22.dll" \
"stage/lib/release/libcollada14dom22.dll"
;;
"darwin")
prefix="$top/stage/libraries/universal-darwin"
libdir="$prefix/lib"
mkdir -p "$libdir"/{debug,release}
make -j6 packageprefix=stage/packages/libraries/universal-darwin
mkdir -p "$prefix/include/collada"
cp -R include/* "$prefix/include/collada"
install_name_tool -id "@executable_path/../Resources/libcollada14dom-d.dylib" "build/mac-1.4-d/libcollada14dom-d.dylib"
install_name_tool -id "@executable_path/../Resources/libcollada14dom.dylib" "build/mac-1.4/libcollada14dom.dylib"
cp "build/mac-1.4-d/libcollada14dom-d.dylib" \
"$libdir/debug/libcollada14dom-d.dylib"
cp "build/mac-1.4-d/libminizip-d.a" \
"$libdir/debug/libminizip-d.a"
cp "build/mac-1.4/libcollada14dom.dylib" \
"$libdir/release/libcollada14dom.dylib"
cp "build/mac-1.4/libminizip.a" \
"$libdir/release/libminizip.a"
;;
"linux")
export MAKEFLAGS="-j8"
export LDFLAGS=-m32
prefix="$top/stage/libraries/i686-linux"
libdir="$prefix/lib"
mkdir -p "$libdir"/{debug,release}
make arch=x86 packageprefix="stage/packages/libraries/i686-linux"
mkdir -p "$prefix/include/collada"
cp -R include/* "$prefix/include/collada"
for lib in libcollada14dom.so libcollada14dom.so.2 libcollada14dom.so.2.2 libminizip.so libminizip.so.1 libminizip.so.1.2.3; do
cp -d "build/linux-1.4/$lib" "$libdir/release"
cp -d "build/linux-1.4-d/${lib/\.so/-d.so}" "$libdir/debug"
done
;;
"linux64")
export MAKEFLAGS="-j8"
export LDFLAGS=-m64
prefix="$top/stage/libraries/x86_64-linux"
libdir="$prefix/lib"
mkdir -p "$libdir"/{debug,release}
make arch=x64 packageprefix="stage/packages/libraries/x86_64-linux"
mkdir -p "$prefix/include/collada"
cp -R include/* "$prefix/include/collada"
for lib in libcollada14dom.so libcollada14dom.so.2 libcollada14dom.so.2.2 libminizip.so libminizip.so.1 libminizip.so.1.2.3; do
cp -d "build/linux-1.4/$lib" "$libdir/release"
cp -d "build/linux-1.4-d/${lib/\.so/-d.so}" "$libdir/debug"
done
;;
esac
mkdir -p stage/LICENSES
cp "license.txt" "stage/LICENSES/collada.txt"
mkdir -p stage/LICENSES/collada-other
cp "license/minizip-license.txt" "stage/LICENSES/collada-other/minizip.txt"
pass