summaryrefslogtreecommitdiffstatshomepage
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/genie.lua14
-rw-r--r--scripts/src/main.lua4
2 files changed, 17 insertions, 1 deletions
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 {