diff --git a/android/jni/Android.mk b/android/jni/Android.mk index a4cdbbaa3..365b03b47 100644 --- a/android/jni/Android.mk +++ b/android/jni/Android.mk @@ -31,6 +31,26 @@ ARCH_FILES := \ $(SRC)/GPU/Common/VertexDecoderX86.cpp endif +ifeq ($(TARGET_ARCH_ABI),x86_64) +ARCH_FILES := \ + $(SRC)/Common/ABI.cpp \ + $(SRC)/Common/x64Emitter.cpp \ + $(SRC)/Common/CPUDetect.cpp \ + $(SRC)/Common/Thunk.cpp \ + $(SRC)/Core/MIPS/x86/CompALU.cpp \ + $(SRC)/Core/MIPS/x86/CompBranch.cpp \ + $(SRC)/Core/MIPS/x86/CompFPU.cpp \ + $(SRC)/Core/MIPS/x86/CompLoadStore.cpp \ + $(SRC)/Core/MIPS/x86/CompVFPU.cpp \ + $(SRC)/Core/MIPS/x86/CompReplace.cpp \ + $(SRC)/Core/MIPS/x86/Asm.cpp \ + $(SRC)/Core/MIPS/x86/Jit.cpp \ + $(SRC)/Core/MIPS/x86/JitSafeMem.cpp \ + $(SRC)/Core/MIPS/x86/RegCache.cpp \ + $(SRC)/Core/MIPS/x86/RegCacheFPU.cpp \ + $(SRC)/GPU/Common/VertexDecoderX86.cpp +endif + ifeq ($(findstring armeabi-v7a,$(TARGET_ARCH_ABI)),armeabi-v7a) ARCH_FILES := \ $(SRC)/GPU/Common/TextureDecoderNEON.cpp.neon \ diff --git a/android/jni/Application.mk b/android/jni/Application.mk index 2700b5404..85f250298 100644 --- a/android/jni/Application.mk +++ b/android/jni/Application.mk @@ -1,5 +1,5 @@ APP_STL := gnustl_static APP_PLATFORM := android-9 -APP_ABI := arm64-v8a armeabi-v7a x86 +APP_ABI := arm64-v8a armeabi-v7a x86 x86_64 APP_GNUSTL_CPP_FEATURES := -# NDK_TOOLCHAIN_VERSION := 4.9 +NDK_TOOLCHAIN_VERSION := 4.9 diff --git a/android/jni/Locals.mk b/android/jni/Locals.mk index 1e566d329..45c3e33dd 100644 --- a/android/jni/Locals.mk +++ b/android/jni/Locals.mk @@ -48,6 +48,18 @@ ifeq ($(TARGET_ARCH_ABI),x86) LOCAL_CFLAGS := $(LOCAL_CFLAGS) -D_ARCH_32 -D_M_IX86 -fomit-frame-pointer -mtune=atom -mfpmath=sse -mssse3 -mstackrealign endif + +ifeq ($(TARGET_ARCH_ABI),x86_64) + LOCAL_LDLIBS += $(LOCAL_PATH)/../../ffmpeg/android/x86_64/lib/libavformat.a + LOCAL_LDLIBS += $(LOCAL_PATH)/../../ffmpeg/android/x86_64/lib/libavcodec.a + LOCAL_LDLIBS += $(LOCAL_PATH)/../../ffmpeg/android/x86_64/lib/libswresample.a + LOCAL_LDLIBS += $(LOCAL_PATH)/../../ffmpeg/android/x86_64/lib/libswscale.a + LOCAL_LDLIBS += $(LOCAL_PATH)/../../ffmpeg/android/x86_64/lib/libavutil.a + LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../ffmpeg/android/x86_64/include + + LOCAL_CFLAGS := $(LOCAL_CFLAGS) -D_ARCH_64 -D_M_IX64 -fomit-frame-pointer -mtune=atom -mfpmath=sse -mssse3 -mstackrealign +endif + ifeq ($(TARGET_ARCH_ABI),arm64-v8a) LOCAL_LDLIBS += $(LOCAL_PATH)/../../ffmpeg/android/arm64/lib/libavformat.a LOCAL_LDLIBS += $(LOCAL_PATH)/../../ffmpeg/android/arm64/lib/libavcodec.a diff --git a/ext/native/Android.mk b/ext/native/Android.mk index 74dcec385..eed7f0da1 100644 --- a/ext/native/Android.mk +++ b/ext/native/Android.mk @@ -116,5 +116,10 @@ LOCAL_CFLAGS := $(LOCAL_CFLAGS) -D_M_IX86 LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \ math/fast/fast_matrix_sse.c endif +else ifeq ($(TARGET_ARCH_ABI),x86_64) +LOCAL_CFLAGS := $(LOCAL_CFLAGS) -D_M_X64 +LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \ + math/fast/fast_matrix_sse.c +endif include $(BUILD_STATIC_LIBRARY) diff --git a/ext/native/gfx/gl_common.h b/ext/native/gfx/gl_common.h index dc654ee77..7a1bc97ef 100644 --- a/ext/native/gfx/gl_common.h +++ b/ext/native/gfx/gl_common.h @@ -55,7 +55,7 @@ extern PFNGLDRAWTEXTURENVPROC glDrawTextureNV; typedef void (EGLAPIENTRYP PFNGLBLITFRAMEBUFFERNVPROC) ( GLint srcX0, GLint srcY0, GLint srcX1, GLuint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLuint dstY1, - GLint mask, GLenum filter); + GLbitfield mask, GLenum filter); #endif extern PFNGLBLITFRAMEBUFFERNVPROC glBlitFramebufferNV;