diff options
author | 2015-04-08 08:52:02 +0200 | |
---|---|---|
committer | 2015-04-08 08:52:02 +0200 | |
commit | cc35d05ec05209e6c453be96e16d32dcb15c3f1b (patch) | |
tree | 1aafde544d949f4dfa4011e6fe419b1fd184b845 | |
parent | 03275c7b68de15c88b7cd427f52593bf4ec47102 (diff) |
added SEPARATE_BIN option to put executable files in bin folder and not in main (useful for continuous integration )(nw)
-rw-r--r-- | makefile | 4 | ||||
-rw-r--r-- | scripts/genie.lua | 9 | ||||
-rw-r--r-- | scripts/src/main.lua | 6 | ||||
-rw-r--r-- | scripts/src/osd/sdl.lua | 8 | ||||
-rw-r--r-- | scripts/src/osd/windows.lua | 4 | ||||
-rw-r--r-- | scripts/src/tools.lua | 45 |
6 files changed, 57 insertions, 19 deletions
@@ -74,6 +74,7 @@ # FASTDEBUG = 1 # FILTER_DEPS = 1 +# SEPARATE_BIN = 1 -include useroptions.mak @@ -490,6 +491,9 @@ ifdef FILTER_DEPS PARAMS += --FILTER_DEPS='$(FILTER_DEPS)' endif +ifdef SEPARATE_BIN +PARAMS += --SEPARATE_BIN='$(SEPARATE_BIN)' +endif #------------------------------------------------- # All scripts diff --git a/scripts/genie.lua b/scripts/genie.lua index c945dc1068b..0a70ebb904f 100644 --- a/scripts/genie.lua +++ b/scripts/genie.lua @@ -263,6 +263,15 @@ newoption { } } +newoption { + trigger = "SEPARATE_BIN", + description = "Use separate bin folders.", + allowed = { + { "0", "Disabled" }, + { "1", "Enabled" }, + } +} + if not _OPTIONS["BIGENDIAN"] then _OPTIONS["BIGENDIAN"] = "0" end diff --git a/scripts/src/main.lua b/scripts/src/main.lua index c73f3f450e6..10796c02bb7 100644 --- a/scripts/src/main.lua +++ b/scripts/src/main.lua @@ -26,6 +26,11 @@ function mainProject(_target, _subtarget) flags { "Unicode", } + + if _OPTIONS["SEPARATE_BIN"]~="1" then + targetdir(MAME_DIR) + end + configuration { "mingw*" or "vs*" } targetextension ".exe" @@ -33,7 +38,6 @@ function mainProject(_target, _subtarget) targetextension ".bc" configuration { } - targetdir(MAME_DIR) findfunction("linkProjects_" .. _OPTIONS["target"] .. "_" .. _OPTIONS["subtarget"])(_OPTIONS["target"], _OPTIONS["subtarget"]) links { diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua index 202e0f8571d..8b713bf635a 100644 --- a/scripts/src/osd/sdl.lua +++ b/scripts/src/osd/sdl.lua @@ -429,7 +429,9 @@ if _OPTIONS["with-tools"] then MAME_DIR .. "src/lib/util", } - targetdir(MAME_DIR) + if _OPTIONS["SEPARATE_BIN"]~="1" then + targetdir(MAME_DIR) + end links { "utils", @@ -480,7 +482,9 @@ if _OPTIONS["targetos"] == "macosx" and _OPTIONS["with-tools"] then dofile("sdl_cfg.lua") - targetdir(MAME_DIR) + if _OPTIONS["SEPARATE_BIN"]~="1" then + targetdir(MAME_DIR) + end linkoptions { "-sectcreate __TEXT __info_plist " .. MAME_DIR .. "src/osd/sdl/aueffectutil-Info.plist", diff --git a/scripts/src/osd/windows.lua b/scripts/src/osd/windows.lua index c2277109db1..8c6c5dd1cb7 100644 --- a/scripts/src/osd/windows.lua +++ b/scripts/src/osd/windows.lua @@ -217,7 +217,9 @@ if _OPTIONS["with-tools"] then "ForceCPP", } - targetdir(MAME_DIR) + if _OPTIONS["SEPARATE_BIN"]~="1" then + targetdir(MAME_DIR) + end links { "ocore_" .. _OPTIONS["osd"], diff --git a/scripts/src/tools.lua b/scripts/src/tools.lua index 2bab6a7a890..cb7602a5b54 100644 --- a/scripts/src/tools.lua +++ b/scripts/src/tools.lua @@ -10,8 +10,9 @@ options { "ForceCPP", } -configuration { } +if _OPTIONS["SEPARATE_BIN"]~="1" then targetdir(MAME_DIR) +end links { "utils", @@ -41,8 +42,9 @@ options { "ForceCPP", } -configuration { } +if _OPTIONS["SEPARATE_BIN"]~="1" then targetdir(MAME_DIR) +end links { "utils", @@ -76,8 +78,9 @@ options { "ForceCPP", } -configuration { } +if _OPTIONS["SEPARATE_BIN"]~="1" then targetdir(MAME_DIR) +end links { "utils", @@ -107,8 +110,9 @@ options { "ForceCPP", } -configuration { } +if _OPTIONS["SEPARATE_BIN"]~="1" then targetdir(MAME_DIR) +end links { "dasm", @@ -145,8 +149,9 @@ options { "ForceCPP", } -configuration { } +if _OPTIONS["SEPARATE_BIN"]~="1" then targetdir(MAME_DIR) +end links { "utils", @@ -179,8 +184,9 @@ options { "ForceCPP", } -configuration { } +if _OPTIONS["SEPARATE_BIN"]~="1" then targetdir(MAME_DIR) +end links { "utils", @@ -213,8 +219,9 @@ options { "ForceCPP", } -configuration { } +if _OPTIONS["SEPARATE_BIN"]~="1" then targetdir(MAME_DIR) +end links { "utils", @@ -244,8 +251,9 @@ options { "ForceCPP", } -configuration { } +if _OPTIONS["SEPARATE_BIN"]~="1" then targetdir(MAME_DIR) +end links { "utils", @@ -275,8 +283,9 @@ options { "ForceCPP", } -configuration { } +if _OPTIONS["SEPARATE_BIN"]~="1" then targetdir(MAME_DIR) +end links { "utils", @@ -306,8 +315,9 @@ options { "ForceCPP", } -configuration { } +if _OPTIONS["SEPARATE_BIN"]~="1" then targetdir(MAME_DIR) +end links { "utils", @@ -339,8 +349,9 @@ options { "ForceCPP", } -configuration { } +if _OPTIONS["SEPARATE_BIN"]~="1" then targetdir(MAME_DIR) +end links { "utils", @@ -370,8 +381,9 @@ options { "ForceCPP", } -configuration { } +if _OPTIONS["SEPARATE_BIN"]~="1" then targetdir(MAME_DIR) +end links { "utils", @@ -408,8 +420,9 @@ options { "ForceCPP", } -configuration { } +if _OPTIONS["SEPARATE_BIN"]~="1" then targetdir(MAME_DIR) +end links { "formats", @@ -443,8 +456,9 @@ options { "ForceCPP", } -configuration { } +if _OPTIONS["SEPARATE_BIN"]~="1" then targetdir(MAME_DIR) +end links { "formats", @@ -479,8 +493,9 @@ options { "ForceCPP", } -configuration { } +if _OPTIONS["SEPARATE_BIN"]~="1" then targetdir(MAME_DIR) +end links { "formats", |