summaryrefslogtreecommitdiffstatshomepage
path: root/scripts
diff options
context:
space:
mode:
author Miso Kim <meeso.kim@gmail.com>2017-08-23 12:09:38 +0900
committer Vas Crabb <cuavas@users.noreply.github.com>2017-08-23 13:09:38 +1000
commit41e044ae012c6b33ea6c9c88860be787b4b5d09e (patch)
tree15776d71fe5bc13044c7ded734450589d534096f /scripts
parent1de4735438cf385ec99ea51b74c2274ddeee2616 (diff)
Modification for Android build (NDK r14b, build-tools 21.1.2 and gradle 2.2.1) (#2585)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/genie.lua1
-rw-r--r--scripts/src/3rdparty.lua8
-rw-r--r--scripts/toolchain.lua8
3 files changed, 15 insertions, 2 deletions
diff --git a/scripts/genie.lua b/scripts/genie.lua
index 27c6819d1b5..22d7d05f69c 100644
--- a/scripts/genie.lua
+++ b/scripts/genie.lua
@@ -1051,6 +1051,7 @@ configuration { "android*" }
"-Wno-undef",
"-Wno-typedef-redefinition",
"-Wno-unknown-warning-option",
+ "-Wno-incompatible-ms-struct",
}
buildoptions_cpp {
"-x c++",
diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua
index 703eb242f00..38961dd045e 100644
--- a/scripts/src/3rdparty.lua
+++ b/scripts/src/3rdparty.lua
@@ -1138,9 +1138,11 @@ if _OPTIONS["targetos"]=="android" then
"GLESv1_CM",
"GLESv2",
"log",
+ "OpenSLES",
+ "c++_static"
}
linkoptions {
- "-Wl,-soname,libSDL2.so"
+ "-Wl,-soname,libSDL2.so",
}
if _OPTIONS["SEPARATE_BIN"]~="1" then
@@ -1414,8 +1416,10 @@ end
if _OPTIONS["targetos"]=="android" then
files {
- MAME_DIR .. "3rdparty/SDL2/src/audio/android/SDL_androidaudio.c",
+ MAME_DIR .. "3rdparty/SDL2/src/audio/android/opensl_io.h",
+ MAME_DIR .. "3rdparty/SDL2/src/audio/android/opensl_io.c",
MAME_DIR .. "3rdparty/SDL2/src/audio/android/SDL_androidaudio.h",
+ MAME_DIR .. "3rdparty/SDL2/src/audio/android/SDL_androidaudio.c",
MAME_DIR .. "3rdparty/SDL2/src/core/android/SDL_android.c",
MAME_DIR .. "3rdparty/SDL2/src/core/android/SDL_android.h",
MAME_DIR .. "3rdparty/SDL2/src/filesystem/android/SDL_sysfilesystem.c",
diff --git a/scripts/toolchain.lua b/scripts/toolchain.lua
index 46a1b4b22ce..7a8a5c43a19 100644
--- a/scripts/toolchain.lua
+++ b/scripts/toolchain.lua
@@ -836,6 +836,7 @@ function toolchain(_buildDir, _subDir)
includedirs {
MAME_DIR .. "3rdparty/bgfx/3rdparty/khronos",
"$(ANDROID_NDK_ROOT)/sources/cxx-stl/llvm-libc++/libcxx/include",
+ "$(ANDROID_NDK_ROOT)/sources/cxx-stl/llvm-libc++/include",
"$(ANDROID_NDK_ROOT)/sources/android/support/include",
"$(ANDROID_NDK_ROOT)/sources/android/native_app_glue",
}
@@ -852,6 +853,9 @@ function toolchain(_buildDir, _subDir)
"android",
"log",
"c++_static",
+ "c++abi",
+ "android_support",
+ "stdc++",
"gcc",
}
buildoptions {
@@ -879,6 +883,7 @@ function toolchain(_buildDir, _subDir)
configuration { "android-arm" }
libdirs {
"$(ANDROID_NDK_ROOT)/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a",
+ "$(ANDROID_NDK_ARM)/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a",
"$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-arm/usr/lib",
}
includedirs {
@@ -892,6 +897,9 @@ function toolchain(_buildDir, _subDir)
"-mfpu=vfpv3-d16",
"-mthumb",
}
+ links {
+ "unwind",
+ }
linkoptions {
"-gcc-toolchain $(ANDROID_NDK_ARM)",
"--sysroot=$(ANDROID_NDK_ROOT)/platforms/" .. androidPlatform .. "/arch-arm",