build-scripts/androidbuild.sh
changeset 7907 24b4e98c6010
parent 7793 6463a850229d
child 7974 8af2b2344e9e
     1.1 --- a/build-scripts/androidbuild.sh	Sun Nov 03 11:34:03 2013 -0800
     1.2 +++ b/build-scripts/androidbuild.sh	Tue Nov 05 20:07:39 2013 -0300
     1.3 @@ -24,6 +24,7 @@
     1.4  if [ -z "$1" ] || [ -z "$SOURCES" ]; then
     1.5      echo "Usage: androidbuild.sh com.yourcompany.yourapp < sources.list"
     1.6      echo "Usage: androidbuild.sh com.yourcompany.yourapp source1.c source2.c ...sourceN.c"
     1.7 +    echo "To copy SDL source instead of symlinking: COPYSOURCE=1 androidbuild.sh ... "
     1.8      exit 1
     1.9  fi
    1.10  
    1.11 @@ -63,9 +64,15 @@
    1.12  
    1.13  # Copy SDL sources
    1.14  mkdir -p $BUILDPATH/jni/SDL
    1.15 -cp -r $SDLPATH/src $BUILDPATH/jni/SDL
    1.16 -cp -r $SDLPATH/include $BUILDPATH/jni/SDL
    1.17 -cp $SDLPATH/Android.mk $BUILDPATH/jni/SDL
    1.18 +if [ -z "$COPYSOURCE" ]; then
    1.19 +    ln -s $SDLPATH/src $BUILDPATH/jni/SDL
    1.20 +    ln -s $SDLPATH/include $BUILDPATH/jni/SDL
    1.21 +else
    1.22 +    cp -r $SDLPATH/src $BUILDPATH/jni/SDL
    1.23 +    cp -r $SDLPATH/include $BUILDPATH/jni/SDL
    1.24 +fi
    1.25 +
    1.26 +cp -r $SDLPATH/Android.mk $BUILDPATH/jni/SDL
    1.27  sed -i "s|YourSourceHere.c|$MKSOURCES|g" $BUILDPATH/jni/src/Android.mk
    1.28  sed -i "s|org\.libsdl\.app|$APP|g" $BUILDPATH/AndroidManifest.xml
    1.29