summaryrefslogtreecommitdiff
path: root/tizen/build.sh
blob: 981c706be31cb8da34307a274a75e2f13487e7c0 (plain)
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
#!/bin/sh
# Build both x86 and ARM emulators by default

UNAME=`uname`
CONFIGURE_SCRIPT="./emulator_configure.sh"

case "$UNAME" in
Linux)
    NUMCPU=`grep -c 'cpu cores' /proc/cpuinfo`
    ;;
MINGW*)
    NUMCPU=`echo $NUMBER_OF_PROCESSORS`
    ;;
Darwin)
    NUMCPU=`sysctl hw.ncpu | awk '{print $2}'`
    ;;
esac

echo "Number of CPUs $NUMCPU"

if [ "x$NUMCPU" != "x" ] ; then
    NUMCPU=$(( NUMCPU + 1 ))
else
    NUMCPU=1
fi


$CONFIGURE_SCRIPT $* && make -j$NUMCPU && make install