Update android bullet native, mk files and gradle adding header generation dependency

v3.2
joliver82 6 years ago committed by Stephen Gold
parent 39c1c6ee0a
commit af5d44b603
  1. 2
      gradle.properties
  2. 3
      jme3-bullet-native-android/build.gradle
  3. 15
      jme3-bullet-native-android/src/native/android/Android.mk
  4. 5
      jme3-bullet-native-android/src/native/android/Application.mk

@ -16,7 +16,7 @@ buildAndroidExamples = false
# Path to android NDK for building native libraries
#ndkPath=/Users/normenhansen/Documents/Code-Import/android-ndk-r7
ndkPath = /opt/android-ndk-r10c
ndkPath = /opt/android-ndk-r16b
# Path for downloading native Bullet
bulletUrl = https://github.com/bulletphysics/bullet3/archive/2.86.1.zip

@ -104,7 +104,8 @@ task copyJmeAndroid(type: Copy) {
into outputDir
}
task buildBulletNativeLib(type: Exec, dependsOn: [copyJmeAndroid, copyJmeCpp, copyBullet]) {
//dependsOn ':jme3-bullet:generateNativeHeaders'
task buildBulletNativeLib(type: Exec, dependsOn: [copyJmeAndroid, ':jme3-bullet:generateNativeHeaders', copyJmeCpp, copyBullet]) {
// args 'TARGET_PLATFORM=android-9'
// println "buildBulletNativeLib ndkWorkingPath: " + ndkWorkingPath
// println "buildBulletNativeLib rootProject.ndkCommandPath: " + rootProject.ndkCommandPath

@ -54,12 +54,23 @@ LOCAL_C_INCLUDES := $(BULLET_PATH)/\
$(BULLET_PATH)/vectormath/sse\
$(BULLET_PATH)/vectormath/neon
LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%)
#ARM mode more performant than thumb for old armeabi
ifeq ($(TARGET_ARCH_ABI),$(filter $(TARGET_ARCH_ABI), armeabi))
LOCAL_ARM_MODE := arm
endif
#Enable neon for armv7
ifeq ($(TARGET_ARCH_ABI),$(filter $(TARGET_ARCH_ABI), armeabi-v7a))
LOCAL_ARM_NEON := true
endif
LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%)
LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -ldl -lm -llog
FILE_LIST := $(wildcard $(LOCAL_PATH)/*.cpp)
FILE_LIST += $(wildcard $(LOCAL_PATH)/**/*.cpp)
FILE_LIST += $(wildcard $(LOCAL_PATH)/**/**/*.cpp)
FILE_LIST := $(filter-out $(wildcard $(LOCAL_PATH)/Bullet3OpenCL/**/*.cpp), $(FILE_LIST))
LOCAL_SRC_FILES := $(FILE_LIST:$(LOCAL_PATH)/%=%)
include $(BUILD_SHARED_LIBRARY)
include $(BUILD_SHARED_LIBRARY)

@ -1,4 +1,7 @@
APP_OPTIM := release
APP_ABI := all
#APP_ABI := armeabi-v7a
APP_STL := stlport_static
# gnustl_static or stlport_static
APP_MODULES := bulletjme
APP_CFLAGS += -funroll-loops -Ofast

Loading…
Cancel
Save