4 if [ "$1" = "--debug" ]; then
9 BUILDSUBDIR=`echo $BUILDTYPE | tr '[A-Z]' '[a-z]'`;
11 if [ "armv6l" = `arch` ] || [ "armv7l" = `arch` ]; then
12 # Native compile on the Raspberry Pi
13 mkdir -p build/raspberry/$BUILDSUBDIR
14 pushd build/raspberry/$BUILDSUBDIR
15 cmake -DCMAKE_BUILD_TYPE=$BUILDTYPE ../../..
16 if [ "armv6l" = `arch` ]; then
21 if [ "$1" != "" ]; then
22 sudo make install DESTDIR=$1
26 elif [ "$1" = "--native" ]; then
27 # Build natively on the host
28 mkdir -p build/native/$BUILDSUBDIR
29 pushd build/native/$BUILDSUBDIR
30 cmake -DCMAKE_BUILD_TYPE=$BUILDTYPE ../../..
34 # Cross compile on a more capable machine
35 mkdir -p build/arm-linux/$BUILDSUBDIR
36 pushd build/arm-linux/$BUILDSUBDIR
37 cmake -DCMAKE_TOOLCHAIN_FILE=../../../makefiles/cmake/toolchains/arm-linux-gnueabihf.cmake -DCMAKE_BUILD_TYPE=$BUILDTYPE ../../..
40 if [ "$1" != "" ]; then
41 sudo make install DESTDIR=$1