Use "-j8" flag to ndk-build when building TestJavaScript

* If a "-p" for "parallel build" option is set
This commit is contained in:
folecr 2012-10-05 12:36:04 -07:00
parent 9d9f69186e
commit d8a26a8623
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