2015-01-26 07:01:15 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
2015-01-26 13:13:53 -05:00
|
|
|
REBUILD=''
|
|
|
|
NVIDIA=''
|
|
|
|
NATIVE=''
|
2015-05-28 09:21:45 -04:00
|
|
|
CONCURRENCY='-j9'
|
|
|
|
QMAKE=${QMAKE:-qmake}
|
2015-01-26 13:13:53 -05:00
|
|
|
|
|
|
|
while test $# -gt 0
|
|
|
|
do
|
|
|
|
case "$1" in
|
|
|
|
--rebuild) REBUILD='1'
|
|
|
|
;;
|
|
|
|
--nvidia) NVIDIA="CONFIG += nvidia"
|
|
|
|
;;
|
|
|
|
--native) NATIVE="CONFIG += native"
|
|
|
|
;;
|
2015-05-28 09:21:45 -04:00
|
|
|
--travis) CONCURRENCY="-j1"
|
|
|
|
;;
|
2015-01-26 13:13:53 -05:00
|
|
|
--*) echo "bad option $1"; exit 1
|
|
|
|
;;
|
|
|
|
*) echo "unrecognised argument $1"; exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
|
2015-01-26 07:01:15 -05:00
|
|
|
DIR=$( cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )
|
|
|
|
|
|
|
|
for PROJ in ${DIR}/{Ember,EmberCL,EmberGenome,EmberRender,EmberAnimate,Fractorium}
|
|
|
|
do
|
|
|
|
pushd $PROJ
|
2015-01-26 13:13:53 -05:00
|
|
|
if [ "x1" = "x$REBUILD" ]; then
|
2015-01-26 07:01:15 -05:00
|
|
|
make clean
|
|
|
|
fi
|
2015-05-28 09:21:45 -04:00
|
|
|
$QMAKE "$NVIDIA" "$NATIVE"
|
|
|
|
make $CONCURRENCY
|
2015-01-26 07:01:15 -05:00
|
|
|
if [ "x$?" != "x0" ]; then
|
|
|
|
echo "Build failed! Check output for errors."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
popd
|
|
|
|
done
|
|
|
|
|