summaryrefslogtreecommitdiffstatshomepage
path: root/scripts/src/osd/sdl.lua
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/src/osd/sdl.lua')
-rw-r--r--scripts/src/osd/sdl.lua152
1 files changed, 51 insertions, 101 deletions
diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua
index ed660e65f9b..93dba9ae67a 100644
--- a/scripts/src/osd/sdl.lua
+++ b/scripts/src/osd/sdl.lua
@@ -29,6 +29,12 @@ function maintargetosdoptions(_target,_subtarget)
"X11",
"Xinerama",
}
+ else
+ if _OPTIONS["targetos"]=="linux" or _OPTIONS["targetos"]=="netbsd" or _OPTIONS["targetos"]=="openbsd" then
+ links {
+ "EGL",
+ }
+ end
end
if _OPTIONS["NO_USE_XINPUT"]~="1" then
@@ -48,14 +54,11 @@ function maintargetosdoptions(_target,_subtarget)
end
if _OPTIONS["targetos"]=="windows" then
- if _OPTIONS["with-bundled-sdl2"]~=nil then
+ if _OPTIONS["USE_LIBSDL"]~="1" then
configuration { "mingw*"}
links {
+ "SDL2main",
"SDL2",
- "imm32",
- "version",
- "ole32",
- "oleaut32",
}
configuration { "vs*" }
links {
@@ -65,35 +68,22 @@ function maintargetosdoptions(_target,_subtarget)
}
configuration { }
else
- if _OPTIONS["USE_LIBSDL"]~="1" then
- configuration { "mingw*"}
- links {
- "SDL2main",
- "SDL2",
- }
- configuration { "vs*" }
- links {
- "SDL2",
- "imm32",
- "version",
- }
- configuration { }
- else
- local str = backtick(sdlconfigcmd() .. " --libs | sed 's/ -lSDLmain//'")
- addlibfromstring(str)
- addoptionsfromstring(str)
- end
- configuration { "x32", "vs*" }
- libdirs {
- path.join(_OPTIONS["SDL_INSTALL_ROOT"],"lib","x86")
- }
- configuration { "x64", "vs*" }
- libdirs {
- path.join(_OPTIONS["SDL_INSTALL_ROOT"],"lib","x64")
- }
- configuration { }
+ local str = backtick(sdlconfigcmd() .. " --libs | sed 's/ -lSDLmain//'")
+ addlibfromstring(str)
+ addoptionsfromstring(str)
end
+ configuration { "x32", "vs*" }
+ libdirs {
+ path.join(_OPTIONS["SDL_INSTALL_ROOT"],"lib","x86")
+ }
+ configuration { "x64", "vs*" }
+ libdirs {
+ path.join(_OPTIONS["SDL_INSTALL_ROOT"],"lib","x64")
+ }
+ configuration { }
+
links {
+ "dinput8",
"psapi",
}
elseif _OPTIONS["targetos"]=="haiku" then
@@ -110,15 +100,6 @@ function maintargetosdoptions(_target,_subtarget)
"ole32",
}
configuration { }
-
- if _OPTIONS["targetos"]=="macosx" then
- if _OPTIONS["with-bundled-sdl2"]~=nil then
- links {
- "SDL2",
- }
- end
- end
-
end
@@ -153,7 +134,7 @@ newoption {
}
if not _OPTIONS["NO_X11"] then
- if _OPTIONS["targetos"]=="windows" or _OPTIONS["targetos"]=="macosx" or _OPTIONS["targetos"]=="haiku" or _OPTIONS["targetos"]=="asmjs" then
+ if _OPTIONS["targetos"]=="windows" or _OPTIONS["targetos"]=="macosx" or _OPTIONS["targetos"]=="haiku" or _OPTIONS["targetos"]=="asmjs" or _OPTIONS["targetos"]=="android" then
_OPTIONS["NO_X11"] = "1"
else
_OPTIONS["NO_X11"] = "0"
@@ -170,7 +151,7 @@ newoption {
}
if not _OPTIONS["NO_USE_XINPUT"] then
- if _OPTIONS["targetos"]=="windows" or _OPTIONS["targetos"]=="macosx" or _OPTIONS["targetos"]=="haiku" or _OPTIONS["targetos"]=="asmjs" then
+ if _OPTIONS["targetos"]=="windows" or _OPTIONS["targetos"]=="macosx" or _OPTIONS["targetos"]=="haiku" or _OPTIONS["targetos"]=="asmjs" or _OPTIONS["targetos"]=="android" then
_OPTIONS["NO_USE_XINPUT"] = "1"
else
_OPTIONS["NO_USE_XINPUT"] = "0"
@@ -233,28 +214,18 @@ end
BASE_TARGETOS = "unix"
SDLOS_TARGETOS = "unix"
-SDL_NETWORK = ""
if _OPTIONS["targetos"]=="linux" then
- SDL_NETWORK = "taptun"
elseif _OPTIONS["targetos"]=="openbsd" then
elseif _OPTIONS["targetos"]=="netbsd" then
- SDL_NETWORK = "pcap"
elseif _OPTIONS["targetos"]=="haiku" then
elseif _OPTIONS["targetos"]=="asmjs" then
elseif _OPTIONS["targetos"]=="windows" then
BASE_TARGETOS = "win32"
SDLOS_TARGETOS = "win32"
- SDL_NETWORK = "pcap"
elseif _OPTIONS["targetos"]=="macosx" then
SDLOS_TARGETOS = "macosx"
- SDL_NETWORK = "pcap"
end
-if _OPTIONS["with-bundled-sdl2"]~=nil then
- includedirs {
- GEN_DIR .. "includes",
- }
-end
if BASE_TARGETOS=="unix" then
if _OPTIONS["targetos"]=="macosx" then
local os_version = str_to_version(backtick("sw_vers -productVersion"))
@@ -265,6 +236,8 @@ if BASE_TARGETOS=="unix" then
linkoptions {
"-framework QuartzCore",
"-framework OpenGL",
+ "-framework IOKit",
+ "-rpath " .. _OPTIONS["SDL_FRAMEWORK_PATH"],
}
@@ -273,28 +246,17 @@ if BASE_TARGETOS=="unix" then
"-weak_framework Metal",
}
end
- if _OPTIONS["with-bundled-sdl2"]~=nil then
+ if _OPTIONS["USE_LIBSDL"]~="1" then
linkoptions {
- "-framework AudioUnit",
- "-framework CoreAudio",
- "-framework Carbon",
- "-framework ForceFeedback",
- "-framework IOKit",
- "-framework CoreVideo",
+ "-F" .. _OPTIONS["SDL_FRAMEWORK_PATH"],
+ }
+ links {
+ "SDL2.framework",
}
else
- if _OPTIONS["USE_LIBSDL"]~="1" then
- linkoptions {
- "-F" .. _OPTIONS["SDL_FRAMEWORK_PATH"],
- }
- links {
- "SDL2.framework",
- }
- else
- local str = backtick(sdlconfigcmd() .. " --libs --static | sed 's/-lSDLmain//'")
- addlibfromstring(str)
- addoptionsfromstring(str)
- end
+ local str = backtick(sdlconfigcmd() .. " --libs --static | sed 's/-lSDLmain//'")
+ addlibfromstring(str)
+ addoptionsfromstring(str)
end
else
if _OPTIONS["NO_X11"]=="1" then
@@ -306,17 +268,9 @@ if BASE_TARGETOS=="unix" then
"/usr/openwin/lib",
}
end
- if _OPTIONS["with-bundled-sdl2"]~=nil then
- if _OPTIONS["targetos"]~="android" then
- links {
- "SDL2",
- }
- end
- else
- local str = backtick(sdlconfigcmd() .. " --libs")
- addlibfromstring(str)
- addoptionsfromstring(str)
- end
+ local str = backtick(sdlconfigcmd() .. " --libs")
+ addlibfromstring(str)
+ addoptionsfromstring(str)
if _OPTIONS["targetos"]~="haiku" and _OPTIONS["targetos"]~="android" then
links {
@@ -379,12 +333,6 @@ project ("osd_" .. _OPTIONS["osd"])
MAME_DIR .. "src/osd/sdl",
}
- if _OPTIONS["targetos"]=="windows" then
- files {
- MAME_DIR .. "src/osd/windows/main.cpp",
- }
- end
-
if _OPTIONS["targetos"]=="macosx" then
files {
MAME_DIR .. "src/osd/modules/debugger/debugosx.mm",
@@ -409,6 +357,8 @@ project ("osd_" .. _OPTIONS["osd"])
MAME_DIR .. "src/osd/modules/debugger/osx/disassemblyviewer.h",
MAME_DIR .. "src/osd/modules/debugger/osx/errorlogview.mm",
MAME_DIR .. "src/osd/modules/debugger/osx/errorlogview.h",
+ MAME_DIR .. "src/osd/modules/debugger/osx/exceptionpointsview.mm",
+ MAME_DIR .. "src/osd/modules/debugger/osx/exceptionpointsview.h",
MAME_DIR .. "src/osd/modules/debugger/osx/disassemblyview.h",
MAME_DIR .. "src/osd/modules/debugger/osx/errorlogviewer.mm",
MAME_DIR .. "src/osd/modules/debugger/osx/errorlogviewer.h",
@@ -418,6 +368,8 @@ project ("osd_" .. _OPTIONS["osd"])
MAME_DIR .. "src/osd/modules/debugger/osx/memoryviewer.h",
MAME_DIR .. "src/osd/modules/debugger/osx/pointsviewer.mm",
MAME_DIR .. "src/osd/modules/debugger/osx/pointsviewer.h",
+ MAME_DIR .. "src/osd/modules/debugger/osx/registerpointsview.mm",
+ MAME_DIR .. "src/osd/modules/debugger/osx/registerpointsview.h",
MAME_DIR .. "src/osd/modules/debugger/osx/registersview.mm",
MAME_DIR .. "src/osd/modules/debugger/osx/registersview.h",
MAME_DIR .. "src/osd/modules/debugger/osx/watchpointsview.mm",
@@ -427,22 +379,19 @@ project ("osd_" .. _OPTIONS["osd"])
end
files {
+ MAME_DIR .. "src/osd/osdepend.h",
+ MAME_DIR .. "src/osd/modules/osdwindow.cpp",
+ MAME_DIR .. "src/osd/modules/osdwindow.h",
+ MAME_DIR .. "src/osd/sdl/osdsdl.cpp",
MAME_DIR .. "src/osd/sdl/osdsdl.h",
- MAME_DIR .. "src/osd/sdl/sdlprefix.h",
MAME_DIR .. "src/osd/sdl/sdlmain.cpp",
- MAME_DIR .. "src/osd/osdepend.h",
+ MAME_DIR .. "src/osd/sdl/sdlopts.cpp",
+ MAME_DIR .. "src/osd/sdl/sdlopts.h",
+ MAME_DIR .. "src/osd/sdl/sdlprefix.h",
MAME_DIR .. "src/osd/sdl/video.cpp",
MAME_DIR .. "src/osd/sdl/window.cpp",
MAME_DIR .. "src/osd/sdl/window.h",
- MAME_DIR .. "src/osd/modules/osdwindow.cpp",
- MAME_DIR .. "src/osd/modules/osdwindow.h",
- MAME_DIR .. "src/osd/modules/render/drawsdl.cpp",
}
- files {
- MAME_DIR .. "src/osd/modules/render/draw13.cpp",
- MAME_DIR .. "src/osd/modules/render/blit13.h",
- }
-
project ("ocore_" .. _OPTIONS["osd"])
targetsubdir(_OPTIONS["target"] .."_" .. _OPTIONS["subtarget"])
@@ -466,6 +415,7 @@ project ("ocore_" .. _OPTIONS["osd"])
files {
MAME_DIR .. "src/osd/osdcore.cpp",
MAME_DIR .. "src/osd/osdcore.h",
+ MAME_DIR .. "src/osd/osdfile.h",
MAME_DIR .. "src/osd/strconv.cpp",
MAME_DIR .. "src/osd/strconv.h",
MAME_DIR .. "src/osd/osdsync.cpp",
@@ -479,7 +429,6 @@ project ("ocore_" .. _OPTIONS["osd"])
if BASE_TARGETOS=="unix" then
files {
MAME_DIR .. "src/osd/modules/file/posixdir.cpp",
- MAME_DIR .. "src/osd/modules/file/posixdomain.cpp",
MAME_DIR .. "src/osd/modules/file/posixfile.cpp",
MAME_DIR .. "src/osd/modules/file/posixfile.h",
MAME_DIR .. "src/osd/modules/file/posixptty.cpp",
@@ -495,7 +444,8 @@ project ("ocore_" .. _OPTIONS["osd"])
MAME_DIR .. "src/osd/modules/file/winfile.h",
MAME_DIR .. "src/osd/modules/file/winptty.cpp",
MAME_DIR .. "src/osd/modules/file/winsocket.cpp",
- MAME_DIR .. "src/osd/windows/winutil.cpp", -- FIXME put the necessary functions somewhere more appropriate
+ MAME_DIR .. "src/osd/windows/winutil.cpp", -- FIXME put the necessary functions somewhere more appropriate?
+ MAME_DIR .. "src/osd/windows/winutil.h",
}
else
files {