forked from stlab/adobe_platform_libraries
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·60 lines (42 loc) · 1.32 KB
/
build.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
#!/bin/bash
# Run a command, and echo before doing so. Also checks the exit
# status and quits if there was an error.
echo_run ()
{
echo "EXEC : $@"
"$@"
r=$?
if test $r -ne 0 ; then
exit $r
fi
}
echo "INFO : Make sure you run the configure script before this one to ensure dependencies are in place."
if [ "$BUILDTOOL" == "xcode" ] ; then
if [ "$BUILDMODE" == "debug" ] ; then
CURMODE="Debug"
elif [ "$BUILDMODE" == "release" ] ; then
CURMODE="Release"
else
echo "INFO : xcode mode unknown. Defaulting to debug."
CURMODE="Debug"
fi
cd xcode_ide
echo_run xcodebuild -project begin.xcodeproj -configuration $CURMODE -arch i386
elif [ "$BUILDTOOL" == "bjam" ] ; then
# bjam is currently NOT set up for the Adobe Platform Libraries.
exit 1;
if [ "$BUILDMODE" == "debug" ] ; then
CURMODE="debug"
elif [ "$BUILDMODE" == "release" ] ; then
CURMODE="release"
else
echo "INFO : bjam mode unknown. Defaulting to debug."
CURMODE="debug"
fi
PROCESSOR_COUNT=`sysctl -n hw.ncpu`
echo "INFO : Found $PROCESSOR_COUNT processors."
echo_run ../boost_libraries/b2 --toolset=clang --without-python --hash -j$PROCESSOR_COUNT $CURMODE
else
echo "ERRR : BUILDTOOL unknown. Goodbye."
exit 1;
fi