Browse Source

Enabled C++11 for Android

seanpaultaylor 11 years ago
parent
commit
e7e007b613

+ 4 - 3
build.xml

@@ -1,5 +1,5 @@
 <!-- Android build script -->
-<project name="gameplay" default="all" basedir=".">
+<project name="gameplay" default="build" basedir=".">
 
   <fail message="OS not supported. Supported platforms: Windows, MacOS X or Linux.">
     <condition>
@@ -41,12 +41,13 @@
       <exec osfamily="windows" dir="@{location}/android" executable="cmd">
         <arg value="/c"/>
         <arg value="ndk-build"/>
-      </exec>
+      </exec> 
       
     </sequential>
   </macrodef>
 
-  <target name="all">
+    
+  <target name="build">
     <build-native location="gameplay"/>
     <build-native location="samples/browser"/>
     <build-native location="samples/character"/>

+ 4 - 4
gameplay/android/AndroidManifest.xml

@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="org.gameplay3d.gameplay"
-    android:versionCode="1"
-    android:versionName="2.0" >
+        package="org.gameplay3d.gameplay"
+        android:versionCode="1"
+        android:versionName="1.0">
 
-    <uses-sdk android:minSdkVersion="14" />
+    <uses-sdk android:minSdkVersion="15" />
 
     <application
         android:icon="@drawable/ic_launcher"

+ 2 - 1
gameplay/android/jni/Android.mk

@@ -284,7 +284,8 @@ LOCAL_SRC_FILES := \
     lua/lua_VertexFormatUsage.cpp \
     lua/lua_VerticalLayout.cpp
 
-    
+LOCAL_CPPFLAGS += -std=c++11
+LOCAL_ARM_MODE := arm
 LOCAL_CFLAGS := -D__ANDROID__ -I"../../external-deps/lua/include" -I"../../external-deps/bullet/include" -I"../../external-deps/png/include" -I"../../external-deps/ogg/include" -I"../../external-deps/vorbis/include" -I"../../external-deps/openal/include"
 LOCAL_STATIC_LIBRARIES := android_native_app_glue
 

+ 3 - 1
gameplay/android/jni/Application.mk

@@ -1,3 +1,5 @@
-APP_STL     := stlport_static
+NDK_TOOLCHAIN_VERSION := clang
+APP_CPPFLAGS += -std=c++11
+APP_STL     := gnustl_static
 APP_MODULES := libgameplay
 APP_ABI     := armeabi-v7a

+ 2 - 0
gameplay/src/AIAgent.cpp

@@ -78,6 +78,8 @@ bool AIAgent::processMessage(AIMessage* message)
             }
         }
         break;
+    case AIMessage::MESSAGE_TYPE_CUSTOM:
+        break;
     }
 
     // Dispatch message to registered listener.

+ 1 - 5
gameplay/src/AIMessage.cpp

@@ -195,12 +195,8 @@ AIMessage::Parameter::~Parameter()
 
 void AIMessage::Parameter::clear()
 {
-    switch (type)
-    {
-    case AIMessage::STRING:
+    if (type == AIMessage::STRING)
         SAFE_DELETE_ARRAY(stringValue);
-        break;
-    }
 
     type = AIMessage::UNDEFINED;
 }

+ 2 - 8
samples/browser/android/AndroidManifest.xml

@@ -2,24 +2,18 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
         package="org.gameplay3d.sample_browser"
         android:versionCode="1"
-        android:versionName="2.0">
+        android:versionName="1.0">
 
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
-        
-    <!-- This is the platform API where the app was introduced. -->
-    <uses-sdk android:minSdkVersion="14" />
+    <uses-sdk android:minSdkVersion="15" />
 	<uses-feature android:glEsVersion="0x00020000"/>
 
     <application android:icon="@drawable/icon" android:label="@string/app_name" android:hasCode="true">
-
-        <!-- Our activity is the built-in NativeActivity framework class.
-             This will take care of integrating with our NDK code. -->
         <activity android:name="android.app.NativeActivity"
                 android:label="@string/app_name"
                 android:configChanges="orientation|keyboardHidden"
 				android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
 				android:screenOrientation="landscape">
-            <!-- Tell NativeActivity the name of or .so -->
             <meta-data android:name="android.app.lib_name" android:value="sample-browser" />
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />

+ 3 - 1
samples/browser/android/jni/Android.mk

@@ -108,8 +108,10 @@ LOCAL_SRC_FILES := ../../../gameplay/src/gameplay-main-android.cpp \
     TextureSample.cpp \
     TriangleSample.cpp
 
+LOCAL_CPPFLAGS += -std=c++11 -Wno-switch-enum -Wno-switch
+LOCAL_ARM_MODE := arm
 LOCAL_LDLIBS    := -llog -landroid -lEGL -lGLESv2 -lOpenSLES
-LOCAL_CFLAGS    := -D__ANDROID__ -Wno-psabi -I"../../../external-deps/lua/include" -I"../../../external-deps/bullet/include" -I"../../../external-deps/png/include" -I"../../../external-deps/ogg/include" -I"../../../external-deps/vorbis/include" -I"../../../external-deps/openal/include" -I"../../../gameplay/src"
+LOCAL_CFLAGS    := -D__ANDROID__ -I"../../../external-deps/lua/include" -I"../../../external-deps/bullet/include" -I"../../../external-deps/png/include" -I"../../../external-deps/ogg/include" -I"../../../external-deps/vorbis/include" -I"../../../external-deps/openal/include" -I"../../../gameplay/src"
 LOCAL_STATIC_LIBRARIES := android_native_app_glue libgameplay libpng libz liblua libBulletDynamics libBulletCollision libLinearMath libvorbis libogg libOpenAL
 
 include $(BUILD_SHARED_LIBRARY)

+ 3 - 1
samples/browser/android/jni/Application.mk

@@ -1,2 +1,4 @@
-APP_STL     := stlport_static
+NDK_TOOLCHAIN_VERSION := clang
+APP_CPPFLAGS += -std=c++11
+APP_STL     := gnustl_static
 APP_ABI     := armeabi-v7a

+ 4 - 0
samples/browser/src/Audio3DSample.cpp

@@ -173,6 +173,7 @@ void Audio3DSample::touchEvent(Touch::TouchEvent evt, int x, int y, unsigned int
     switch (evt)
     {
     case Touch::TOUCH_PRESS:
+    {
         if (x < 75 && y < 50)
         {
             // Toggle Vsync if the user touches the top left corner
@@ -181,10 +182,13 @@ void Audio3DSample::touchEvent(Touch::TouchEvent evt, int x, int y, unsigned int
         _prevX = x;
         _prevY = y;
         break;
+    }
     case Touch::TOUCH_RELEASE:
+    {
         _prevX = 0;
         _prevY = 0;
         break;
+     }
     case Touch::TOUCH_MOVE:
     {
         int deltaX = x - _prevX;

+ 2 - 8
samples/character/android/AndroidManifest.xml

@@ -2,24 +2,18 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
         package="org.gameplay3d.sample_character"
         android:versionCode="1"
-        android:versionName="2.0">
+        android:versionName="1.0">
 
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
-        
-    <!-- This is the platform API where the game was introduced. -->
-    <uses-sdk android:minSdkVersion="14" />
+    <uses-sdk android:minSdkVersion="15" />
 	<uses-feature android:glEsVersion="0x00020000"/>
 
     <application android:icon="@drawable/icon" android:label="@string/app_name" android:hasCode="true">
-
-        <!-- Our activity is the built-in NativeActivity framework class.
-             This will take care of integrating with our NDK code. -->
         <activity android:name="android.app.NativeActivity"
                   android:label="@string/app_name"
                   android:configChanges="orientation|keyboardHidden"
 				  android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
 				  android:screenOrientation="landscape">
-            <!-- Tell NativeActivity the name of or .so -->
             <meta-data android:name="android.app.lib_name" android:value="sample-character" />
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />

+ 3 - 1
samples/character/android/jni/Android.mk

@@ -86,8 +86,10 @@ include $(CLEAR_VARS)
 LOCAL_MODULE    := sample-character
 LOCAL_SRC_FILES := ../../../gameplay/src/gameplay-main-android.cpp CharacterGame.cpp
 
+LOCAL_CPPFLAGS += -std=c++11 -Wno-switch-enum -Wno-switch
+LOCAL_ARM_MODE := arm
 LOCAL_LDLIBS    := -llog -landroid -lEGL -lGLESv2 -lOpenSLES
-LOCAL_CFLAGS    := -D__ANDROID__ -Wno-psabi -I"../../../external-deps/lua/include" -I"../../../external-deps/bullet/include" -I"../../../external-deps/png/include" -I"../../../external-deps/ogg/include" -I"../../../external-deps/vorbis/include" -I"../../../external-deps/openal/include" -I"../../../gameplay/src"
+LOCAL_CFLAGS    := -D__ANDROID__ -I"../../../external-deps/lua/include" -I"../../../external-deps/bullet/include" -I"../../../external-deps/png/include" -I"../../../external-deps/ogg/include" -I"../../../external-deps/vorbis/include" -I"../../../external-deps/openal/include" -I"../../../gameplay/src"
 LOCAL_STATIC_LIBRARIES := android_native_app_glue libgameplay libpng libz liblua libBulletDynamics libBulletCollision libLinearMath libvorbis libogg libOpenAL
 
 include $(BUILD_SHARED_LIBRARY)

+ 3 - 1
samples/character/android/jni/Application.mk

@@ -1,3 +1,5 @@
-APP_STL     := stlport_static
+NDK_TOOLCHAIN_VERSION := clang
+APP_CPPFLAGS += -std=c++11
+APP_STL     := gnustl_static
 APP_ABI     := armeabi-v7a
 

+ 2 - 8
samples/lua/android/AndroidManifest.xml

@@ -2,24 +2,18 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
         package="org.gameplay3d.sample_lua"
         android:versionCode="1"
-        android:versionName="2.0">
+        android:versionName="1.0">
 
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
-        
-    <!-- This is the platform API where the app was introduced. -->
-    <uses-sdk android:minSdkVersion="14" />
+    <uses-sdk android:minSdkVersion="15" />
 	<uses-feature android:glEsVersion="0x00020000"/>
 
     <application android:icon="@drawable/icon" android:label="@string/app_name" android:hasCode="true">
-
-        <!-- Our activity is the built-in NativeActivity framework class.
-             This will take care of integrating with our NDK code. -->
         <activity android:name="android.app.NativeActivity"
                 android:label="@string/app_name"
                 android:configChanges="orientation|keyboardHidden"
 				android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
 				android:screenOrientation="landscape">
-            <!-- Tell NativeActivity the name of or .so -->
             <meta-data android:name="android.app.lib_name" android:value="sample-lua" />
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />

+ 3 - 1
samples/lua/android/jni/Android.mk

@@ -86,8 +86,10 @@ include $(CLEAR_VARS)
 LOCAL_MODULE    := sample-lua
 LOCAL_SRC_FILES := ../../../gameplay/src/gameplay-main-android.cpp LuaGame.cpp
 
+LOCAL_CPPFLAGS += -std=c++11 -Wno-switch-enum -Wno-switch
+LOCAL_ARM_MODE := arm
 LOCAL_LDLIBS    := -llog -landroid -lEGL -lGLESv2 -lOpenSLES
-LOCAL_CFLAGS    := -D__ANDROID__ -Wno-psabi -I"../../../external-deps/lua/include" -I"../../../external-deps/bullet/include" -I"../../../external-deps/png/include" -I"../../../external-deps/ogg/include" -I"../../../external-deps/vorbis/include" -I"../../../external-deps/openal/include" -I"../../../gameplay/src"
+LOCAL_CFLAGS    := -D__ANDROID__ -I"../../../external-deps/lua/include" -I"../../../external-deps/bullet/include" -I"../../../external-deps/png/include" -I"../../../external-deps/ogg/include" -I"../../../external-deps/vorbis/include" -I"../../../external-deps/openal/include" -I"../../../gameplay/src"
 LOCAL_STATIC_LIBRARIES := android_native_app_glue libgameplay libpng libz liblua libBulletDynamics libBulletCollision libLinearMath libvorbis libogg libOpenAL
 
 include $(BUILD_SHARED_LIBRARY)

+ 3 - 1
samples/lua/android/jni/Application.mk

@@ -1,3 +1,5 @@
-APP_STL     := stlport_static
+NDK_TOOLCHAIN_VERSION := clang
+APP_CPPFLAGS += -std=c++11
+APP_STL     := gnustl_static
 APP_ABI     := armeabi-v7a
 

+ 2 - 8
samples/mesh/android/AndroidManifest.xml

@@ -2,24 +2,18 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
         package="org.gameplay3d.sample_mesh"
         android:versionCode="1"
-        android:versionName="2.0">
+        android:versionName="1.0">
 
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
-        
-    <!-- This is the platform API where MeshGame was introduced. -->
-    <uses-sdk android:minSdkVersion="14" />
+    <uses-sdk android:minSdkVersion="15" />
 	<uses-feature android:glEsVersion="0x00020000"/>
 
     <application android:icon="@drawable/icon" android:label="@string/app_name" android:hasCode="true">
-
-        <!-- Our activity is the built-in NativeActivity framework class.
-             This will take care of integrating with our NDK code. -->
         <activity android:name="android.app.NativeActivity"
                   android:label="@string/app_name"
                   android:configChanges="orientation|keyboardHidden"
 				  android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
 				  android:screenOrientation="landscape">
-            <!-- Tell NativeActivity the name of or .so -->
             <meta-data android:name="android.app.lib_name" android:value="sample-mesh" />
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />

+ 3 - 1
samples/mesh/android/jni/Android.mk

@@ -86,8 +86,10 @@ include $(CLEAR_VARS)
 LOCAL_MODULE    := sample-mesh
 LOCAL_SRC_FILES := ../../../gameplay/src/gameplay-main-android.cpp MeshGame.cpp
 
+LOCAL_CPPFLAGS += -std=c++11 -Wno-switch-enum -Wno-switch
+LOCAL_ARM_MODE := arm
 LOCAL_LDLIBS    := -llog -landroid -lEGL -lGLESv2 -lOpenSLES
-LOCAL_CFLAGS    := -D__ANDROID__ -Wno-psabi -I"../../../external-deps/lua/include" -I"../../../external-deps/bullet/include" -I"../../../external-deps/png/include" -I"../../../external-deps/ogg/include" -I"../../../external-deps/vorbis/include" -I"../../../external-deps/openal/include" -I"../../../gameplay/src"
+LOCAL_CFLAGS    := -D__ANDROID__ -I"../../../external-deps/lua/include" -I"../../../external-deps/bullet/include" -I"../../../external-deps/png/include" -I"../../../external-deps/ogg/include" -I"../../../external-deps/vorbis/include" -I"../../../external-deps/openal/include" -I"../../../gameplay/src"
 LOCAL_STATIC_LIBRARIES := android_native_app_glue libgameplay libpng libz liblua libBulletDynamics libBulletCollision libLinearMath libvorbis libogg libOpenAL
 
 include $(BUILD_SHARED_LIBRARY)

+ 3 - 1
samples/mesh/android/jni/Application.mk

@@ -1,3 +1,5 @@
-APP_STL     := stlport_static
+NDK_TOOLCHAIN_VERSION := clang
+APP_CPPFLAGS += -std=c++11
+APP_STL     := gnustl_static
 APP_ABI     := armeabi-v7a
 

+ 2 - 8
samples/particles/android/AndroidManifest.xml

@@ -2,24 +2,18 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
         package="org.gameplay3d.sample_particles"
         android:versionCode="1"
-        android:versionName="2.0">
+        android:versionName="1.0">
 
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
-        
-    <!-- This is the platform API where the app was introduced. -->
-    <uses-sdk android:minSdkVersion="14" />
+    <uses-sdk android:minSdkVersion="15" />
 	<uses-feature android:glEsVersion="0x00020000"/>
 
     <application android:icon="@drawable/icon" android:label="@string/app_name" android:hasCode="true">
-
-        <!-- Our activity is the built-in NativeActivity framework class.
-             This will take care of integrating with our NDK code. -->
         <activity android:name="android.app.NativeActivity"
                   android:label="@string/app_name"
                   android:configChanges="orientation|keyboardHidden"
 				  android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
 				  android:screenOrientation="landscape">
-            <!-- Tell NativeActivity the name of or .so -->
             <meta-data android:name="android.app.lib_name" android:value="sample-particles" />
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />

+ 3 - 1
samples/particles/android/jni/Android.mk

@@ -86,8 +86,10 @@ include $(CLEAR_VARS)
 LOCAL_MODULE    := sample-particles
 LOCAL_SRC_FILES := ../../../gameplay/src/gameplay-main-android.cpp ParticlesGame.cpp
 
+LOCAL_CPPFLAGS += -std=c++11 -Wno-switch-enum -Wno-switch
+LOCAL_ARM_MODE := arm
 LOCAL_LDLIBS    := -llog -landroid -lEGL -lGLESv2 -lOpenSLES
-LOCAL_CFLAGS    := -D__ANDROID__ -Wno-psabi -I"../../../external-deps/lua/include" -I"../../../external-deps/bullet/include" -I"../../../external-deps/png/include" -I"../../../external-deps/ogg/include" -I"../../../external-deps/vorbis/include" -I"../../../external-deps/openal/include" -I"../../../gameplay/src"
+LOCAL_CFLAGS    := -D__ANDROID__ -I"../../../external-deps/lua/include" -I"../../../external-deps/bullet/include" -I"../../../external-deps/png/include" -I"../../../external-deps/ogg/include" -I"../../../external-deps/vorbis/include" -I"../../../external-deps/openal/include" -I"../../../gameplay/src"
 LOCAL_STATIC_LIBRARIES := android_native_app_glue libgameplay libpng libz liblua libBulletDynamics libBulletCollision libLinearMath libvorbis libogg libOpenAL
 
 include $(BUILD_SHARED_LIBRARY)

+ 3 - 1
samples/particles/android/jni/Application.mk

@@ -1,3 +1,5 @@
-APP_STL     := stlport_static
+NDK_TOOLCHAIN_VERSION := clang
+APP_CPPFLAGS += -std=c++11
+APP_STL     := gnustl_static
 APP_ABI     := armeabi-v7a
 

+ 2 - 8
samples/racer/android/AndroidManifest.xml

@@ -2,24 +2,18 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
         package="org.gameplay3d.sample_racer"
         android:versionCode="1"
-        android:versionName="2.0">
+        android:versionName="1.0">
 
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
-        
-    <!-- This is the platform API where the app was introduced. -->
-    <uses-sdk android:minSdkVersion="14" />
+    <uses-sdk android:minSdkVersion="15" />
 	<uses-feature android:glEsVersion="0x00020000"/>
 
     <application android:icon="@drawable/icon" android:label="@string/app_name" android:hasCode="true">
-
-        <!-- Our activity is the built-in NativeActivity framework class.
-             This will take care of integrating with our NDK code. -->
         <activity android:name="android.app.NativeActivity"
                 android:label="@string/app_name"
                 android:configChanges="orientation|keyboardHidden"
 				android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
 				android:screenOrientation="landscape">
-            <!-- Tell NativeActivity the name of or .so -->
             <meta-data android:name="android.app.lib_name"
                     android:value="sample-racer" />
             <intent-filter>

+ 3 - 1
samples/racer/android/jni/Android.mk

@@ -86,8 +86,10 @@ include $(CLEAR_VARS)
 LOCAL_MODULE    := sample-racer
 LOCAL_SRC_FILES := ../../../gameplay/src/gameplay-main-android.cpp RacerGame.cpp
 
+LOCAL_CPPFLAGS += -std=c++11 -Wno-switch-enum -Wno-switch
+LOCAL_ARM_MODE := arm
 LOCAL_LDLIBS    := -llog -landroid -lEGL -lGLESv2 -lOpenSLES
-LOCAL_CFLAGS    := -D__ANDROID__ -Wno-psabi -I"../../../external-deps/lua/include" -I"../../../external-deps/bullet/include" -I"../../../external-deps/png/include" -I"../../../external-deps/ogg/include" -I"../../../external-deps/vorbis/include" -I"../../../external-deps/openal/include" -I"../../../gameplay/src"
+LOCAL_CFLAGS    := -D__ANDROID__ -I"../../../external-deps/lua/include" -I"../../../external-deps/bullet/include" -I"../../../external-deps/png/include" -I"../../../external-deps/ogg/include" -I"../../../external-deps/vorbis/include" -I"../../../external-deps/openal/include" -I"../../../gameplay/src"
 LOCAL_STATIC_LIBRARIES := android_native_app_glue libgameplay libpng libz liblua libBulletDynamics libBulletCollision libLinearMath libvorbis libogg libOpenAL
 
 include $(BUILD_SHARED_LIBRARY)

+ 3 - 1
samples/racer/android/jni/Application.mk

@@ -1,3 +1,5 @@
-APP_STL     := stlport_static
+NDK_TOOLCHAIN_VERSION := clang
+APP_CPPFLAGS += -std=c++11
+APP_STL     := gnustl_static
 APP_ABI     := armeabi-v7a
 

+ 2 - 12
samples/spaceship/android/AndroidManifest.xml

@@ -2,28 +2,18 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
         package="org.gameplay3d.sample_spaceship"
         android:versionCode="1"
-        android:versionName="2.0">
+        android:versionName="1.0">
 
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
-        
-    <!-- This is the platform API where the game was introduced. -->
-    <uses-sdk android:minSdkVersion="14" />
+    <uses-sdk android:minSdkVersion="15" />
 	<uses-feature android:glEsVersion="0x00020000"/>
 
     <application android:icon="@drawable/icon" android:label="@string/app_name" android:hasCode="true">
-
-
-        <!--meta-data android:name="com.google.android.gms.games.APP_ID"
-            	   android:value="@string/app_id" /-->
-            
-        <!-- Our activity is the built-in NativeActivity framework class.
-             This will take care of integrating with our NDK code. -->
         <activity android:name="android.app.NativeActivity"
                   android:label="@string/app_name"
                   android:configChanges="orientation|keyboardHidden"
 				  android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
 				  android:screenOrientation="landscape">
-            <!-- Tell NativeActivity the name of or .so -->
             <meta-data android:name="android.app.lib_name" android:value="sample-spaceship"/>
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />

+ 3 - 1
samples/spaceship/android/jni/Android.mk

@@ -86,8 +86,10 @@ include $(CLEAR_VARS)
 LOCAL_MODULE    := sample-spaceship
 LOCAL_SRC_FILES := ../../../gameplay/src/gameplay-main-android.cpp SpaceshipGame.cpp
 
+LOCAL_CPPFLAGS += -std=c++11 -Wno-switch-enum -Wno-switch
+LOCAL_ARM_MODE := arm
 LOCAL_LDLIBS    := -llog -landroid -lEGL -lGLESv2 -lOpenSLES
-LOCAL_CFLAGS    := -D__ANDROID__ -Wno-psabi -I"../../../external-deps/lua/include" -I"../../../external-deps/bullet/include" -I"../../../external-deps/png/include" -I"../../../external-deps/ogg/include" -I"../../../external-deps/vorbis/include" -I"../../../external-deps/openal/include" -I"../../../gameplay/src"
+LOCAL_CFLAGS    := -D__ANDROID__ -I"../../../external-deps/lua/include" -I"../../../external-deps/bullet/include" -I"../../../external-deps/png/include" -I"../../../external-deps/ogg/include" -I"../../../external-deps/vorbis/include" -I"../../../external-deps/openal/include" -I"../../../gameplay/src"
 LOCAL_STATIC_LIBRARIES := android_native_app_glue libgameplay libpng libz liblua libBulletDynamics libBulletCollision libLinearMath libvorbis libogg libOpenAL
 
 include $(BUILD_SHARED_LIBRARY)

+ 3 - 1
samples/spaceship/android/jni/Application.mk

@@ -1,3 +1,5 @@
-APP_STL     := stlport_static
+NDK_TOOLCHAIN_VERSION := clang
+APP_CPPFLAGS += -std=c++11
+APP_STL     := gnustl_static
 APP_ABI     := armeabi-v7a
 

+ 3 - 1
template/android/jni/Application.mk

@@ -1,2 +1,4 @@
-APP_STL     := stlport_static
+NDK_TOOLCHAIN_VERSION := clang
+APP_CPPFLAGS += -std=c++11
+APP_STL     := gnustl_static
 APP_ABI     := armeabi-v7a

+ 3 - 1
template/android/jni/template.Android.mk

@@ -85,8 +85,10 @@ include $(CLEAR_VARS)
 LOCAL_MODULE    := TEMPLATE_PROJECT
 LOCAL_SRC_FILES := ../GAMEPLAY_PATH/gameplay/src/gameplay-main-android.cpp TemplateGame.cpp
 
+LOCAL_CPPFLAGS += -std=c++11
+LOCAL_ARM_MODE := arm
 LOCAL_LDLIBS    := -llog -landroid -lEGL -lGLESv2 -lOpenSLES
-LOCAL_CFLAGS    := -D__ANDROID__ -Wno-psabi -I"../GAMEPLAY_PATH/external-deps/lua/include" -I"../GAMEPLAY_PATH/external-deps/bullet/include" -I"../GAMEPLAY_PATH/external-deps/png/include" -I"../GAMEPLAY_PATH/external-deps/ogg/include" -I"../GAMEPLAY_PATH/external-deps/vorbis/include" -I"../GAMEPLAY_PATH/external-deps/openal/include" -I"../GAMEPLAY_PATH/gameplay/src"
+LOCAL_CFLAGS    := -D__ANDROID__ -I"../GAMEPLAY_PATH/external-deps/lua/include" -I"../GAMEPLAY_PATH/external-deps/bullet/include" -I"../GAMEPLAY_PATH/external-deps/png/include" -I"../GAMEPLAY_PATH/external-deps/ogg/include" -I"../GAMEPLAY_PATH/external-deps/vorbis/include" -I"../GAMEPLAY_PATH/external-deps/openal/include" -I"../GAMEPLAY_PATH/gameplay/src"
 
 LOCAL_STATIC_LIBRARIES := android_native_app_glue libgameplay libpng libz liblua libBulletDynamics libBulletCollision libLinearMath libvorbis libogg libOpenAL
 

+ 1 - 7
template/android/template.AndroidManifest.xml

@@ -5,21 +5,15 @@
         android:versionName="1.0">
 
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
-        
-    <!-- This is the platform API where the app was introduced. -->
-    <uses-sdk android:minSdkVersion="14" />
+    <uses-sdk android:minSdkVersion="15" />
 	<uses-feature android:glEsVersion="0x00020000"/>
 
     <application android:icon="@drawable/icon" android:label="@string/app_name" android:hasCode="true">
-
-        <!-- Our activity is the built-in NativeActivity framework class.
-             This will take care of integrating with our NDK code. -->
         <activity android:name="android.app.NativeActivity"
                 android:label="@string/app_name"
                 android:configChanges="orientation|keyboardHidden"
 				android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
 				android:screenOrientation="landscape">
-            <!-- Tell NativeActivity the name of or .so -->
             <meta-data android:name="android.app.lib_name"
                     android:value="TEMPLATE_PROJECT" />
             <intent-filter>