Permalink
Browse files

Made build.sh directory agnostic.

  • Loading branch information...
1 parent 7238c59 commit c6073f8cb715ce1be0ca6a9e0b99b09abd6c5c9b Nicolas Gramlich committed Jul 1, 2013
Showing with 8 additions and 5 deletions.
  1. +8 −5 jni/build.sh
View
@@ -1,15 +1,18 @@
#!/bin/bash
-NDK_DIRECTORY="/Users/ngramlich/SDKs/Android/ndk/r8/"
-PROJECT_DIRECTORY="/Users/ngramlich/Workspace/gdk/graphic_engines/AndEngine/AndEngine/"
+NDK_DIRECTORY="/Users/ngramlich/Applications/android/ndk/r8e/"
+
+SCRIPT_DIR="$( cd "$( dirname "${0}" )" && pwd )"
+
+PROJECT_DIRECTORY=${SCRIPT_DIR}/../
# Run build:
-pushd ${PROJECT_DIRECTORY}
-${NDK_DIRECTORY}ndk-build
+pushd ${PROJECT_DIRECTORY} > /dev/null
+${NDK_DIRECTORY}ndk-build -j8
# Clean temporary files:
rm -rf ${PROJECT_DIRECTORY}obj
find . -name gdbserver -print0 | xargs -0 rm -rf
find . -name gdb.setup -print0 | xargs -0 rm -rf
-popd
+popd > /dev/null

0 comments on commit c6073f8

Please sign in to comment.