diff options
Diffstat (limited to 'scripts/src')
-rw-r--r-- | scripts/src/3rdparty.lua | 35 | ||||
-rw-r--r-- | scripts/src/main.lua | 38 | ||||
-rw-r--r-- | scripts/src/osd/modules.lua | 6 | ||||
-rw-r--r-- | scripts/src/osd/sdl.lua | 8 |
4 files changed, 78 insertions, 9 deletions
diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua index ecd83a5ae99..08d536a57e6 100644 --- a/scripts/src/3rdparty.lua +++ b/scripts/src/3rdparty.lua @@ -1182,9 +1182,38 @@ end if _OPTIONS["with-bundled-sdl2"] then project "SDL2" uuid "caab3327-574f-4abf-b25b-74d5238ae59b" +if _OPTIONS["targetos"]=="android" then + kind "SharedLib" + targetextension ".so" + targetprefix "lib" + links { + "GLESv1_CM", + "GLESv2", + "log", + } + 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 kind "StaticLib" - - configuration { } +end files { MAME_DIR .. "3rdparty/SDL2/include/begin_code.h", @@ -1356,7 +1385,6 @@ project "SDL2" MAME_DIR .. "3rdparty/SDL2/src/stdlib/SDL_qsort.c", MAME_DIR .. "3rdparty/SDL2/src/stdlib/SDL_stdlib.c", MAME_DIR .. "3rdparty/SDL2/src/stdlib/SDL_string.c", - MAME_DIR .. "3rdparty/SDL2/src/thread/generic/SDL_syscond.c", MAME_DIR .. "3rdparty/SDL2/src/thread/SDL_systhread.h", MAME_DIR .. "3rdparty/SDL2/src/thread/SDL_thread.c", MAME_DIR .. "3rdparty/SDL2/src/thread/SDL_thread_c.h", @@ -1520,6 +1548,7 @@ project "SDL2" if _OPTIONS["targetos"]=="windows" then files { + MAME_DIR .. "3rdparty/SDL2/src/thread/generic/SDL_syscond.c", MAME_DIR .. "3rdparty/SDL2/src/audio/directsound/SDL_directsound.c", MAME_DIR .. "3rdparty/SDL2/src/audio/directsound/SDL_directsound.h", MAME_DIR .. "3rdparty/SDL2/src/audio/winmm/SDL_winmm.c", 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"]) diff --git a/scripts/src/osd/modules.lua b/scripts/src/osd/modules.lua index dcce1a8e07b..5ea9bec2f1c 100644 --- a/scripts/src/osd/modules.lua +++ b/scripts/src/osd/modules.lua @@ -122,6 +122,12 @@ function osdmodulesbuild() end end + defines { + "__STDC_LIMIT_MACROS", + "__STDC_FORMAT_MACROS", + "__STDC_CONSTANT_MACROS", + } + files { MAME_DIR .. "src/osd/modules/render/drawbgfx.cpp", MAME_DIR .. "src/osd/modules/render/binpacker.cpp", diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua index 47a8b0ff3b6..03e82ffcb2f 100644 --- a/scripts/src/osd/sdl.lua +++ b/scripts/src/osd/sdl.lua @@ -38,7 +38,7 @@ function maintargetosdoptions(_target,_subtarget) } end - if BASE_TARGETOS=="unix" and _OPTIONS["targetos"]~="macosx" then + if BASE_TARGETOS=="unix" and _OPTIONS["targetos"]~="macosx" and _OPTIONS["targetos"]~="android" then links { "SDL2_ttf", } @@ -239,7 +239,7 @@ elseif _OPTIONS["targetos"]=="macosx" then SDL_NETWORK = "pcap" end -if _OPTIONS["with-bundled-sdl2"]~=nil then +if _OPTIONS["with-bundled-sdl2"]~=nil or _OPTIONS["targetos"]=="android" then includedirs { GEN_DIR .. "includes", } @@ -295,7 +295,7 @@ if BASE_TARGETOS=="unix" then "/usr/openwin/lib", } end - if _OPTIONS["with-bundled-sdl2"]~=nil then + if _OPTIONS["with-bundled-sdl2"]~=nil and _OPTIONS["targetos"]~="android" then links { "SDL2", } @@ -305,7 +305,7 @@ if BASE_TARGETOS=="unix" then addoptionsfromstring(str) end - if _OPTIONS["targetos"]~="haiku" then + if _OPTIONS["targetos"]~="haiku" and _OPTIONS["targetos"]~="android" then links { "m", "pthread", |