summaryrefslogtreecommitdiffstatshomepage
path: root/scripts/src
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/src')
-rw-r--r--scripts/src/3rdparty.lua52
-rw-r--r--scripts/src/devices.lua24
-rw-r--r--scripts/src/emu.lua15
-rw-r--r--scripts/src/lib.lua19
-rw-r--r--scripts/src/main.lua51
-rw-r--r--scripts/src/netlist.lua7
-rw-r--r--scripts/src/tests.lua6
-rw-r--r--scripts/src/tools.lua296
8 files changed, 91 insertions, 379 deletions
diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua
index 688615cbbc3..5819eb54b2a 100644
--- a/scripts/src/3rdparty.lua
+++ b/scripts/src/3rdparty.lua
@@ -13,7 +13,7 @@
-- expat library objects
--------------------------------------------------
-if _OPTIONS["with-bundled-expat"] then
+if not _OPTIONS["with-system-expat"] then
project "expat"
uuid "f4cd40b1-c37c-452d-9785-640f26f0bf54"
kind "StaticLib"
@@ -45,7 +45,7 @@ end
}
else
links {
- "expat",
+ ext_lib("expat"),
}
end
@@ -53,7 +53,7 @@ end
-- zlib library objects
--------------------------------------------------
-if _OPTIONS["with-bundled-zlib"] then
+if not _OPTIONS["with-system-zlib"] then
project "zlib"
uuid "3d78bd2a-2bd0-4449-8087-42ddfaef7ec9"
kind "StaticLib"
@@ -110,7 +110,7 @@ end
}
else
links {
- "z",
+ ext_lib("zlib"),
}
end
@@ -152,7 +152,7 @@ end
-- libJPEG library objects
--------------------------------------------------
-if _OPTIONS["with-bundled-jpeg"] then
+if not _OPTIONS["with-system-jpeg"] then
project "jpeg"
uuid "447c6800-dcfd-4c48-b72a-a8223bb409ca"
kind "StaticLib"
@@ -221,7 +221,7 @@ end
}
else
links {
- "jpeg",
+ ext_lib("jpeg"),
}
end
@@ -229,7 +229,7 @@ end
-- libflac library objects
--------------------------------------------------
-if _OPTIONS["with-bundled-flac"] then
+if not _OPTIONS["with-system-flac"] then
project "flac"
uuid "b6fc19e8-073a-4541-bb7b-d24b548d424a"
kind "StaticLib"
@@ -312,7 +312,7 @@ end
}
else
links {
- "FLAC",
+ ext_lib("flac"),
}
end
@@ -370,7 +370,7 @@ end
-- LUA library objects
--------------------------------------------------
-if _OPTIONS["with-bundled-lua"] then
+if not _OPTIONS["with-system-lua"] then
project "lua"
uuid "d9e2eed1-f1ab-4737-a6ac-863700b1a5a9"
kind "StaticLib"
@@ -460,7 +460,7 @@ end
}
else
links {
- "lua",
+ ext_lib("lua"),
}
end
@@ -493,16 +493,10 @@ project "lualibs"
includedirs {
MAME_DIR .. "3rdparty",
}
- if _OPTIONS["with-bundled-lua"] then
- includedirs {
- MAME_DIR .. "3rdparty/lua/src",
- }
- end
- if _OPTIONS["with-bundled-zlib"] then
- includedirs {
- MAME_DIR .. "3rdparty/zlib",
- }
- end
+ includedirs {
+ ext_includedir("lua"),
+ ext_includedir("zlib"),
+ }
files {
MAME_DIR .. "3rdparty/lsqlite3/lsqlite3.c",
@@ -514,7 +508,7 @@ project "lualibs"
-- SQLite3 library objects
--------------------------------------------------
-if _OPTIONS["with-bundled-sqlite3"] then
+if not _OPTIONS["with-system-sqlite3"] then
project "sqllite3"
uuid "5cb3d495-57ed-461c-81e5-80dc0857517d"
kind "StaticLib"
@@ -565,7 +559,7 @@ end
}
else
links {
- "sqlite3",
+ ext_lib("sqlite3"),
}
end
@@ -573,7 +567,7 @@ end
-- portmidi library objects
--------------------------------------------------
if _OPTIONS["NO_USE_MIDI"]~="1" then
-if _OPTIONS["with-bundled-portmidi"] then
+if not _OPTIONS["with-system-portmidi"] then
project "portmidi"
uuid "587f2da6-3274-4a65-86a2-f13ea315bb98"
kind "StaticLib"
@@ -652,7 +646,7 @@ end
end
else
links {
- "portmidi",
+ ext_lib("portmidi"),
}
end
end
@@ -808,7 +802,7 @@ end
-- PortAudio library objects
--------------------------------------------------
-if _OPTIONS["with-bundled-portaudio"] then
+if not _OPTIONS["with-system-portaudio"] then
project "portaudio"
uuid "0755c5f5-eccf-47f3-98a9-df67018a94d4"
kind "StaticLib"
@@ -953,7 +947,7 @@ end
else
links {
- "portaudio",
+ ext_lib("portaudio"),
}
end
@@ -961,7 +955,7 @@ end
-- libuv library objects
--------------------------------------------------
if _OPTIONS["USE_LIBUV"]=="1" then
-if _OPTIONS["with-bundled-libuv"] then
+if not _OPTIONS["with-system-uv"] then
project "uv"
uuid "cd2afe7f-139d-49c3-9000-fc9119f3cea0"
kind "StaticLib"
@@ -1173,7 +1167,7 @@ project "http-parser"
else
links {
- "libuv",
+ ext_lib("uv"),
}
end
--------------------------------------------------
@@ -1671,4 +1665,4 @@ end
MAME_DIR .. "3rdparty/SDL2/include",
}
-end \ No newline at end of file
+end
diff --git a/scripts/src/devices.lua b/scripts/src/devices.lua
index c4a6c9fe0ac..3922d3328ac 100644
--- a/scripts/src/devices.lua
+++ b/scripts/src/devices.lua
@@ -37,17 +37,9 @@ function devicesProject(_target, _subtarget)
MAME_DIR .. "3rdparty",
GEN_DIR .. "emu",
GEN_DIR .. "emu/layout",
+ ext_includedir("expat"),
+ ext_includedir("lua"),
}
- if _OPTIONS["with-bundled-expat"] then
- includedirs {
- MAME_DIR .. "3rdparty/expat/lib",
- }
- end
- if _OPTIONS["with-bundled-lua"] then
- includedirs {
- MAME_DIR .. "3rdparty/lua/src",
- }
- end
dofile(path.join("src", "cpu.lua"))
@@ -75,17 +67,9 @@ if #disasm_files > 0 then
MAME_DIR .. "src/lib/util",
MAME_DIR .. "3rdparty",
GEN_DIR .. "emu",
+ ext_includedir("expat"),
+ ext_includedir("lua"),
}
- if _OPTIONS["with-bundled-expat"] then
- includedirs {
- MAME_DIR .. "3rdparty/expat/lib",
- }
- end
- if _OPTIONS["with-bundled-lua"] then
- includedirs {
- MAME_DIR .. "3rdparty/lua/src",
- }
- end
files {
disasm_files
diff --git a/scripts/src/emu.lua b/scripts/src/emu.lua
index a2983d4bd78..7e39c71e357 100644
--- a/scripts/src/emu.lua
+++ b/scripts/src/emu.lua
@@ -30,16 +30,11 @@ includedirs {
GEN_DIR .. "emu",
GEN_DIR .. "emu/layout",
}
-if _OPTIONS["with-bundled-expat"] then
- includedirs {
- MAME_DIR .. "3rdparty/expat/lib",
- }
-end
-if _OPTIONS["with-bundled-lua"] then
- includedirs {
- MAME_DIR .. "3rdparty/lua/src",
- }
-end
+
+includedirs {
+ ext_includedir("expat"),
+ ext_includedir("lua"),
+}
if (_OPTIONS["targetos"] == "windows" and _OPTIONS["osd"] ~= "osdmini") then
defines {
diff --git a/scripts/src/lib.lua b/scripts/src/lib.lua
index 6890bceb5bc..18d6563edfa 100644
--- a/scripts/src/lib.lua
+++ b/scripts/src/lib.lua
@@ -19,17 +19,9 @@ project "utils"
MAME_DIR .. "src/osd",
MAME_DIR .. "src/lib/util",
MAME_DIR .. "3rdparty",
+ ext_includedir("expat"),
+ ext_includedir("zlib"),
}
- if _OPTIONS["with-bundled-expat"] then
- includedirs {
- MAME_DIR .. "3rdparty/expat/lib",
- }
- end
- if _OPTIONS["with-bundled-zlib"] then
- includedirs {
- MAME_DIR .. "3rdparty/zlib",
- }
- end
files {
MAME_DIR .. "src/lib/util/bitstream.h",
@@ -119,14 +111,9 @@ project "formats"
MAME_DIR .. "src/lib",
MAME_DIR .. "src/lib/util",
MAME_DIR .. "3rdparty",
+ ext_includedir("zlib"),
}
- if _OPTIONS["with-bundled-zlib"] then
- includedirs {
- MAME_DIR .. "3rdparty/zlib",
- }
- end
-
files {
MAME_DIR .. "src/lib/formats/2d_dsk.cpp",
MAME_DIR .. "src/lib/formats/2d_dsk.h",
diff --git a/scripts/src/main.lua b/scripts/src/main.lua
index 9914509184e..52211bf92fe 100644
--- a/scripts/src/main.lua
+++ b/scripts/src/main.lua
@@ -192,53 +192,29 @@ if #disasm_files > 0 then
end
links {
"utils",
- "expat",
+ ext_lib("expat"),
"softfloat",
- "jpeg",
+ ext_lib("jpeg"),
"7z",
- "lua",
+ ext_lib("lua"),
"lualibs",
}
if _OPTIONS["USE_LIBUV"]=="1" then
links {
- "uv",
+ ext_lib("uv"),
"http-parser",
}
end
- if _OPTIONS["with-bundled-zlib"] then
- links {
- "zlib",
- }
- else
- links {
- "z",
- }
- end
-
- if _OPTIONS["with-bundled-flac"] then
- links {
- "flac",
- }
- else
- links {
- "FLAC",
- }
- end
-
- if _OPTIONS["with-bundled-sqlite3"] then
- links {
- "sqllite3",
- }
- else
- links {
- "sqlite3",
- }
- end
+ links {
+ ext_lib("zlib"),
+ ext_lib("flac"),
+ ext_lib("sqlite3"),
+ }
if _OPTIONS["NO_USE_MIDI"]~="1" then
links {
- "portmidi",
+ ext_lib("portmidi"),
}
end
links {
@@ -260,14 +236,9 @@ end
MAME_DIR .. "3rdparty",
GEN_DIR .. _target .. "/layout",
GEN_DIR .. "resource",
+ ext_includedir("zlib"),
}
- if _OPTIONS["with-bundled-zlib"] then
- includedirs {
- MAME_DIR .. "3rdparty/zlib",
- }
- end
-
if _OPTIONS["targetos"]=="macosx" and (not override_resources) then
linkoptions {
"-sectcreate __TEXT __info_plist " .. _MAKE.esc(GEN_DIR) .. "resource/" .. _subtarget .. "-Info.plist"
diff --git a/scripts/src/netlist.lua b/scripts/src/netlist.lua
index 917a450d511..95d0371e414 100644
--- a/scripts/src/netlist.lua
+++ b/scripts/src/netlist.lua
@@ -19,13 +19,8 @@ project "netlist"
MAME_DIR .. "src/lib/netlist",
MAME_DIR .. "src/osd",
MAME_DIR .. "src/lib/util",
+ -- ext_includedir("expat"),
}
- -- if _OPTIONS["with-bundled-expat"] then
- -- includedirs {
- -- MAME_DIR .. "3rdparty/expat/lib",
- -- }
- --end
-
files {
MAME_DIR .. "src/lib/netlist/nl_config.h",
diff --git a/scripts/src/tests.lua b/scripts/src/tests.lua
index e69888d53a4..b6a01efdd02 100644
--- a/scripts/src/tests.lua
+++ b/scripts/src/tests.lua
@@ -62,8 +62,8 @@ project("mametests")
links {
"gtest",
"utils",
- "expat",
- "zlib",
+ ext_lib("expat"),
+ ext_lib("zlib"),
"ocore_" .. _OPTIONS["osd"],
}
@@ -72,6 +72,8 @@ project("mametests")
MAME_DIR .. "src/osd",
MAME_DIR .. "src/emu",
MAME_DIR .. "src/lib/util",
+ ext_includedir("expat"),
+ ext_includedir("zlib"),
}
files {
diff --git a/scripts/src/tools.lua b/scripts/src/tools.lua
index 0339e9920b2..95710ad9799 100644
--- a/scripts/src/tools.lua
+++ b/scripts/src/tools.lua
@@ -27,21 +27,12 @@ end
links {
"utils",
- "expat",
+ ext_lib("expat"),
"7z",
"ocore_" .. _OPTIONS["osd"],
+ ext_lib("zlib"),
}
-if _OPTIONS["with-bundled-zlib"] then
- links {
- "zlib",
- }
-else
- links {
- "z",
- }
-end
-
includedirs {
MAME_DIR .. "src/osd",
MAME_DIR .. "src/lib/util",
@@ -77,31 +68,13 @@ end
links {
"utils",
- "expat",
+ ext_lib("expat"),
"7z",
"ocore_" .. _OPTIONS["osd"],
+ ext_lib("zlib"),
+ ext_lib("flac"),
}
-if _OPTIONS["with-bundled-zlib"] then
- links {
- "zlib",
- }
-else
- links {
- "z",
- }
-end
-
-if _OPTIONS["with-bundled-flac"] then
- links {
- "flac",
- }
-else
- links {
- "FLAC",
- }
-end
-
includedirs {
MAME_DIR .. "src/osd",
MAME_DIR .. "src/lib/util",
@@ -139,20 +112,11 @@ end
links {
"utils",
- "expat",
+ ext_lib("expat"),
"ocore_" .. _OPTIONS["osd"],
+ ext_lib("zlib"),
}
-if _OPTIONS["with-bundled-zlib"] then
- links {
- "zlib",
- }
-else
- links {
- "z",
- }
-end
-
includedirs {
MAME_DIR .. "src/osd",
MAME_DIR .. "src/lib/util",
@@ -189,31 +153,13 @@ end
links {
"dasm",
"utils",
- "expat",
+ ext_lib("expat"),
"7z",
"ocore_" .. _OPTIONS["osd"],
+ ext_lib("zlib"),
+ ext_lib("flac"),
}
-if _OPTIONS["with-bundled-zlib"] then
- links {
- "zlib",
- }
-else
- links {
- "z",
- }
-end
-
-if _OPTIONS["with-bundled-flac"] then
- links {
- "flac",
- }
-else
- links {
- "FLAC",
- }
-end
-
includedirs {
MAME_DIR .. "src/osd",
MAME_DIR .. "src/emu",
@@ -251,31 +197,13 @@ end
links {
"utils",
- "expat",
+ ext_lib("expat"),
"7z",
"ocore_" .. _OPTIONS["osd"],
+ ext_lib("zlib"),
+ ext_lib("flac"),
}
-if _OPTIONS["with-bundled-zlib"] then
- links {
- "zlib",
- }
-else
- links {
- "z",
- }
-end
-
-if _OPTIONS["with-bundled-flac"] then
- links {
- "flac",
- }
-else
- links {
- "FLAC",
- }
-end
-
includedirs {
MAME_DIR .. "src/osd",
MAME_DIR .. "src/lib/util",
@@ -312,31 +240,13 @@ end
links {
"utils",
- "expat",
+ ext_lib("expat"),
"7z",
"ocore_" .. _OPTIONS["osd"],
+ ext_lib("zlib"),
+ ext_lib("flac"),
}
-if _OPTIONS["with-bundled-zlib"] then
- links {
- "zlib",
- }
-else
- links {
- "z",
- }
-end
-
-if _OPTIONS["with-bundled-flac"] then
- links {
- "flac",
- }
-else
- links {
- "FLAC",
- }
-end
-
includedirs {
MAME_DIR .. "src/osd",
MAME_DIR .. "src/lib/util",
@@ -373,20 +283,11 @@ end
links {
"utils",
- "expat",
+ ext_lib("expat"),
"ocore_" .. _OPTIONS["osd"],
+ ext_lib("zlib"),
}
-if _OPTIONS["with-bundled-zlib"] then
- links {
- "zlib",
- }
-else
- links {
- "z",
- }
-end
-
includedirs {
MAME_DIR .. "src/osd",
MAME_DIR .. "src/lib/util",
@@ -422,20 +323,11 @@ end
links {
"utils",
- "expat",
+ ext_lib("expat"),
"ocore_" .. _OPTIONS["osd"],
+ ext_lib("zlib"),
}
-if _OPTIONS["with-bundled-zlib"] then
- links {
- "zlib",
- }
-else
- links {
- "z",
- }
-end
-
includedirs {
MAME_DIR .. "src/osd",
MAME_DIR .. "src/lib/util",
@@ -471,20 +363,11 @@ end
links {
"utils",
- "expat",
+ ext_lib("expat"),
"ocore_" .. _OPTIONS["osd"],
+ ext_lib("zlib"),
}
-if _OPTIONS["with-bundled-zlib"] then
- links {
- "zlib",
- }
-else
- links {
- "z",
- }
-end
-
includedirs {
MAME_DIR .. "src/osd",
MAME_DIR .. "src/lib/util",
@@ -520,31 +403,13 @@ end
links {
"utils",
- "expat",
+ ext_lib("expat"),
"7z",
"ocore_" .. _OPTIONS["osd"],
+ ext_lib("zlib"),
+ ext_lib("flac"),
}
-if _OPTIONS["with-bundled-zlib"] then
- links {
- "zlib",
- }
-else
- links {
- "z",
- }
-end
-
-if _OPTIONS["with-bundled-flac"] then
- links {
- "flac",
- }
-else
- links {
- "FLAC",
- }
-end
-
includedirs {
MAME_DIR .. "src/osd",
MAME_DIR .. "src/lib/util",
@@ -580,20 +445,11 @@ end
links {
"utils",
- "expat",
+ ext_lib("expat"),
"ocore_" .. _OPTIONS["osd"],
+ ext_lib("zlib"),
}
-if _OPTIONS["with-bundled-zlib"] then
- links {
- "zlib",
- }
-else
- links {
- "z",
- }
-end
-
includedirs {
MAME_DIR .. "src/osd",
MAME_DIR .. "src/lib/util",
@@ -629,32 +485,14 @@ end
links {
"utils",
- "expat",
+ ext_lib("expat"),
"7z",
"ocore_" .. _OPTIONS["osd"],
"netlist",
+ ext_lib("zlib"),
+ ext_lib("flac"),
}
-if _OPTIONS["with-bundled-zlib"] then
- links {
- "zlib",
- }
-else
- links {
- "z",
- }
-end
-
-if _OPTIONS["with-bundled-flac"] then
- links {
- "flac",
- }
-else
- links {
- "FLAC",
- }
-end
-
includedirs {
MAME_DIR .. "src/osd",
MAME_DIR .. "src/lib/util",
@@ -732,31 +570,13 @@ end
links {
"formats",
"utils",
- "expat",
+ ext_lib("expat"),
"7z",
"ocore_" .. _OPTIONS["osd"],
+ ext_lib("zlib"),
+ ext_lib("flac"),
}
-if _OPTIONS["with-bundled-zlib"] then
- links {
- "zlib",
- }
-else
- links {
- "z",
- }
-end
-
-if _OPTIONS["with-bundled-flac"] then
- links {
- "flac",
- }
-else
- links {
- "FLAC",
- }
-end
-
includedirs {
MAME_DIR .. "src/osd",
MAME_DIR .. "src/lib",
@@ -795,31 +615,13 @@ links {
"formats",
"emu",
"utils",
- "expat",
+ ext_lib("expat"),
"7z",
"ocore_" .. _OPTIONS["osd"],
+ ext_lib("zlib"),
+ ext_lib("flac"),
}
-if _OPTIONS["with-bundled-zlib"] then
- links {
- "zlib",
- }
-else
- links {
- "z",
- }
-end
-
-if _OPTIONS["with-bundled-flac"] then
- links {
- "flac",
- }
-else
- links {
- "FLAC",
- }
-end
-
includedirs {
MAME_DIR .. "src/osd",
MAME_DIR .. "src/lib",
@@ -858,36 +660,18 @@ links {
"formats",
"emu",
"utils",
- "expat",
+ ext_lib("expat"),
"7z",
"ocore_" .. _OPTIONS["osd"],
+ ext_lib("zlib"),
+ ext_lib("flac"),
}
-if _OPTIONS["with-bundled-zlib"] then
- links {
- "zlib",
- }
-else
- links {
- "z",
- }
-end
-
-if _OPTIONS["with-bundled-flac"] then
- links {
- "flac",
- }
-else
- links {
- "FLAC",
- }
-end
-
includedirs {
MAME_DIR .. "src/osd",
MAME_DIR .. "src/lib",
MAME_DIR .. "src/lib/util",
- MAME_DIR .. "3rdparty/zlib",
+ ext_includedir("zlib"),
MAME_DIR .. "src/tools/imgtool",
}