summaryrefslogtreecommitdiffstatshomepage
path: root/scripts/genie.lua
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2015-03-28 06:57:07 +0100
committer Miodrag Milanovic <mmicko@gmail.com>2015-03-28 06:57:07 +0100
commitcf02c07fdabff8d685d0ba2ed7966ad6056ab1df (patch)
treedb94db813fa4949b590dba4abdea5242bfab5020 /scripts/genie.lua
parentae98425a87c0950fd744331b26d4fbed86415256 (diff)
parent523b36f8bd3e32a5bcbf7038e41777145f1b9bdc (diff)
Merge branch 'master' of https://github.com/mamedev/mame
Diffstat (limited to 'scripts/genie.lua')
-rw-r--r--scripts/genie.lua67
1 files changed, 20 insertions, 47 deletions
diff --git a/scripts/genie.lua b/scripts/genie.lua
index 635ccafa5f5..c179e5b5392 100644
--- a/scripts/genie.lua
+++ b/scripts/genie.lua
@@ -5,21 +5,6 @@ local MAME_BUILD_DIR = (MAME_DIR .. "build/")
local naclToolchain = ""
-function includeosd()
- includedirs {
- MAME_DIR .. "src/osd",
- }
- if _OPTIONS["osd"]=="windows" then
- includedirs {
- MAME_DIR .. "src/osd/windows",
- }
- else
- includedirs {
- MAME_DIR .. "src/osd/sdl",
- }
- end
-end
-
function str_to_version (str)
local val = 0
if (str == nil or str == '') then
@@ -277,16 +262,6 @@ configuration { }
dofile ("toolchain.lua")
-if _OPTIONS["osd"]=="windows" then
- forcedincludes {
- MAME_DIR .. "src/osd/windows/winprefix.h"
- }
-elseif _OPTIONS["osd"]=="sdl" then
- forcedincludes {
- MAME_DIR .. "src/osd/sdl/sdlprefix.h"
- }
-end
-
if _OPTIONS["targetos"]=="windows" then
configuration { "x64" }
defines {
@@ -608,12 +583,12 @@ end
local subdir
if (_OPTIONS["target"] == _OPTIONS["subtarget"]) then
- subdir = _OPTIONS["target"]
+ subdir = _OPTIONS["osd"] .. "/" .. _OPTIONS["target"]
else
- subdir = _OPTIONS["target"] .. _OPTIONS["subtarget"]
+ subdir = _OPTIONS["osd"] .. "/" .. _OPTIONS["target"] .. _OPTIONS["subtarget"]
end
-if not toolchain(MAME_BUILD_DIR, subdir) then
+if not toolchain(_OPTIONS["osd"], MAME_BUILD_DIR, subdir) then
return -- no action specified
end
@@ -703,20 +678,16 @@ configuration { "mingw*" }
"-static-libstdc++",
"-municode",
}
- if _OPTIONS["osd"]=="sdl" then
- linkoptions {
- "-Wl,--allow-multiple-definition",
- "-static"
- }
- links {
- "opengl32",
- "SDL2",
- "Imm32",
- "version",
- "ole32",
- "oleaut32",
- }
- end
+if _OPTIONS["osd"]=="sdl" then
+ links {
+ "opengl32",
+ "SDL2",
+ "Imm32",
+ "version",
+ "ole32",
+ "oleaut32",
+ }
+end
links {
"user32",
"gdi32",
@@ -871,17 +842,19 @@ configuration { "x64", "vs*" }
configuration { }
-group "libs"
-dofile(path.join("src", "3rdparty.lua"))
-dofile(path.join("src", "lib.lua"))
-group "core"
+group "libs"
if (not os.isfile(path.join("src", "osd", _OPTIONS["osd"] .. ".lua"))) then
error("Unsupported value '" .. _OPTIONS["osd"] .. "' for OSD")
end
-
dofile(path.join("src", "osd", _OPTIONS["osd"] .. ".lua"))
+
+dofile(path.join("src", "3rdparty.lua"))
+dofile(path.join("src", "lib.lua"))
+
+group "core"
+
dofile(path.join("src", "emu.lua"))
emuProject(_OPTIONS["target"],_OPTIONS["subtarget"])