Make building emulator optional (allow building tools without building MAME) (#11889)
This commit is contained in:
parent
7a1c86c4d1
commit
d5340b8be4
9
makefile
9
makefile
@ -20,6 +20,7 @@
|
||||
# TARGET = mame
|
||||
# SUBTARGET = tiny
|
||||
# TOOLS = 1
|
||||
# EMULATOR = 1
|
||||
# TESTS = 1
|
||||
# BENCHMARKS = 1
|
||||
# OSD = sdl
|
||||
@ -650,6 +651,14 @@ PARAMS += --with-tools
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef EMULATOR
|
||||
PARAMS += --with-emulator
|
||||
else
|
||||
ifeq '$(EMULATOR)' '1'
|
||||
PARAMS += --with-emulator
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef TESTS
|
||||
ifneq '$(TESTS)' '0'
|
||||
PARAMS += --with-tests
|
||||
|
@ -120,6 +120,11 @@ newoption {
|
||||
description = "Enable building tools.",
|
||||
}
|
||||
|
||||
newoption {
|
||||
trigger = "with-emulator",
|
||||
description = "Enable building emulator.",
|
||||
}
|
||||
|
||||
newoption {
|
||||
trigger = "with-tests",
|
||||
description = "Enable building tests.",
|
||||
@ -529,6 +534,7 @@ msgprecompile ("Precompiling $(subst ../,,$<)...")
|
||||
|
||||
messageskip { "SkipCreatingMessage", "SkipBuildingMessage", "SkipCleaningMessage" }
|
||||
|
||||
if _OPTIONS["with-emulator"] then
|
||||
if (_OPTIONS["PROJECT"] ~= nil) then
|
||||
PROJECT_DIR = path.join(path.getabsolute(".."),"projects",_OPTIONS["PROJECT"]) .. "/"
|
||||
if (not os.isfile(path.join("..", "projects", _OPTIONS["PROJECT"], "scripts", "target", _OPTIONS["target"],_OPTIONS["subtarget"] .. ".lua"))) then
|
||||
@ -555,6 +561,7 @@ elseif (_OPTIONS["SOURCES"] == nil) and (_OPTIONS["SOURCEFILTER"] == nil) then
|
||||
error("Definition file for TARGET=" .. _OPTIONS["target"] .. " SUBTARGET=" .. _OPTIONS["subtarget"] .. " does not exist")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
configuration { "gmake or ninja" }
|
||||
flags {
|
||||
@ -1480,14 +1487,15 @@ group "core"
|
||||
|
||||
dofile(path.join("src", "emu.lua"))
|
||||
|
||||
if (STANDALONE~=true) then
|
||||
dofile(path.join("src", "mame", "frontend.lua"))
|
||||
end
|
||||
|
||||
group "devices"
|
||||
dofile(path.join("src", "devices.lua"))
|
||||
devicesProject(_OPTIONS["target"],_OPTIONS["subtarget"])
|
||||
|
||||
if _OPTIONS["with-emulator"] then
|
||||
if (STANDALONE~=true) then
|
||||
dofile(path.join("src", "mame", "frontend.lua"))
|
||||
end
|
||||
|
||||
if (STANDALONE~=true) then
|
||||
group "drivers"
|
||||
findfunction("createProjects_" .. _OPTIONS["target"] .. "_" .. _OPTIONS["subtarget"])(_OPTIONS["target"], _OPTIONS["subtarget"])
|
||||
@ -1506,6 +1514,7 @@ else
|
||||
end
|
||||
mainProject(_OPTIONS["target"],_OPTIONS["subtarget"])
|
||||
strip()
|
||||
end
|
||||
|
||||
if _OPTIONS["with-tools"] then
|
||||
group "tools"
|
||||
|
@ -9,6 +9,8 @@
|
||||
--
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
if _OPTIONS["with-emulator"] then
|
||||
|
||||
project ("emu")
|
||||
uuid ("e6fa15e4-a354-4526-acef-13c8e80fcacf")
|
||||
kind (LIBTYPE)
|
||||
@ -308,6 +310,7 @@ custombuildtask {
|
||||
layoutbuildtask("emu/layout", "triphsxs"),
|
||||
layoutbuildtask("emu/layout", "quadhsxs"),
|
||||
}
|
||||
end
|
||||
|
||||
project ("precompile")
|
||||
uuid ("a6fb15d4-b123-4445-acef-13c8e80fcacf")
|
||||
|
Loading…
Reference in New Issue
Block a user