mirror of
https://github.com/mamedev/mame.git
synced 2024-11-16 07:48:32 +01:00
Enable building projects that are separate of MAME but use same core and lives in separate git tree (nw)
This commit is contained in:
parent
3408ed0ae5
commit
124f30dbbc
6 changed files with 33 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -21,6 +21,7 @@
|
||||||
!/language/
|
!/language/
|
||||||
!/nl_examples/
|
!/nl_examples/
|
||||||
!/plugins/
|
!/plugins/
|
||||||
|
!/projects/
|
||||||
!/regtests/
|
!/regtests/
|
||||||
!/samples/
|
!/samples/
|
||||||
!/scripts/
|
!/scripts/
|
||||||
|
|
8
makefile
8
makefile
|
@ -217,6 +217,10 @@ endif
|
||||||
# build scripts will be run from
|
# build scripts will be run from
|
||||||
# scripts/target/$(TARGET)/$(SUBTARGET).lua
|
# scripts/target/$(TARGET)/$(SUBTARGET).lua
|
||||||
#-------------------------------------------------
|
#-------------------------------------------------
|
||||||
|
ifdef PROJECT
|
||||||
|
PARAMS += --PROJECT='$(PROJECT)'
|
||||||
|
TARGET := $(PROJECT)
|
||||||
|
endif
|
||||||
|
|
||||||
ifndef TARGET
|
ifndef TARGET
|
||||||
TARGET := mame
|
TARGET := mame
|
||||||
|
@ -800,8 +804,12 @@ SCRIPTS += scripts/target/$(TARGET)/mess.lua
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifndef SOURCES
|
ifndef SOURCES
|
||||||
|
ifdef PROJECT
|
||||||
|
SCRIPTS += projects/$(PROJECT)/scripts/target/$(TARGET)/$(SUBTARGET_FULL).lua
|
||||||
|
else
|
||||||
SCRIPTS += scripts/target/$(TARGET)/$(SUBTARGET_FULL).lua
|
SCRIPTS += scripts/target/$(TARGET)/$(SUBTARGET_FULL).lua
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ifdef REGENIE
|
ifdef REGENIE
|
||||||
SCRIPTS+= regenie
|
SCRIPTS+= regenie
|
||||||
|
|
3
projects/.gitignore
vendored
Normal file
3
projects/.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
*
|
||||||
|
!/.gitignore
|
||||||
|
!/README.md
|
4
projects/README.md
Normal file
4
projects/README.md
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# **Projects** #
|
||||||
|
|
||||||
|
This is place where source code projects outside of MAME lives.
|
||||||
|
Here you can git clone that kind of project and make it with "make PROJECT=example"
|
|
@ -386,6 +386,11 @@ newoption {
|
||||||
description = "Produce WebAssembly output when building with Emscripten.",
|
description = "Produce WebAssembly output when building with Emscripten.",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
newoption {
|
||||||
|
trigger = "PROJECT",
|
||||||
|
description = "Select projects to be built. Will look into project folder for files.",
|
||||||
|
}
|
||||||
|
|
||||||
dofile ("extlib.lua")
|
dofile ("extlib.lua")
|
||||||
|
|
||||||
if _OPTIONS["SHLIB"]=="1" then
|
if _OPTIONS["SHLIB"]=="1" then
|
||||||
|
@ -516,7 +521,14 @@ msgprecompile ("Precompiling $(subst ../,,$<)...")
|
||||||
|
|
||||||
messageskip { "SkipCreatingMessage", "SkipBuildingMessage", "SkipCleaningMessage" }
|
messageskip { "SkipCreatingMessage", "SkipBuildingMessage", "SkipCleaningMessage" }
|
||||||
|
|
||||||
if (_OPTIONS["SOURCES"] == nil) 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
|
||||||
|
error("File definition for TARGET=" .. _OPTIONS["target"] .. " SUBTARGET=" .. _OPTIONS["subtarget"] .. " does not exist")
|
||||||
|
end
|
||||||
|
dofile (path.join(".." ,"projects", _OPTIONS["PROJECT"], "scripts", "target", _OPTIONS["target"],_OPTIONS["subtarget"] .. ".lua"))
|
||||||
|
end
|
||||||
|
if (_OPTIONS["SOURCES"] == nil and _OPTIONS["PROJECT"] == nil) then
|
||||||
if (not os.isfile(path.join("target", _OPTIONS["target"],_OPTIONS["subtarget"] .. ".lua"))) 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")
|
error("File definition for TARGET=" .. _OPTIONS["target"] .. " SUBTARGET=" .. _OPTIONS["subtarget"] .. " does not exist")
|
||||||
end
|
end
|
||||||
|
|
|
@ -276,8 +276,12 @@ end
|
||||||
links {
|
links {
|
||||||
ext_lib("zlib"),
|
ext_lib("zlib"),
|
||||||
ext_lib("flac"),
|
ext_lib("flac"),
|
||||||
|
}
|
||||||
|
if (STANDALONE~=true) then
|
||||||
|
links {
|
||||||
ext_lib("sqlite3"),
|
ext_lib("sqlite3"),
|
||||||
}
|
}
|
||||||
|
end
|
||||||
|
|
||||||
if _OPTIONS["NO_USE_MIDI"]~="1" then
|
if _OPTIONS["NO_USE_MIDI"]~="1" then
|
||||||
links {
|
links {
|
||||||
|
|
Loading…
Reference in a new issue