summaryrefslogtreecommitdiffstats
path: root/docs/release/scripts/src/devices.lua
diff options
context:
space:
mode:
author Robbbert <pac0446@bigpond.net.au>2015-12-30 20:11:15 +1100
committer Robbbert <pac0446@bigpond.net.au>2015-12-30 20:11:15 +1100
commitac565fae7a3e52ba7073cb0dea978521f2f88125 (patch)
tree17a24c32a32bed6dea9d852e54f4318c104e542c /docs/release/scripts/src/devices.lua
parent6c9c5b8f09ee33efd785fd7477e563d0b69c3bdd (diff)
Added source patch and build files
Diffstat (limited to 'docs/release/scripts/src/devices.lua')
-rw-r--r--docs/release/scripts/src/devices.lua141
1 files changed, 141 insertions, 0 deletions
diff --git a/docs/release/scripts/src/devices.lua b/docs/release/scripts/src/devices.lua
new file mode 100644
index 00000000000..05e8810f2df
--- /dev/null
+++ b/docs/release/scripts/src/devices.lua
@@ -0,0 +1,141 @@
+-- license:BSD-3-Clause
+-- copyright-holders:MAMEdev Team
+
+---------------------------------------------------------------------------
+--
+-- devices.lua
+--
+-- Rules for building device cores
+--
+---------------------------------------------------------------------------
+
+function devicesProject(_target, _subtarget)
+
+ disasm_files = { }
+ disasm_dependency = { }
+ disasm_custombuildtask = { }
+
+ project ("optional")
+ uuid (os.uuid("optional-" .. _target .."_" .. _subtarget))
+ kind (LIBTYPE)
+ targetsubdir(_target .."_" .. _subtarget)
+ options {
+ "ArchiveSplit",
+ }
+
+ addprojectflags()
+
+ 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",
+ }
+ 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"))
+
+ dofile(path.join("src", "sound.lua"))
+
+ dofile(path.join("src", "video.lua"))
+
+ dofile(path.join("src", "machine.lua"))
+
+if (_OPTIONS["SOURCES"] == nil) then
+ project ("bus")
+ uuid ("5d782c89-cf7e-4cfe-8f9f-0d4bfc16c91d")
+ kind (LIBTYPE)
+ targetsubdir(_target .."_" .. _subtarget)
+ addprojectflags()
+ options {
+ "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/mame", -- used for nes bus devices,some mess bus devices need this
+ 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
+
+ dofile(path.join("src", "bus.lua"))
+else
+ dofile(path.join("src", "bus.lua"))
+end
+
+if #disasm_files > 0 then
+ project ("dasm")
+ uuid ("f2d28b0a-6da5-4f78-b629-d834aa00429d")
+ kind (LIBTYPE)
+ targetsubdir(_target .."_" .. _subtarget)
+ addprojectflags()
+
+ 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-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
+
+end