project_files/Android-build/complete_build
author Xeli
Fri, 24 Jun 2011 13:24:51 +0200
branchhedgeroid
changeset 5361 0d73a5e589b5
permissions -rwxr-xr-x
Added a script to build and install the application, users must define a path to the ndk
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5361
0d73a5e589b5 Added a script to build and install the application, users must define a path to the ndk
Xeli
parents:
diff changeset
     1
#! /bin/bash
0d73a5e589b5 Added a script to build and install the application, users must define a path to the ndk
Xeli
parents:
diff changeset
     2
0d73a5e589b5 Added a script to build and install the application, users must define a path to the ndk
Xeli
parents:
diff changeset
     3
#USER DEFINES
0d73a5e589b5 Added a script to build and install the application, users must define a path to the ndk
Xeli
parents:
diff changeset
     4
ANDROID_NDK=/home/richard/SoftDev/android/android-ndk-r5b
0d73a5e589b5 Added a script to build and install the application, users must define a path to the ndk
Xeli
parents:
diff changeset
     5
0d73a5e589b5 Added a script to build and install the application, users must define a path to the ndk
Xeli
parents:
diff changeset
     6
#END USER DEFINES
0d73a5e589b5 Added a script to build and install the application, users must define a path to the ndk
Xeli
parents:
diff changeset
     7
0d73a5e589b5 Added a script to build and install the application, users must define a path to the ndk
Xeli
parents:
diff changeset
     8
cd SDL-android-project
0d73a5e589b5 Added a script to build and install the application, users must define a path to the ndk
Xeli
parents:
diff changeset
     9
$ANDROID_NDK/ndk-build
0d73a5e589b5 Added a script to build and install the application, users must define a path to the ndk
Xeli
parents:
diff changeset
    10
if [ $? -ne 0 ] 
0d73a5e589b5 Added a script to build and install the application, users must define a path to the ndk
Xeli
parents:
diff changeset
    11
then 
0d73a5e589b5 Added a script to build and install the application, users must define a path to the ndk
Xeli
parents:
diff changeset
    12
  echo "Failed to execute $ANDROID_NDK/ndk-build"
0d73a5e589b5 Added a script to build and install the application, users must define a path to the ndk
Xeli
parents:
diff changeset
    13
  exit 1
0d73a5e589b5 Added a script to build and install the application, users must define a path to the ndk
Xeli
parents:
diff changeset
    14
fi
0d73a5e589b5 Added a script to build and install the application, users must define a path to the ndk
Xeli
parents:
diff changeset
    15
cd ..
0d73a5e589b5 Added a script to build and install the application, users must define a path to the ndk
Xeli
parents:
diff changeset
    16
make -f Makefile.android
0d73a5e589b5 Added a script to build and install the application, users must define a path to the ndk
Xeli
parents:
diff changeset
    17
if [ $? -ne 0 ] 
0d73a5e589b5 Added a script to build and install the application, users must define a path to the ndk
Xeli
parents:
diff changeset
    18
then 
0d73a5e589b5 Added a script to build and install the application, users must define a path to the ndk
Xeli
parents:
diff changeset
    19
  echo "Failed to execute make -f Makefile.android"
0d73a5e589b5 Added a script to build and install the application, users must define a path to the ndk
Xeli
parents:
diff changeset
    20
  exit 1
0d73a5e589b5 Added a script to build and install the application, users must define a path to the ndk
Xeli
parents:
diff changeset
    21
fi
0d73a5e589b5 Added a script to build and install the application, users must define a path to the ndk
Xeli
parents:
diff changeset
    22
cd SDL-android-project
0d73a5e589b5 Added a script to build and install the application, users must define a path to the ndk
Xeli
parents:
diff changeset
    23
ant install
0d73a5e589b5 Added a script to build and install the application, users must define a path to the ndk
Xeli
parents:
diff changeset
    24
if [ $? -ne 0 ] 
0d73a5e589b5 Added a script to build and install the application, users must define a path to the ndk
Xeli
parents:
diff changeset
    25
then 
0d73a5e589b5 Added a script to build and install the application, users must define a path to the ndk
Xeli
parents:
diff changeset
    26
  echo "Failed to execute ant install"
0d73a5e589b5 Added a script to build and install the application, users must define a path to the ndk
Xeli
parents:
diff changeset
    27
  exit 1
0d73a5e589b5 Added a script to build and install the application, users must define a path to the ndk
Xeli
parents:
diff changeset
    28
fi
0d73a5e589b5 Added a script to build and install the application, users must define a path to the ndk
Xeli
parents:
diff changeset
    29
exit 0