summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--makefile8
-rw-r--r--projects/.gitignore3
-rw-r--r--projects/README.md4
-rw-r--r--scripts/genie.lua14
-rw-r--r--scripts/src/main.lua4
6 files changed, 33 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 06cd6107cc9..bbd044d9293 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,6 +21,7 @@
!/language/
!/nl_examples/
!/plugins/
+!/projects/
!/regtests/
!/samples/
!/scripts/
diff --git a/makefile b/makefile
index f342c481ac5..1b3e5851e5b 100644
--- a/makefile
+++ b/makefile
@@ -217,6 +217,10 @@ endif
# build scripts will be run from
# scripts/target/$(TARGET)/$(SUBTARGET).lua
#-------------------------------------------------
+ifdef PROJECT
+PARAMS += --PROJECT='$(PROJECT)'
+TARGET := $(PROJECT)
+endif
ifndef TARGET
TARGET := mame
@@ -800,8 +804,12 @@ SCRIPTS += scripts/target/$(TARGET)/mess.lua
endif
ifndef SOURCES
+ifdef PROJECT
+SCRIPTS += projects/$(PROJECT)/scripts/target/$(TARGET)/$(SUBTARGET_FULL).lua
+else
SCRIPTS += scripts/target/$(TARGET)/$(SUBTARGET_FULL).lua
endif
+endif
ifdef REGENIE
SCRIPTS+= regenie
diff --git a/projects/.gitignore b/projects/.gitignore
new file mode 100644
index 00000000000..06f2df04add
--- /dev/null
+++ b/projects/.gitignore
@@ -0,0 +1,3 @@
+*
+!/.gitignore
+!/README.md
diff --git a/projects/README.md b/projects/README.md
new file mode 100644
index 00000000000..c04bc3f7c9f
--- /dev/null
+++ b/projects/README.md
@@ -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" \ No newline at end of file
diff --git a/scripts/genie.lua b/scripts/genie.lua
index 7a4668e7d14..653c8b69e37 100644
--- a/scripts/genie.lua
+++ b/scripts/genie.lua
@@ -386,6 +386,11 @@ newoption {
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")
if _OPTIONS["SHLIB"]=="1" then
@@ -516,7 +521,14 @@ msgprecompile ("Precompiling $(subst ../,,$<)...")
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
error("File definition for TARGET=" .. _OPTIONS["target"] .. " SUBTARGET=" .. _OPTIONS["subtarget"] .. " does not exist")
end
diff --git a/scripts/src/main.lua b/scripts/src/main.lua
index ccc0eb30236..a78965a52b2 100644
--- a/scripts/src/main.lua
+++ b/scripts/src/main.lua
@@ -276,8 +276,12 @@ end
links {
ext_lib("zlib"),
ext_lib("flac"),
+ }
+if (STANDALONE~=true) then
+ links {
ext_lib("sqlite3"),
}
+end
if _OPTIONS["NO_USE_MIDI"]~="1" then
links {