summaryrefslogtreecommitdiffstatshomepage
path: root/scripts/genie.lua
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/genie.lua')
-rw-r--r--scripts/genie.lua19
1 files changed, 18 insertions, 1 deletions
diff --git a/scripts/genie.lua b/scripts/genie.lua
index 8ed2f8cc8d0..cdddde0bdfa 100644
--- a/scripts/genie.lua
+++ b/scripts/genie.lua
@@ -18,6 +18,22 @@ function str_to_version (str)
return val
end
+function findfunction(x)
+ assert(type(x) == "string")
+ local f=_G
+ for v in x:gmatch("[^%.]+") do
+ if type(f) ~= "table" then
+ return nil, "looking for '"..v.."' expected table, not "..type(f)
+ end
+ f=f[v]
+ end
+ if type(f) == "function" then
+ return f
+ else
+ return nil, "expected function, not "..type(f)
+ end
+end
+
CPUS = {}
SOUNDS = {}
MACHINES = {}
@@ -870,7 +886,8 @@ dofile(path.join("src", "emu.lua"))
emuProject(_OPTIONS["target"],_OPTIONS["subtarget"])
group "drivers"
-createProjects(_OPTIONS["target"],_OPTIONS["subtarget"])
+findfunction("createProjects_" .. _OPTIONS["target"] .. "_" .. _OPTIONS["subtarget"])(_OPTIONS["target"], _OPTIONS["subtarget"])
+
group "emulator"
dofile(path.join("src", "main.lua"))
if (_OPTIONS["target"] == _OPTIONS["subtarget"]) then