From ff7cd04c9fb4fc916998f7b2735ef75b839cbef5 Mon Sep 17 00:00:00 2001 From: David 'Digit' Turner Date: Tue, 14 Feb 2012 02:43:52 +0100 Subject: Custom output directory support with NDK_OUT This patch allows the use of the NDK_OUT environment variable to specify a custom output directory for all intermediate generated files (i.e. instead of $PROJECT_PATH/obj). ndk-gdb will pick up the right location if the variable is defined too. Note that final binaries are still placed under $PROJECT_PATH/libs by default since the packaging scripts expect them to be here. This fixes http://code.google.com/p/android/issues/detail?id=25470 Change-Id: I50618df619c13f5208200f8d0902b8e4fe201de8 --- ndk-gdb | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'ndk-gdb') diff --git a/ndk-gdb b/ndk-gdb index d812a9359..2322a592b 100755 --- a/ndk-gdb +++ b/ndk-gdb @@ -509,6 +509,16 @@ if [ "$COMPAT_ABI" = none ] ; then fi log "Compatible device ABI: $COMPAT_ABI" +# Get information from the build system +GDBSETUP_INIT=`get_build_var_for_abi NDK_APP_GDBSETUP $COMPAT_ABI` +log "Using gdb setup init: $GDBSETUP_INIT" + +TOOLCHAIN_PREFIX=`get_build_var_for_abi TOOLCHAIN_PREFIX $COMPAT_ABI` +log "Using toolchain prefix: $TOOLCHAIN_PREFIX" + +APP_OUT=`get_build_var_for_abi TARGET_OUT $COMPAT_ABI` +log "Using app out directory: $APP_OUT" + # Check that the application is debuggable, or nothing will work DEBUGGABLE=`run_awk_manifest_script extract-debuggable.awk` log "Found debuggable flag: $DEBUGGABLE" @@ -553,16 +563,6 @@ if [ $? != 0 ]; then fi log "Found device gdbserver: $DEVICE_GDBSERVER" -# Get information from the build system -GDBSETUP_INIT=`get_build_var_for_abi NDK_APP_GDBSETUP $COMPAT_ABI` -log "Using gdb setup init: $GDBSETUP_INIT" - -TOOLCHAIN_PREFIX=`get_build_var_for_abi TOOLCHAIN_PREFIX $COMPAT_ABI` -log "Using toolchain prefix: $TOOLCHAIN_PREFIX" - -APP_OUT=`get_build_var_for_abi TARGET_OUT $COMPAT_ABI` -log "Using app out directory: $APP_OUT" - # Find the of the package on the device adb_var_shell2 DATA_DIR run-as $PACKAGE_NAME /system/bin/sh -c pwd if [ $? != 0 -o -z "$DATA_DIR" ] ; then -- cgit v1.2.3