summaryrefslogtreecommitdiffstatshomepage
path: root/scripts
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2015-09-13 10:17:58 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2015-09-13 10:17:58 +0200
commitc9bde5341dfd5ba463ff786ceea3b5c1138e4ee9 (patch)
treee62176f91e98677cb89d322d329d40ae042e17a5 /scripts
parentee7ff77255d02b8181a1d2e7e6418c540bfefdf2 (diff)
reorganized scripts according to new structure (nw)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/genie.lua5
-rw-r--r--scripts/src/devices.lua148
-rw-r--r--scripts/src/emu.lua151
-rw-r--r--scripts/src/lib.lua3
-rw-r--r--scripts/src/main.lua1
-rw-r--r--scripts/target/ldplayer/ldplayer.lua1
6 files changed, 157 insertions, 152 deletions
diff --git a/scripts/genie.lua b/scripts/genie.lua
index 0f2090e61e1..e7e1342c050 100644
--- a/scripts/genie.lua
+++ b/scripts/genie.lua
@@ -1302,7 +1302,10 @@ dofile(path.join("src", "3rdparty.lua"))
group "core"
dofile(path.join("src", "emu.lua"))
-emuProject(_OPTIONS["target"],_OPTIONS["subtarget"])
+
+group "devices"
+dofile(path.join("src", "devices.lua"))
+devicesProject(_OPTIONS["target"],_OPTIONS["subtarget"])
group "drivers"
findfunction("createProjects_" .. _OPTIONS["target"] .. "_" .. _OPTIONS["subtarget"])(_OPTIONS["target"], _OPTIONS["subtarget"])
diff --git a/scripts/src/devices.lua b/scripts/src/devices.lua
new file mode 100644
index 00000000000..9985586f6f9
--- /dev/null
+++ b/scripts/src/devices.lua
@@ -0,0 +1,148 @@
+-- license:BSD-3-Clause
+-- copyright-holders:MAMEdev Team
+
+function devicesProject(_target, _subtarget)
+
+ disasm_files = { }
+ disasm_dependency = { }
+ disasm_custombuildtask = { }
+
+ project ("optional")
+ uuid (os.uuid("optional-" .. _target .."_" .. _subtarget))
+ kind (LIBTYPE)
+ targetsubdir(_target .."_" .. _subtarget)
+ options {
+ "ForceCPP",
+ "ArchiveSplit",
+ }
+
+ includedirs {
+ MAME_DIR .. "src/osd",
+ MAME_DIR .. "src/emu",
+ MAME_DIR .. "src/devices",
+ MAME_DIR .. "src/lib/netlist",
+ MAME_DIR .. "src/mame", -- used for sound amiga
+ MAME_DIR .. "src/lib",
+ MAME_DIR .. "src/lib/util",
+ MAME_DIR .. "3rdparty",
+ GEN_DIR .. "emu",
+ GEN_DIR .. "emu/layout",
+ MAME_DIR .. "src/emu/cpu/m68000",
+ }
+ 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
+ if _OPTIONS["with-bundled-lua"] then
+ includedirs {
+ MAME_DIR .. "3rdparty/lua/src",
+ }
+ end
+
+ dofile(path.join("src", "cpu.lua"))
+
+ dofile(path.join("src", "sound.lua"))
+
+ dofile(path.join("src", "video.lua"))
+
+ dofile(path.join("src", "machine.lua"))
+
+if (_OPTIONS["DRIVERS"] == nil) then
+ project ("bus")
+ uuid ("5d782c89-cf7e-4cfe-8f9f-0d4bfc16c91d")
+ kind (LIBTYPE)
+ targetsubdir(_target .."_" .. _subtarget)
+ options {
+ "ForceCPP",
+ "ArchiveSplit",
+ }
+
+ includedirs {
+ MAME_DIR .. "src/osd",
+ MAME_DIR .. "src/emu",
+ MAME_DIR .. "src/devices",
+ MAME_DIR .. "src/lib/netlist",
+ MAME_DIR .. "src/lib",
+ MAME_DIR .. "src/lib/util",
+ MAME_DIR .. "3rdparty",
+ MAME_DIR .. "src/mess", -- some mess bus devices need this
+ MAME_DIR .. "src/mame", -- used for nes bus devices
+ GEN_DIR .. "emu",
+ GEN_DIR .. "emu/layout",
+ }
+ 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
+ if _OPTIONS["with-bundled-lua"] then
+ includedirs {
+ MAME_DIR .. "3rdparty/lua/src",
+ }
+ end
+
+ dofile(path.join("src", "bus.lua"))
+else
+ dofile(path.join("src", "bus.lua"))
+end
+
+ project ("dasm")
+ uuid ("f2d28b0a-6da5-4f78-b629-d834aa00429d")
+ kind (LIBTYPE)
+ targetsubdir(_target .."_" .. _subtarget)
+ options {
+ "ForceCPP",
+ }
+
+ includedirs {
+ MAME_DIR .. "src/osd",
+ MAME_DIR .. "src/emu",
+ MAME_DIR .. "src/devices",
+ MAME_DIR .. "src/lib",
+ MAME_DIR .. "src/lib/util",
+ MAME_DIR .. "3rdparty",
+ GEN_DIR .. "emu",
+ }
+ 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
+ if _OPTIONS["with-bundled-lua"] then
+ includedirs {
+ MAME_DIR .. "3rdparty/lua/src",
+ }
+ end
+
+ files {
+ disasm_files
+ }
+
+ if #disasm_dependency > 0 then
+ dependency {
+ disasm_dependency[1]
+ }
+ end
+
+ if #disasm_custombuildtask > 0 then
+ custombuildtask {
+ disasm_custombuildtask[1]
+ }
+ end
+end
diff --git a/scripts/src/emu.lua b/scripts/src/emu.lua
index 7d78a626853..3ccb8bdd248 100644
--- a/scripts/src/emu.lua
+++ b/scripts/src/emu.lua
@@ -361,154 +361,3 @@ custombuildtask {
layoutbuildtask("emu/layout", "noscreens"),
layoutbuildtask("emu/layout", "snap"),
}
-
-function emuProject(_target, _subtarget)
-
- disasm_files = { }
- disasm_dependency = { }
- disasm_custombuildtask = { }
-
- project ("optional")
- uuid (os.uuid("optional-" .. _target .."_" .. _subtarget))
- kind (LIBTYPE)
- targetsubdir(_target .."_" .. _subtarget)
- options {
- "ForceCPP",
- "ArchiveSplit",
- }
-
- includedirs {
- MAME_DIR .. "src/osd",
- MAME_DIR .. "src/emu",
- MAME_DIR .. "src/devices",
- MAME_DIR .. "src/lib/netlist",
- MAME_DIR .. "src/mame", -- used for sound amiga
- MAME_DIR .. "src/lib",
- MAME_DIR .. "src/lib/util",
- MAME_DIR .. "3rdparty",
- GEN_DIR .. "emu",
- GEN_DIR .. "emu/layout",
- MAME_DIR .. "src/emu/cpu/m68000",
- }
- 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
- if _OPTIONS["with-bundled-lua"] then
- includedirs {
- MAME_DIR .. "3rdparty/lua/src",
- }
- end
-
- dofile(path.join("src", "cpu.lua"))
-
- dofile(path.join("src", "sound.lua"))
-
-
- dofile(path.join("src", "video.lua"))
-
- dofile(path.join("src", "machine.lua"))
-
-if (_OPTIONS["DRIVERS"] == nil) then
- project ("bus")
- uuid ("5d782c89-cf7e-4cfe-8f9f-0d4bfc16c91d")
- kind (LIBTYPE)
- targetsubdir(_target .."_" .. _subtarget)
- options {
- "ForceCPP",
- "ArchiveSplit",
- }
-
- includedirs {
- MAME_DIR .. "src/osd",
- MAME_DIR .. "src/emu",
- MAME_DIR .. "src/devices",
- MAME_DIR .. "src/lib/netlist",
- MAME_DIR .. "src/lib",
- MAME_DIR .. "src/lib/util",
- MAME_DIR .. "3rdparty",
- MAME_DIR .. "src/mess", -- some mess bus devices need this
- MAME_DIR .. "src/mame", -- used for nes bus devices
- GEN_DIR .. "emu",
- GEN_DIR .. "emu/layout",
- }
- 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
- if _OPTIONS["with-bundled-lua"] then
- includedirs {
- MAME_DIR .. "3rdparty/lua/src",
- }
- end
-
- dofile(path.join("src", "bus.lua"))
-else
- dofile(path.join("src", "bus.lua"))
-end
-
- -- netlist now defines a project
- dofile(path.join("src", "netlist.lua"))
-
-
- project ("dasm")
- uuid ("f2d28b0a-6da5-4f78-b629-d834aa00429d")
- kind (LIBTYPE)
- targetsubdir(_target .."_" .. _subtarget)
- options {
- "ForceCPP",
- }
-
- includedirs {
- MAME_DIR .. "src/osd",
- MAME_DIR .. "src/emu",
- MAME_DIR .. "src/devices",
- MAME_DIR .. "src/lib",
- MAME_DIR .. "src/lib/util",
- MAME_DIR .. "3rdparty",
- GEN_DIR .. "emu",
- }
- 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
- if _OPTIONS["with-bundled-lua"] then
- includedirs {
- MAME_DIR .. "3rdparty/lua/src",
- }
- end
-
- files {
- disasm_files
- }
-
- if #disasm_dependency > 0 then
- dependency {
- disasm_dependency[1]
- }
- end
-
- if #disasm_custombuildtask > 0 then
- custombuildtask {
- disasm_custombuildtask[1]
- }
- end
-end
diff --git a/scripts/src/lib.lua b/scripts/src/lib.lua
index 7d21cf3e5a2..96e55653969 100644
--- a/scripts/src/lib.lua
+++ b/scripts/src/lib.lua
@@ -420,3 +420,6 @@ project "formats"
MAME_DIR .. "src/lib/formats/itt3030_dsk.h",
}
+-- netlist now defines a project
+dofile("netlist.lua")
+
diff --git a/scripts/src/main.lua b/scripts/src/main.lua
index 6baad44c566..8baa4adbd7c 100644
--- a/scripts/src/main.lua
+++ b/scripts/src/main.lua
@@ -164,6 +164,7 @@ end
includedirs {
MAME_DIR .. "src/osd",
MAME_DIR .. "src/emu",
+ MAME_DIR .. "src/devices",
MAME_DIR .. "src/" .. _target,
MAME_DIR .. "src/lib",
MAME_DIR .. "src/lib/util",
diff --git a/scripts/target/ldplayer/ldplayer.lua b/scripts/target/ldplayer/ldplayer.lua
index c8435c4a8ab..cda19fdf2ba 100644
--- a/scripts/target/ldplayer/ldplayer.lua
+++ b/scripts/target/ldplayer/ldplayer.lua
@@ -64,6 +64,7 @@ function createProjects_ldplayer_ldplayer(_target, _subtarget)
includedirs {
MAME_DIR .. "src/osd",
MAME_DIR .. "src/emu",
+ MAME_DIR .. "src/devices",
MAME_DIR .. "src/mame",
MAME_DIR .. "src/lib",
MAME_DIR .. "src/lib/util",