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