summaryrefslogtreecommitdiffstatshomepage
path: root/scripts/src
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2015-04-04 14:44:22 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2015-04-04 14:44:22 +0200
commit6f0fd1a366cbb3cd919f66b13598c575e39edd6f (patch)
tree32cbc8b761db44feb3f0c8eb9030e40583e69548 /scripts/src
parent1026d09afa7583f0a296ac88b90ca419ebf405ec (diff)
parent73f53bb15e363712d097fe59c097de1a1fb9fed0 (diff)
Merge branch 'master' of https://github.com/mamedev/mame
Diffstat (limited to 'scripts/src')
-rw-r--r--scripts/src/osd/modules.lua8
-rw-r--r--scripts/src/osd/sdl.lua34
-rw-r--r--scripts/src/osd/sdl_cfg.lua6
-rw-r--r--scripts/src/osd/windows.lua52
-rw-r--r--scripts/src/osd/windows_cfg.lua19
5 files changed, 102 insertions, 17 deletions
diff --git a/scripts/src/osd/modules.lua b/scripts/src/osd/modules.lua
index c8e1efee2c9..eac621aaf8b 100644
--- a/scripts/src/osd/modules.lua
+++ b/scripts/src/osd/modules.lua
@@ -181,6 +181,14 @@ function osdmodulestargetconf()
end
end
+ if _OPTIONS["targetos"]=="windows" then
+ links {
+ "gdi32",
+ "dsound",
+ "dxguid",
+ }
+ end
+
end
diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua
index 7a2c24c014a..578fb17608f 100644
--- a/scripts/src/osd/sdl.lua
+++ b/scripts/src/osd/sdl.lua
@@ -43,6 +43,16 @@ function maintargetosdoptions(_target)
end
if _OPTIONS["targetos"]=="windows" then
+ if _OPTIONS["SDL_LIBVER"]=="sdl2" then
+ links {
+ "SDL2.dll",
+ }
+ else
+ links {
+ "SDL.dll",
+ }
+ end
+
configuration { "mingw*" }
linkoptions{
"-municode",
@@ -59,10 +69,6 @@ function maintargetosdoptions(_target)
libdirs {
path.join(_OPTIONS["SDL_INSTALL_ROOT"],"lib","x64")
}
- configuration { "vs*" }
- links {
- "SDL2",
- }
configuration {}
elseif _OPTIONS["targetos"]=="haiku" then
links {
@@ -102,7 +108,7 @@ newoption {
}
if not _OPTIONS["NO_X11"] then
- if _OPTIONS["targetos"]=="windows" or _OPTIONS["targetos"]=="macosx" or _OPTIONS["targetos"]=="haiku" or _OPTIONS["targetos"]=="emscripten" or _OPTIONS["targetos"]=="os2" then
+ if _OPTIONS["targetos"]=="windows" or _OPTIONS["targetos"]=="macosx" or _OPTIONS["targetos"]=="haiku" or _OPTIONS["targetos"]=="asmjs" or _OPTIONS["targetos"]=="os2" then
_OPTIONS["NO_X11"] = "1"
else
_OPTIONS["NO_X11"] = "0"
@@ -193,7 +199,7 @@ elseif _OPTIONS["targetos"]=="netbsd" then
SDL_NETWORK = "pcap"
elseif _OPTIONS["targetos"]=="haiku" then
SYNC_IMPLEMENTATION = "ntc"
-elseif _OPTIONS["targetos"]=="emscripten" then
+elseif _OPTIONS["targetos"]=="asmjs" then
SYNC_IMPLEMENTATION = "mini"
elseif _OPTIONS["targetos"]=="windows" then
BASE_TARGETOS = "win32"
@@ -282,13 +288,6 @@ elseif BASE_TARGETOS=="os2" then
}
end
-configuration { "mingw*" }
- linkoptions {
- "-static"
- }
-
-configuration { }
-
project ("osd_" .. _OPTIONS["osd"])
uuid (os.uuid("osd_" .. _OPTIONS["osd"]))
@@ -442,6 +441,15 @@ if _OPTIONS["with-tools"] then
}
if _OPTIONS["targetos"]=="windows" then
+ if _OPTIONS["SDL_LIBVER"]=="sdl2" then
+ links {
+ "SDL2.dll",
+ }
+ else
+ links {
+ "SDL.dll",
+ }
+ end
linkoptions{
"-municode",
}
diff --git a/scripts/src/osd/sdl_cfg.lua b/scripts/src/osd/sdl_cfg.lua
index 775398f87a6..aaf52e3e2cd 100644
--- a/scripts/src/osd/sdl_cfg.lua
+++ b/scripts/src/osd/sdl_cfg.lua
@@ -90,7 +90,7 @@ if BASE_TARGETOS=="unix" then
buildoptions {
backtick(sdlconfigcmd() .. " --cflags"),
}
- if _OPTIONS["targetos"]~="emscripten" then
+ if _OPTIONS["targetos"]~="asmjs" then
buildoptions {
backtick("pkg-config --cflags fontconfig"),
}
@@ -105,6 +105,10 @@ if _OPTIONS["targetos"]=="windows" then
"main=utf8_main",
}
+ configuration { "Debug" }
+ defines {
+ "MALLOC_DEBUG",
+ }
configuration { "vs*" }
includedirs {
path.join(_OPTIONS["SDL_INSTALL_ROOT"],"include")
diff --git a/scripts/src/osd/windows.lua b/scripts/src/osd/windows.lua
index 57aa0d9bb46..b5faf8722c6 100644
--- a/scripts/src/osd/windows.lua
+++ b/scripts/src/osd/windows.lua
@@ -21,6 +21,18 @@ function maintargetosdoptions(_target)
}
end
+
+ if _OPTIONS["USE_SDL"] == "1" then
+ links {
+ "SDL.dll",
+ }
+ end
+
+ links {
+ "comctl32",
+ "comdlg32",
+ }
+
local rcfile = MAME_DIR .. "src/" .. _target .. "/osd/windows/" .. _target ..".rc"
if os.isfile(rcfile) then
@@ -46,7 +58,7 @@ newoption {
description = "Minimum DirectInput version to support",
allowed = {
{ "7", "Support DirectInput 7 or later" },
- { "8", "Support DirectInput 8 or later" },
+ { "8", "Support DirectInput 8 or later" },
},
}
@@ -54,6 +66,42 @@ if not _OPTIONS["DIRECTINPUT"] then
_OPTIONS["DIRECTINPUT"] = "8"
end
+newoption {
+ trigger = "USE_SDL",
+ description = "Enable SDL sound output",
+ allowed = {
+ { "0", "Disable SDL sound output" },
+ { "1", "Enable SDL sound output" },
+ },
+}
+
+if not _OPTIONS["USE_SDL"] then
+ _OPTIONS["USE_SDL"] = "0"
+end
+
+newoption {
+ trigger = "CYGWIN_BUILD",
+ description = "Build with Cygwin tools",
+ allowed = {
+ { "0", "Build with MinGW tools" },
+ { "1", "Build with Cygwin tools" },
+ },
+}
+
+if not _OPTIONS["CYGWIN_BUILD"] then
+ _OPTIONS["CYGWIN_BUILD"] = "0"
+end
+
+
+if _OPTIONS["CYGWIN_BUILD"] == "1" then
+ buildoptions {
+ "-mmo-cygwin",
+ }
+ linkoptions {
+ "-mno-cygwin",
+ }
+end
+
project ("osd_" .. _OPTIONS["osd"])
uuid (os.uuid("osd_" .. _OPTIONS["osd"]))
@@ -163,7 +211,7 @@ project ("ocore_" .. _OPTIONS["osd"])
MAME_DIR .. "src/osd/modules/lib/osdlib_win32.c",
}
- if _OPTIONS["NOASM"]=="1" then
+ if _OPTIONS["NOASM"] == "1" then
files {
MAME_DIR .. "src/osd/modules/sync/work_mini.c",
}
diff --git a/scripts/src/osd/windows_cfg.lua b/scripts/src/osd/windows_cfg.lua
index 8bbba52f8d6..082cdc432eb 100644
--- a/scripts/src/osd/windows_cfg.lua
+++ b/scripts/src/osd/windows_cfg.lua
@@ -2,11 +2,15 @@ defines {
"UNICODE",
"_UNICODE",
"OSD_WINDOWS",
- "USE_SDL=0",
"main=utf8_main",
"_WIN32_WINNT=0x0501",
}
+configuration { "Debug" }
+ defines {
+ "MALLOC_DEBUG",
+ }
+
configuration { "vs*" }
flags {
"Unicode",
@@ -20,3 +24,16 @@ if not _OPTIONS["DONT_USE_NETWORK"] then
"OSD_NET_USE_PCAP",
}
end
+
+if _OPTIONS["USE_SDL"]=="1" then
+ defines {
+ "SDLMAME_SDL2=0",
+ "USE_XINPUT=0",
+ "USE_SDL=1",
+ "USE_SDL_SOUND",
+ }
+else
+ defines {
+ "USE_SDL=0",
+ }
+end