summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--makefile10
-rw-r--r--scripts/genie.lua10
-rw-r--r--scripts/src/main.lua13
3 files changed, 31 insertions, 2 deletions
diff --git a/makefile b/makefile
index 8a4258c595e..7ee690d18b3 100644
--- a/makefile
+++ b/makefile
@@ -100,6 +100,9 @@
# IGNORE_BAD_LOCALISATION=1
# PRECOMPILE = 0
+# DEBUG_DIR=c:\test\location
+# DEBUG_ARGS= -window -video bgfx
+
ifdef PREFIX_MAKEFILE
include $(PREFIX_MAKEFILE)
else
@@ -723,6 +726,13 @@ ifdef PRECOMPILE
PARAMS += --precompile='$(PRECOMPILE)'
endif
+ifdef DEBUG_DIR
+PARAMS += --DEBUG_DIR='$(DEBUG_DIR)'
+endif
+
+ifdef DEBUG_ARGS
+PARAMS += --DEBUG_ARGS='$(DEBUG_ARGS)'
+endif
#-------------------------------------------------
# All scripts
#-------------------------------------------------
diff --git a/scripts/genie.lua b/scripts/genie.lua
index a3c59ca7462..90df0a55d76 100644
--- a/scripts/genie.lua
+++ b/scripts/genie.lua
@@ -376,6 +376,16 @@ newoption {
}
}
+newoption {
+ trigger = "DEBUG_DIR",
+ description = "Default directory for debugger.",
+}
+
+newoption {
+ trigger = "DEBUG_ARGS",
+ description = "Arguments for running debug build.",
+}
+
dofile ("extlib.lua")
if _OPTIONS["SHLIB"]=="1" then
diff --git a/scripts/src/main.lua b/scripts/src/main.lua
index 7d97eae1c1c..44e34207dd8 100644
--- a/scripts/src/main.lua
+++ b/scripts/src/main.lua
@@ -342,6 +342,15 @@ end
configuration { }
- debugdir (MAME_DIR)
- debugargs ("-window")
+ if _OPTIONS["DEBUG_DIR"]~=nil then
+ debugdir (_OPTIONS["DEBUG_DIR"])
+ else
+ debugdir (MAME_DIR)
+ end
+ if _OPTIONS["DEBUG_ARGS"]~=nil then
+ debugargs (_OPTIONS["DEBUG_ARGS"])
+ else
+ debugargs ("-window")
+ end
+
end