summaryrefslogtreecommitdiffstatshomepage
path: root/scripts/src/main.lua
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-03-27 14:06:51 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2016-03-27 17:35:23 +0200
commit158c90cf1196f219e6a7c9c3e23ca47129429a7b (patch)
tree4630c4834544108f1ec74b5b48fe4d437d3efbeb /scripts/src/main.lua
parent5640305d0ecfdbf6a1a456688f48f6f0fe22adb3 (diff)
Initial work to make MAME work on Android [Miodrag Milanovic]
Diffstat (limited to 'scripts/src/main.lua')
-rw-r--r--scripts/src/main.lua38
1 files changed, 36 insertions, 2 deletions
diff --git a/scripts/src/main.lua b/scripts/src/main.lua
index 8f03031d8aa..89b77213ce8 100644
--- a/scripts/src/main.lua
+++ b/scripts/src/main.lua
@@ -27,13 +27,17 @@ end
kind "ConsoleApp"
configuration { "android*" }
+ targetprefix "lib"
+ targetname "main"
targetextension ".so"
linkoptions {
"-shared",
}
links {
"EGL",
+ "GLESv1_CM",
"GLESv2",
+ "SDL2",
}
configuration { "pnacl" }
kind "ConsoleApp"
@@ -132,8 +136,38 @@ end
configuration { }
- if _OPTIONS["SEPARATE_BIN"]~="1" then
- targetdir(MAME_DIR)
+ if _OPTIONS["targetos"]=="android" then
+ includedirs {
+ MAME_DIR .. "3rdparty/SDL2/include",
+ }
+
+ files {
+ MAME_DIR .. "3rdparty/SDL2/src/main/android/SDL_android_main.c",
+ }
+ if _OPTIONS["SEPARATE_BIN"]~="1" then
+ if _OPTIONS["PLATFORM"]=="arm" then
+ targetdir(MAME_DIR .. "android-project/app/src/main/libs/armeabi-v7a")
+ end
+ if _OPTIONS["PLATFORM"]=="arm64" then
+ targetdir(MAME_DIR .. "android-project/app/src/main/libs/arm64-v8a")
+ end
+ if _OPTIONS["PLATFORM"]=="mips" then
+ targetdir(MAME_DIR .. "android-project/app/src/main/libs/mips")
+ end
+ if _OPTIONS["PLATFORM"]=="mips64" then
+ targetdir(MAME_DIR .. "android-project/app/src/main/libs/mips64")
+ end
+ if _OPTIONS["PLATFORM"]=="x86" then
+ targetdir(MAME_DIR .. "android-project/app/src/main/libs/x86")
+ end
+ if _OPTIONS["PLATFORM"]=="x64" then
+ targetdir(MAME_DIR .. "android-project/app/src/main/libs/x86_64")
+ end
+ end
+ else
+ if _OPTIONS["SEPARATE_BIN"]~="1" then
+ targetdir(MAME_DIR)
+ end
end
findfunction("linkProjects_" .. _OPTIONS["target"] .. "_" .. _OPTIONS["subtarget"])(_OPTIONS["target"], _OPTIONS["subtarget"])