summaryrefslogtreecommitdiffstatshomepage
path: root/scripts/genie.lua
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2015-06-20 18:20:10 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2015-06-20 18:20:44 +0200
commit239c31b584f3d650f1e12322cbe154825539661c (patch)
tree042e486e5ad0c08d16ba8d3d53ded1dcaf64ebd4 /scripts/genie.lua
parent99056bc96dff78af6e1fc8b252fb0326936ec4b6 (diff)
Made possible creation of custom builds with given list of drivers included.
Note that game list is parsed so if macros are used they will not be found. example: make SUBTARGET=cops -j9 DRIVERS=src/mame/drivers/cops.c
Diffstat (limited to 'scripts/genie.lua')
-rw-r--r--scripts/genie.lua19
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",