Merge pull request #1425 from folecr/parallelbuild

Minor update to help speed up build time
This commit is contained in:
minggo 2012-10-07 18:36:39 -07:00
commit 5170e0ac2d
1 changed files with 7 additions and 2 deletions

View File

@ -3,6 +3,7 @@ APPNAME="TestJavascript"
# options
buildexternalsfromsource=
PARALLEL_BUILD_FLAG=
usage(){
cat << EOF
@ -12,15 +13,19 @@ Build C/C++ code for $APPNAME using Android NDK
OPTIONS:
-s Build externals from source
-p Run make with -j8 option to take advantage of multiple processors
-h this help
EOF
}
while getopts "sh" OPTION; do
while getopts "sph" OPTION; do
case "$OPTION" in
s)
buildexternalsfromsource=1
;;
p)
PARALLEL_BUILD_FLAG=\-j8
;;
h)
usage
exit 0
@ -90,6 +95,6 @@ echo
set -x
"$NDK_ROOT"/ndk-build -C "$APP_ANDROID_ROOT" $* \
"$NDK_ROOT"/ndk-build $PARALLEL_BUILD_FLAG -C "$APP_ANDROID_ROOT" $* \
"NDK_MODULE_PATH=${COCOS2DX_ROOT}:${COCOS2DX_ROOT}/cocos2dx/platform/third_party/android/prebuilt" \
NDK_LOG=1 V=1