diff options
Diffstat (limited to 'scripts/genie.lua')
-rw-r--r-- | scripts/genie.lua | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/scripts/genie.lua b/scripts/genie.lua index 38e98bec587..fd8a2ae5647 100644 --- a/scripts/genie.lua +++ b/scripts/genie.lua @@ -53,6 +53,7 @@ SOUNDS = {} MACHINES = {} VIDEOS = {} BUSES = {} +bus_count = 0 newoption { trigger = "with-tools", @@ -355,6 +356,11 @@ newoption { } } +newoption { + trigger = "DRIVERS", + description = "List of drivers to compile.", +} + if _OPTIONS["SHLIB"]=="1" then LIBTYPE = "SharedLib" else @@ -488,11 +494,16 @@ msgarchiving ("Archiving $(notdir $@)...") messageskip { "SkipCreatingMessage", "SkipBuildingMessage", "SkipCleaningMessage" } -if (not os.isfile(path.join("target", _OPTIONS["target"],_OPTIONS["subtarget"] .. ".lua"))) then - error("File definition for TARGET=" .. _OPTIONS["target"] .. " SUBTARGET=" .. _OPTIONS["subtarget"] .. " does not exist") +if (_OPTIONS["DRIVERS"] == nil) then + if (not os.isfile(path.join("target", _OPTIONS["target"],_OPTIONS["subtarget"] .. ".lua"))) then + error("File definition for TARGET=" .. _OPTIONS["target"] .. " SUBTARGET=" .. _OPTIONS["subtarget"] .. " does not exist") + end + dofile (path.join("target", _OPTIONS["target"],_OPTIONS["subtarget"] .. ".lua")) +else + OUT_STR = os.outputof( PYTHON .. " " .. MAME_DIR .. "src/build/makedep.py " .. MAME_DIR .. " " .. _OPTIONS["DRIVERS"] .. " target " .. _OPTIONS["subtarget"]) + load(OUT_STR)() + os.outputof( PYTHON .. " " .. MAME_DIR .. "src/build/makedep.py " .. MAME_DIR .. " " .. _OPTIONS["DRIVERS"] .. " drivers " .. _OPTIONS["subtarget"] .. " > ".. GEN_DIR .. _OPTIONS["target"] .. "/" .. _OPTIONS["subtarget"].."/drivlist.c") end -dofile (path.join("target", _OPTIONS["target"],_OPTIONS["subtarget"] .. ".lua")) - configuration { "gmake" } flags { "SingleOutputDir", |