1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
function mainProject(_target, _subtarget)
if (_target == _subtarget) then
project (_target)
else
project (_target .. _subtarget)
end
uuid (os.uuid(_target .."_" .. _subtarget))
kind "ConsoleApp"
options {
"ForceCPP",
}
flags {
"NoManifest",
}
if _OPTIONS["SYMBOLS"] then
configuration { "mingw*" }
postbuildcommands {
"$(SILENT) echo Dumping symbols.",
"$(SILENT) objdump --section=.text --line-numbers --syms --demangle $(TARGET) >$(subst .exe,.sym,$(TARGET))"
}
end
configuration { "vs*" }
flags {
"Unicode",
}
configuration { "mingw*" or "vs*" }
targetextension ".exe"
configuration { "asmjs" }
targetextension ".bc"
configuration { }
targetdir(MAME_DIR)
findfunction("linkProjects_" .. _OPTIONS["target"] .. "_" .. _OPTIONS["subtarget"])(_OPTIONS["target"], _OPTIONS["subtarget"])
links {
"osd_" .. _OPTIONS["osd"],
"bus",
"optional",
"emu",
"dasm",
"utils",
"expat",
"softfloat",
"jpeg",
"flac",
"7z",
"formats",
"lua",
"lsqlite3",
"sqllite3",
"zlib",
"jsoncpp",
"mongoose",
"portmidi",
}
if (USE_BGFX == 1) then
links {
"bgfx"
}
end
links{
"ocore_" .. _OPTIONS["osd"],
}
maintargetosdoptions(_target)
includedirs {
MAME_DIR .. "src/osd",
MAME_DIR .. "src/emu",
MAME_DIR .. "src/" .. _target,
MAME_DIR .. "src/lib",
MAME_DIR .. "src/lib/util",
MAME_DIR .. "3rdparty",
MAME_DIR .. "3rdparty/zlib",
GEN_DIR .. _target .. "/layout",
GEN_DIR .. "resource",
}
if _OPTIONS["targetos"]=="macosx" then
linkoptions {
"-sectcreate __TEXT __info_plist " .. GEN_DIR .. "/resource/" .. _OPTIONS["target"] .. "-Info.plist"
}
end
if _OPTIONS["targetos"]=="windows" then
end
files {
MAME_DIR .. "src/".._target .."/" .. _target ..".c",
MAME_DIR .. "src/version.c",
GEN_DIR .. _target .. "/" .. _subtarget .."/drivlist.c",
}
debugdir (MAME_DIR)
debugargs ("-window")
end
|