2012-08-02 13:02:59 +08:00
|
|
|
#!/bin/bash
|
2013-03-09 00:01:03 +08:00
|
|
|
# This script will perform a clean linux build of all targets in both
|
|
|
|
# debug and release configurations. It will also ensure that all the required
|
|
|
|
# packages are installed. For day-to-day work on the linux port it is
|
|
|
|
# faster/better to simply use 'make' either at the top level or in the subpject
|
|
|
|
# you are working on.
|
2012-08-02 13:02:59 +08:00
|
|
|
|
2013-03-03 10:30:39 +08:00
|
|
|
# Exit of first error.
|
|
|
|
set -e
|
|
|
|
|
2013-04-17 23:26:01 +08:00
|
|
|
# Change directory to the location of this script
|
|
|
|
cd $(dirname ${BASH_SOURCE[0]})
|
|
|
|
|
2013-03-16 00:17:28 +08:00
|
|
|
[ -z "$COCOS2DX_USEAPT" ] && COCOS2DX_USEAPT=true
|
|
|
|
|
|
|
|
if $COCOS2DX_USEAPT; then
|
2013-04-17 23:26:01 +08:00
|
|
|
./install-deps-linux.sh
|
2013-03-09 00:01:03 +08:00
|
|
|
fi
|
|
|
|
|
2013-11-04 18:56:03 +08:00
|
|
|
mkdir -p linux-build
|
|
|
|
cd linux-build
|
|
|
|
cmake ../..
|
|
|
|
make -j10
|
2012-09-26 20:51:41 +08:00
|
|
|
|