trunk/scripts/src/osd/modules.lua
| r0 | r245360 | |
| 1 | function osdmodulesbuild() |
| 2 | |
| 3 | removeflags { |
| 4 | "SingleOutputDir", |
| 5 | } |
| 6 | |
| 7 | options { |
| 8 | "ForceCPP", |
| 9 | } |
| 10 | |
| 11 | files { |
| 12 | MAME_DIR .. "src/osd/modules/lib/osdobj_common.c", |
| 13 | MAME_DIR .. "src/osd/modules/debugger/none.c", |
| 14 | MAME_DIR .. "src/osd/modules/debugger/debugint.c", |
| 15 | MAME_DIR .. "src/osd/modules/debugger/debugwin.c", |
| 16 | MAME_DIR .. "src/osd/modules/debugger/debugqt.c", |
| 17 | MAME_DIR .. "src/osd/modules/font/font_sdl.c", |
| 18 | MAME_DIR .. "src/osd/modules/font/font_windows.c", |
| 19 | MAME_DIR .. "src/osd/modules/font/font_osx.c", |
| 20 | MAME_DIR .. "src/osd/modules/font/font_none.c", |
| 21 | MAME_DIR .. "src/osd/modules/netdev/taptun.c", |
| 22 | MAME_DIR .. "src/osd/modules/netdev/pcap.c", |
| 23 | MAME_DIR .. "src/osd/modules/netdev/none.c", |
| 24 | MAME_DIR .. "src/osd/modules/midi/portmidi.c", |
| 25 | MAME_DIR .. "src/osd/modules/midi/none.c", |
| 26 | MAME_DIR .. "src/osd/modules/sound/js_sound.c", |
| 27 | MAME_DIR .. "src/osd/modules/sound/direct_sound.c", |
| 28 | MAME_DIR .. "src/osd/modules/sound/sdl_sound.c", |
| 29 | MAME_DIR .. "src/osd/modules/sound/none.c", |
| 30 | } |
| 31 | |
| 32 | if _OPTIONS["targetos"]=="windows" then |
| 33 | includedirs { |
| 34 | MAME_DIR .. "3rdparty/winpcap/Include", |
| 35 | } |
| 36 | end |
| 37 | |
| 38 | if _OPTIONS["NO_OPENGL"]=="1" then |
| 39 | defines { |
| 40 | "USE_OPENGL=0", |
| 41 | } |
| 42 | else |
| 43 | files { |
| 44 | MAME_DIR .. "src/osd/modules/render/drawogl.c", |
| 45 | MAME_DIR .. "src/osd/modules/opengl/gl_shader_tool.c", |
| 46 | MAME_DIR .. "src/osd/modules/opengl/gl_shader_mgr.c", |
| 47 | } |
| 48 | defines { |
| 49 | "USE_OPENGL=1", |
| 50 | } |
| 51 | if _OPTIONS["USE_DISPATCH_GL"]=="1" then |
| 52 | defines { |
| 53 | "USE_DISPATCH_GL=1", |
| 54 | } |
| 55 | end |
| 56 | end |
| 57 | |
| 58 | if USE_BGFX == 1 then |
| 59 | files { |
| 60 | MAME_DIR .. "src/osd/modules/render/drawbgfx.c", |
| 61 | } |
| 62 | defines { |
| 63 | "USE_BGFX" |
| 64 | } |
| 65 | includedirs { |
| 66 | MAME_DIR .. "3rdparty/bgfx/include", |
| 67 | MAME_DIR .. "3rdparty/bx/include", |
| 68 | } |
| 69 | end |
| 70 | |
| 71 | if _OPTIONS["NO_USE_MIDI"]=="1" then |
| 72 | defines { |
| 73 | "NO_USE_MIDI", |
| 74 | } |
| 75 | end |
| 76 | |
| 77 | if _OPTIONS["USE_QTDEBUG"]=="1" then |
| 78 | files { |
| 79 | MAME_DIR .. "src/osd/modules/debugger/qt/debuggerview.c", |
| 80 | MAME_DIR .. "src/osd/modules/debugger/qt/windowqt.c", |
| 81 | MAME_DIR .. "src/osd/modules/debugger/qt/logwindow.c", |
| 82 | MAME_DIR .. "src/osd/modules/debugger/qt/dasmwindow.c", |
| 83 | MAME_DIR .. "src/osd/modules/debugger/qt/mainwindow.c", |
| 84 | MAME_DIR .. "src/osd/modules/debugger/qt/memorywindow.c", |
| 85 | MAME_DIR .. "src/osd/modules/debugger/qt/breakpointswindow.c", |
| 86 | MAME_DIR .. "src/osd/modules/debugger/qt/deviceswindow.c", |
| 87 | MAME_DIR .. "src/osd/modules/debugger/qt/deviceinformationwindow.c", |
| 88 | GEN_DIR .. "osd/modules/debugger/qt/debuggerview.moc.c", |
| 89 | GEN_DIR .. "osd/modules/debugger/qt/windowqt.moc.c", |
| 90 | GEN_DIR .. "osd/modules/debugger/qt/logwindow.moc.c", |
| 91 | GEN_DIR .. "osd/modules/debugger/qt/dasmwindow.moc.c", |
| 92 | GEN_DIR .. "osd/modules/debugger/qt/mainwindow.moc.c", |
| 93 | GEN_DIR .. "osd/modules/debugger/qt/memorywindow.moc.c", |
| 94 | GEN_DIR .. "osd/modules/debugger/qt/breakpointswindow.moc.c", |
| 95 | GEN_DIR .. "osd/modules/debugger/qt/deviceswindow.moc.c", |
| 96 | GEN_DIR .. "osd/modules/debugger/qt/deviceinformationwindow.moc.c", |
| 97 | } |
| 98 | defines { |
| 99 | "USE_QTDEBUG=1", |
| 100 | } |
| 101 | if _OPTIONS["targetos"]=="windows" then |
| 102 | configuration { "mingw*" } |
| 103 | buildoptions { |
| 104 | "-I$(shell qmake -query QT_INSTALL_HEADERS)/QtCore", |
| 105 | "-I$(shell qmake -query QT_INSTALL_HEADERS)/QtGui", |
| 106 | "-I$(shell qmake -query QT_INSTALL_HEADERS)", |
| 107 | } |
| 108 | configuration { } |
| 109 | elseif _OPTIONS["targetos"]=="macosx" then |
| 110 | -- TODO: search path for Qt on OSX platform |
| 111 | else |
| 112 | buildoptions { |
| 113 | string.gsub(os.outputof("pkg-config --cflags QtGui"), '[\r\n]+', ' '), |
| 114 | } |
| 115 | end |
| 116 | else |
| 117 | defines { |
| 118 | "USE_QTDEBUG=0", |
| 119 | } |
| 120 | end |
| 121 | |
| 122 | end |
| 123 | |
| 124 | |
| 125 | function osdmodulestargetconf() |
| 126 | |
| 127 | if _OPTIONS["NO_OPENGL"]~="1" then |
| 128 | if _OPTIONS["targetos"]=="macosx" then |
| 129 | links { |
| 130 | "OpenGL.framework", |
| 131 | } |
| 132 | elseif _OPTIONS["USE_DISPATCH_GL"]~="1" then |
| 133 | if _OPTIONS["targetos"]=="windows" then |
| 134 | links { |
| 135 | "opengl32", |
| 136 | } |
| 137 | else |
| 138 | links { |
| 139 | "GL", |
| 140 | } |
| 141 | end |
| 142 | end |
| 143 | end |
| 144 | |
| 145 | if _OPTIONS["NO_USE_MIDI"]~="1" then |
| 146 | if _OPTIONS["targetos"]=="linux" then |
| 147 | linkoptions { |
| 148 | string.gsub(os.outputof("pkg-config --libs alsa"), '[\r\n]+', ' '), |
| 149 | } |
| 150 | elseif _OPTIONS["targetos"]=="macosx" then |
| 151 | links { |
| 152 | "CoreAudio.framework", |
| 153 | "CoreMIDI.framework", |
| 154 | } |
| 155 | end |
| 156 | end |
| 157 | |
| 158 | if _OPTIONS["USE_QTDEBUG"]=="1" then |
| 159 | if _OPTIONS["targetos"]=="windows" then |
| 160 | linkoptions { |
| 161 | "-L$(shell qmake -query QT_INSTALL_LIBS)", |
| 162 | } |
| 163 | links { |
| 164 | "qtmain", |
| 165 | "QtGui4", |
| 166 | "QtCore4", |
| 167 | } |
| 168 | elseif _OPTIONS["targetos"]=="macosx" then |
| 169 | -- TODO: Qt libs for OSX platform |
| 170 | else |
| 171 | linkoptions { |
| 172 | string.gsub(os.outputof("pkg-config --libs QtGui"), '[\r\n]+', ' '), |
| 173 | } |
| 174 | end |
| 175 | end |
| 176 | |
| 177 | end |
| 178 | |
| 179 | |
| 180 | newoption { |
| 181 | trigger = "DONT_USE_NETWORK", |
| 182 | description = "Disable network access", |
| 183 | } |
| 184 | |
| 185 | newoption { |
| 186 | trigger = "NO_OPENGL", |
| 187 | description = "Disable use of OpenGL", |
| 188 | allowed = { |
| 189 | { "0", "Enable OpenGL" }, |
| 190 | { "1", "Disable OpenGL" }, |
| 191 | }, |
| 192 | } |
| 193 | |
| 194 | if not _OPTIONS["NO_OPENGL"] then |
| 195 | if _OPTIONS["targetos"]=="os2" then |
| 196 | _OPTIONS["NO_OPENGL"] = "1" |
| 197 | else |
| 198 | _OPTIONS["NO_OPENGL"] = "0" |
| 199 | end |
| 200 | end |
| 201 | |
| 202 | newoption { |
| 203 | trigger = "USE_DISPATCH_GL", |
| 204 | description = "Use GL-dispatching", |
| 205 | allowed = { |
| 206 | { "0", "Link to OpenGL library" }, |
| 207 | { "1", "Use GL-dispatching" }, |
| 208 | }, |
| 209 | } |
| 210 | |
| 211 | if not _OPTIONS["USE_DISPATCH_GL"] then |
| 212 | if USE_BGFX == 1 then |
| 213 | _OPTIONS["USE_DISPATCH_GL"] = "0" |
| 214 | else |
| 215 | _OPTIONS["USE_DISPATCH_GL"] = "1" |
| 216 | end |
| 217 | end |
| 218 | |
| 219 | newoption { |
| 220 | trigger = "NO_USE_MIDI", |
| 221 | description = "Disable MIDI I/O", |
| 222 | allowed = { |
| 223 | { "0", "Enable MIDI" }, |
| 224 | { "1", "Disable MIDI" }, |
| 225 | }, |
| 226 | } |
| 227 | |
| 228 | if not _OPTIONS["NO_USE_MIDI"] then |
| 229 | if _OPTIONS["targetos"]=="freebsd" or _OPTIONS["targetos"]=="openbsd" or _OPTIONS["targetos"]=="netbsd" or _OPTIONS["targetos"]=="solaris" or _OPTIONS["targetos"]=="haiku" or _OPTIONS["targetos"] == "emscripten" or _OPTIONS["targetos"] == "os2" then |
| 230 | _OPTIONS["NO_USE_MIDI"] = "1" |
| 231 | else |
| 232 | _OPTIONS["NO_USE_MIDI"] = "0" |
| 233 | end |
| 234 | end |
| 235 | |
| 236 | newoption { |
| 237 | trigger = "USE_QTDEBUG", |
| 238 | description = "Use QT debugger", |
| 239 | allowed = { |
| 240 | { "0", "Don't use Qt debugger" }, |
| 241 | { "1", "Use Qt debugger" }, |
| 242 | }, |
| 243 | } |
| 244 | |
| 245 | if not _OPTIONS["USE_QTDEBUG"] then |
| 246 | if _OPTIONS["targetos"]=="windows" or _OPTIONS["targetos"]=="macosx" or _OPTIONS["targetos"]=="solaris" or _OPTIONS["targetos"]=="haiku" or _OPTIONS["targetos"] == "emscripten" or _OPTIONS["targetos"] == "os2" then |
| 247 | _OPTIONS["USE_QTDEBUG"] = "0" |
| 248 | else |
| 249 | _OPTIONS["USE_QTDEBUG"] = "1" |
| 250 | end |
| 251 | end |
trunk/scripts/src/osd/sdl.lua
| r245359 | r245360 | |
| 1 | dofile("modules.lua") |
| 2 | |
| 3 | |
| 1 | 4 | function maintargetosdoptions(_target) |
| 5 | osdmodulestargetconf() |
| 6 | |
| 2 | 7 | if _OPTIONS["USE_DISPATCH_GL"]~="1" and _OPTIONS["MESA_INSTALL_ROOT"] then |
| 3 | 8 | libdirs { |
| 4 | 9 | path.join(_OPTIONS["MESA_INSTALL_ROOT"],"lib"), |
| r245359 | r245360 | |
| 32 | 37 | "SDL_ttf", |
| 33 | 38 | } |
| 34 | 39 | end |
| 35 | | if _OPTIONS["NO_OPENGL"]~="1" and _OPTIONS["USE_DISPATCH_GL"]~="1" then |
| 36 | | links { |
| 37 | | "GL" |
| 38 | | } |
| 39 | | end |
| 40 | 40 | linkoptions { |
| 41 | 41 | string.gsub(os.outputof("pkg-config --libs fontconfig"), '[\r\n]+', ' '), |
| 42 | 42 | } |
| 43 | 43 | end |
| 44 | 44 | |
| 45 | 45 | if _OPTIONS["targetos"]=="windows" then |
| 46 | | if _OPTIONS["NO_OPENGL"]~="1" and _OPTIONS["USE_DISPATCH_GL"]~="1" then |
| 47 | | links { |
| 48 | | "opengl32" |
| 49 | | } |
| 50 | | end |
| 51 | 46 | configuration { "mingw*" } |
| 52 | 47 | linkoptions{ |
| 53 | 48 | "-municode", |
| r245359 | r245360 | |
| 65 | 60 | "SDL2", |
| 66 | 61 | } |
| 67 | 62 | configuration {} |
| 68 | | |
| 69 | | if (USE_QT == 1) then |
| 70 | | linkoptions{ |
| 71 | | "-L$(shell qmake -query QT_INSTALL_LIBS)", |
| 72 | | } |
| 73 | | links { |
| 74 | | "qtmain", |
| 75 | | "QtGui4", |
| 76 | | "QtCore4", |
| 77 | | } |
| 78 | | end |
| 79 | | elseif _OPTIONS["targetos"]=="linux" then |
| 80 | | if USE_QT == 1 then |
| 81 | | linkoptions { |
| 82 | | "$(shell pkg-config --libs QtGui)", |
| 83 | | } |
| 84 | | links { |
| 85 | | "QtGui", |
| 86 | | "QtCore", |
| 87 | | } |
| 88 | | end |
| 89 | | if _OPTIONS["NO_USE_MIDI"]~="1" then |
| 90 | | linkoptions { |
| 91 | | string.gsub(os.outputof("pkg-config --libs alsa"), '[\r\n]+', ' '), |
| 92 | | } |
| 93 | | end |
| 94 | | elseif _OPTIONS["targetos"]=="macosx" then |
| 95 | | if _OPTIONS["NO_USE_MIDI"]~="1" then |
| 96 | | links { |
| 97 | | "CoreAudio.framework", |
| 98 | | "CoreMIDI.framework", |
| 99 | | } |
| 100 | | end |
| 101 | 63 | elseif _OPTIONS["targetos"]=="haiku" then |
| 102 | 64 | links { |
| 103 | 65 | "network", |
| r245359 | r245360 | |
| 122 | 84 | |
| 123 | 85 | |
| 124 | 86 | newoption { |
| 125 | | trigger = "NO_OPENGL", |
| 126 | | description = "Disable use of OpenGL", |
| 127 | | allowed = { |
| 128 | | { "0", "Enable OpenGL" }, |
| 129 | | { "1", "Disable OpenGL" }, |
| 130 | | }, |
| 131 | | } |
| 132 | | |
| 133 | | if not _OPTIONS["NO_OPENGL"] then |
| 134 | | if _OPTIONS["targetos"]=="os2" then |
| 135 | | _OPTIONS["NO_OPENGL"] = "1" |
| 136 | | else |
| 137 | | _OPTIONS["NO_OPENGL"] = "0" |
| 138 | | end |
| 139 | | end |
| 140 | | |
| 141 | | newoption { |
| 142 | | trigger = "USE_DISPATCH_GL", |
| 143 | | description = "Use GL-dispatching (takes precedence over MESA_INSTALL_ROOT)", |
| 144 | | allowed = { |
| 145 | | { "0", "Link to OpenGL library" }, |
| 146 | | { "1", "Use GL-dispatching" }, |
| 147 | | }, |
| 148 | | } |
| 149 | | |
| 150 | | if not _OPTIONS["USE_DISPATCH_GL"] then |
| 151 | | if USE_BGFX == 1 then |
| 152 | | _OPTIONS["USE_DISPATCH_GL"] = "0" |
| 153 | | else |
| 154 | | _OPTIONS["USE_DISPATCH_GL"] = "1" |
| 155 | | end |
| 156 | | end |
| 157 | | |
| 158 | | newoption { |
| 159 | 87 | trigger = "MESA_INSTALL_ROOT", |
| 160 | | description = "link against specific GL-Library - also adds rpath to executable", |
| 88 | description = "link against specific GL-Library - also adds rpath to executable (overridden by USE_DISPATCH_GL)", |
| 161 | 89 | } |
| 162 | 90 | |
| 163 | 91 | newoption { |
| r245359 | r245360 | |
| 191 | 119 | end |
| 192 | 120 | |
| 193 | 121 | newoption { |
| 194 | | trigger = "NO_USE_MIDI", |
| 195 | | description = "Disable MIDI I/O", |
| 196 | | allowed = { |
| 197 | | { "0", "Enable MIDI" }, |
| 198 | | { "1", "Disable MIDI" }, |
| 199 | | }, |
| 200 | | } |
| 201 | | |
| 202 | | if not _OPTIONS["NO_USE_MIDI"] then |
| 203 | | if _OPTIONS["targetos"]=="freebsd" or _OPTIONS["targetos"]=="openbsd" or _OPTIONS["targetos"]=="netbsd" or _OPTIONS["targetos"]=="solaris" or _OPTIONS["targetos"]=="haiku" or _OPTIONS["targetos"] == "emscripten" or _OPTIONS["targetos"] == "os2" then |
| 204 | | _OPTIONS["NO_USE_MIDI"] = "1" |
| 205 | | else |
| 206 | | _OPTIONS["NO_USE_MIDI"] = "0" |
| 207 | | end |
| 208 | | end |
| 209 | | |
| 210 | | newoption { |
| 211 | 122 | trigger = "SDL_LIBVER", |
| 212 | 123 | description = "Choose SDL version", |
| 213 | 124 | allowed = { |
| r245359 | r245360 | |
| 312 | 223 | if _OPTIONS["targetos"]=="macosx" then |
| 313 | 224 | links { |
| 314 | 225 | "Cocoa.framework", |
| 315 | | "OpenGL.framework", |
| 316 | 226 | } |
| 317 | 227 | if _OPTIONS["MACOSX_USE_LIBSDL"]~="1" then |
| 318 | 228 | linkoptions { |
| r245359 | r245360 | |
| 374 | 284 | uuid (os.uuid("osd_" .. _OPTIONS["osd"])) |
| 375 | 285 | kind "StaticLib" |
| 376 | 286 | |
| 377 | | removeflags { |
| 378 | | "SingleOutputDir", |
| 379 | | } |
| 380 | | |
| 381 | | options { |
| 382 | | "ForceCPP", |
| 383 | | } |
| 384 | | |
| 385 | 287 | dofile("sdl_cfg.lua") |
| 386 | | |
| 288 | osdmodulesbuild() |
| 289 | |
| 387 | 290 | includedirs { |
| 388 | 291 | MAME_DIR .. "src/emu", |
| 389 | 292 | MAME_DIR .. "src/osd", |
| r245359 | r245360 | |
| 391 | 294 | MAME_DIR .. "src/lib/util", |
| 392 | 295 | MAME_DIR .. "src/osd/modules/render", |
| 393 | 296 | MAME_DIR .. "3rdparty", |
| 394 | | MAME_DIR .. "3rdparty/winpcap/Include", |
| 395 | | MAME_DIR .. "3rdparty/bgfx/include", |
| 396 | | MAME_DIR .. "3rdparty/bx/include", |
| 397 | 297 | MAME_DIR .. "src/osd/sdl", |
| 398 | 298 | } |
| 399 | 299 | |
| r245359 | r245360 | |
| 439 | 339 | MAME_DIR .. "src/osd/sdl/window.c", |
| 440 | 340 | MAME_DIR .. "src/osd/sdl/output.c", |
| 441 | 341 | MAME_DIR .. "src/osd/sdl/watchdog.c", |
| 442 | | MAME_DIR .. "src/osd/modules/lib/osdobj_common.c", |
| 443 | 342 | MAME_DIR .. "src/osd/modules/render/drawsdl.c", |
| 444 | | MAME_DIR .. "src/osd/modules/debugger/none.c", |
| 445 | | MAME_DIR .. "src/osd/modules/debugger/debugint.c", |
| 446 | | MAME_DIR .. "src/osd/modules/debugger/debugwin.c", |
| 447 | | MAME_DIR .. "src/osd/modules/debugger/debugqt.c", |
| 448 | | MAME_DIR .. "src/osd/modules/font/font_sdl.c", |
| 449 | | MAME_DIR .. "src/osd/modules/font/font_windows.c", |
| 450 | | MAME_DIR .. "src/osd/modules/font/font_osx.c", |
| 451 | | MAME_DIR .. "src/osd/modules/font/font_none.c", |
| 452 | | MAME_DIR .. "src/osd/modules/netdev/taptun.c", |
| 453 | | MAME_DIR .. "src/osd/modules/netdev/pcap.c", |
| 454 | | MAME_DIR .. "src/osd/modules/netdev/none.c", |
| 455 | | MAME_DIR .. "src/osd/modules/midi/portmidi.c", |
| 456 | | MAME_DIR .. "src/osd/modules/midi/none.c", |
| 457 | | MAME_DIR .. "src/osd/modules/sound/js_sound.c", |
| 458 | | MAME_DIR .. "src/osd/modules/sound/direct_sound.c", |
| 459 | | MAME_DIR .. "src/osd/modules/sound/sdl_sound.c", |
| 460 | | MAME_DIR .. "src/osd/modules/sound/none.c", |
| 461 | 343 | } |
| 462 | | if _OPTIONS["NO_OPENGL"]~="1" then |
| 463 | | files { |
| 464 | | MAME_DIR .. "src/osd/modules/render/drawogl.c", |
| 465 | | MAME_DIR .. "src/osd/modules/opengl/gl_shader_tool.c", |
| 466 | | MAME_DIR .. "src/osd/modules/opengl/gl_shader_mgr.c", |
| 467 | | } |
| 468 | | end |
| 469 | 344 | if _OPTIONS["SDL_LIBVER"]=="sdl2" then |
| 470 | 345 | files { |
| 471 | 346 | MAME_DIR .. "src/osd/modules/render/draw13.c", |
| 472 | 347 | } |
| 473 | 348 | end |
| 474 | 349 | |
| 475 | | if USE_QT == 1 then |
| 476 | | files { |
| 477 | | MAME_DIR .. "src/osd/modules/debugger/qt/debuggerview.c", |
| 478 | | MAME_DIR .. "src/osd/modules/debugger/qt/windowqt.c", |
| 479 | | MAME_DIR .. "src/osd/modules/debugger/qt/logwindow.c", |
| 480 | | MAME_DIR .. "src/osd/modules/debugger/qt/dasmwindow.c", |
| 481 | | MAME_DIR .. "src/osd/modules/debugger/qt/mainwindow.c", |
| 482 | | MAME_DIR .. "src/osd/modules/debugger/qt/memorywindow.c", |
| 483 | | MAME_DIR .. "src/osd/modules/debugger/qt/breakpointswindow.c", |
| 484 | | MAME_DIR .. "src/osd/modules/debugger/qt/deviceswindow.c", |
| 485 | | MAME_DIR .. "src/osd/modules/debugger/qt/deviceinformationwindow.c", |
| 486 | 350 | |
| 487 | | GEN_DIR .. "osd/modules/debugger/qt/debuggerview.moc.c", |
| 488 | | GEN_DIR .. "osd/modules/debugger/qt/windowqt.moc.c", |
| 489 | | GEN_DIR .. "osd/modules/debugger/qt/logwindow.moc.c", |
| 490 | | GEN_DIR .. "osd/modules/debugger/qt/dasmwindow.moc.c", |
| 491 | | GEN_DIR .. "osd/modules/debugger/qt/mainwindow.moc.c", |
| 492 | | GEN_DIR .. "osd/modules/debugger/qt/memorywindow.moc.c", |
| 493 | | GEN_DIR .. "osd/modules/debugger/qt/breakpointswindow.moc.c", |
| 494 | | GEN_DIR .. "osd/modules/debugger/qt/deviceswindow.moc.c", |
| 495 | | GEN_DIR .. "osd/modules/debugger/qt/deviceinformationwindow.moc.c", |
| 496 | | } |
| 497 | | end |
| 498 | | |
| 499 | | if USE_BGFX == 1 then |
| 500 | | files { |
| 501 | | MAME_DIR .. "src/osd/modules/render/drawbgfx.c", |
| 502 | | } |
| 503 | | end |
| 504 | | |
| 505 | | |
| 506 | 351 | project ("ocore_" .. _OPTIONS["osd"]) |
| 507 | 352 | uuid (os.uuid("ocore_" .. _OPTIONS["osd"])) |
| 508 | 353 | kind "StaticLib" |
trunk/scripts/src/osd/sdl_cfg.lua
| r245359 | r245360 | |
| 8 | 8 | } |
| 9 | 9 | end |
| 10 | 10 | |
| 11 | | if _OPTIONS["NO_OPENGL"]=="1" then |
| 12 | | defines { |
| 13 | | "USE_OPENGL=0", |
| 11 | if _OPTIONS["NO_OPENGL"]~="1" and _OPTIONS["USE_DISPATCH_GL"]~="1" and _OPTIONS["MESA_INSTALL_ROOT"] then |
| 12 | includedirs { |
| 13 | path.join(_OPTIONS["MESA_INSTALL_ROOT"],"include"), |
| 14 | 14 | } |
| 15 | | else |
| 16 | | defines { |
| 17 | | "USE_OPENGL=1", |
| 18 | | } |
| 19 | | if _OPTIONS["USE_DISPATCH_GL"]=="1" then |
| 20 | | defines { |
| 21 | | "USE_DISPATCH_GL=1", |
| 22 | | } |
| 23 | | elseif _OPTIONS["MESA_INSTALL_ROOT"] then |
| 24 | | includedirs { |
| 25 | | path.join(_OPTIONS["MESA_INSTALL_ROOT"],"include"), |
| 26 | | } |
| 27 | | end |
| 28 | 15 | end |
| 29 | 16 | |
| 30 | 17 | |
| r245359 | r245360 | |
| 54 | 41 | } |
| 55 | 42 | end |
| 56 | 43 | |
| 57 | | if _OPTIONS["NO_USE_MIDI"]=="1" then |
| 58 | | defines { |
| 59 | | "NO_USE_MIDI", |
| 60 | | } |
| 61 | | elseif _OPTIONS["targetos"]=="linux" then |
| 44 | if _OPTIONS["NO_USE_MIDI"]~="1" and _OPTIONS["targetos"]=="linux" then |
| 62 | 45 | buildoptions { |
| 63 | 46 | string.gsub(os.outputof("pkg-config --cflags alsa"), '[\r\n]+', ' '), |
| 64 | 47 | } |
| r245359 | r245360 | |
| 79 | 62 | } |
| 80 | 63 | end |
| 81 | 64 | |
| 82 | | if USE_BGFX == 1 then |
| 83 | | defines { |
| 84 | | "USE_BGFX" |
| 85 | | } |
| 86 | | end |
| 87 | | |
| 88 | 65 | defines { |
| 89 | 66 | "OSD_SDL", |
| 90 | 67 | "SYNC_IMPLEMENTATION=" .. SYNC_IMPLEMENTATION, |
| r245359 | r245360 | |
| 124 | 101 | defines { |
| 125 | 102 | "UNICODE", |
| 126 | 103 | "_UNICODE", |
| 127 | | "USE_QTDEBUG=" .. USE_QT, |
| 128 | 104 | "main=utf8_main", |
| 129 | 105 | } |
| 130 | | configuration { "mingw*" } |
| 131 | | buildoptions { |
| 132 | | "-I$(shell qmake -query QT_INSTALL_HEADERS)/QtCore", |
| 133 | | "-I$(shell qmake -query QT_INSTALL_HEADERS)/QtGui", |
| 134 | | "-I$(shell qmake -query QT_INSTALL_HEADERS)", |
| 135 | | } |
| 136 | | |
| 106 | |
| 137 | 107 | configuration { "vs*" } |
| 138 | 108 | includedirs { |
| 139 | 109 | path.join(_OPTIONS["SDL_INSTALL_ROOT"],"include") |
| r245359 | r245360 | |
| 141 | 111 | configuration { } |
| 142 | 112 | |
| 143 | 113 | elseif _OPTIONS["targetos"]=="linux" then |
| 144 | | defines { |
| 145 | | "USE_QTDEBUG=" .. USE_QT, |
| 146 | | } |
| 147 | 114 | buildoptions { |
| 148 | 115 | '$(shell pkg-config --cflags QtGui)', |
| 149 | 116 | } |
| r245359 | r245360 | |
| 151 | 118 | defines { |
| 152 | 119 | "SDLMAME_MACOSX", |
| 153 | 120 | "SDLMAME_DARWIN", |
| 154 | | "USE_QTDEBUG=0", |
| 155 | 121 | } |
| 156 | 122 | elseif _OPTIONS["targetos"]=="freebsd" then |
| 157 | 123 | buildoptions { |
trunk/scripts/src/osd/windows.lua
| r245359 | r245360 | |
| 1 | dofile("modules.lua") |
| 2 | |
| 3 | |
| 1 | 4 | function maintargetosdoptions(_target) |
| 5 | osdmodulestargetconf() |
| 6 | |
| 2 | 7 | linkoptions { |
| 3 | 8 | "-municode", |
| 4 | 9 | } |
| r245359 | r245360 | |
| 21 | 26 | uuid (os.uuid("osd_" .. _OPTIONS["osd"])) |
| 22 | 27 | kind "StaticLib" |
| 23 | 28 | |
| 24 | | removeflags { |
| 25 | | "SingleOutputDir", |
| 26 | | } |
| 27 | | |
| 28 | | options { |
| 29 | | "ForceCPP", |
| 30 | | } |
| 31 | | |
| 32 | 29 | dofile("windows_cfg.lua") |
| 30 | osdmodulesbuild() |
| 33 | 31 | |
| 34 | 32 | defines { |
| 35 | 33 | "DIRECTINPUT_VERSION=0x0800", |
| r245359 | r245360 | |
| 43 | 41 | MAME_DIR .. "src/lib/util", |
| 44 | 42 | MAME_DIR .. "src/osd/modules/render", |
| 45 | 43 | MAME_DIR .. "3rdparty", |
| 46 | | MAME_DIR .. "3rdparty/winpcap/Include", |
| 47 | | MAME_DIR .. "3rdparty/bgfx/include", |
| 48 | | MAME_DIR .. "3rdparty/bx/include", |
| 49 | 44 | } |
| 50 | 45 | |
| 51 | 46 | includedirs { |
| r245359 | r245360 | |
| 65 | 60 | MAME_DIR .. "src/osd/windows/window.c", |
| 66 | 61 | MAME_DIR .. "src/osd/windows/winmenu.c", |
| 67 | 62 | MAME_DIR .. "src/osd/windows/winmain.c", |
| 68 | | MAME_DIR .. "src/osd/modules/debugger/none.c", |
| 69 | | MAME_DIR .. "src/osd/modules/debugger/debugint.c", |
| 70 | | MAME_DIR .. "src/osd/modules/debugger/debugwin.c", |
| 71 | | MAME_DIR .. "src/osd/modules/debugger/debugqt.c", |
| 72 | 63 | MAME_DIR .. "src/osd/modules/debugger/win/consolewininfo.c", |
| 73 | 64 | MAME_DIR .. "src/osd/modules/debugger/win/debugbaseinfo.c", |
| 74 | 65 | MAME_DIR .. "src/osd/modules/debugger/win/debugviewinfo.c", |
| r245359 | r245360 | |
| 82 | 73 | MAME_DIR .. "src/osd/modules/debugger/win/memorywininfo.c", |
| 83 | 74 | MAME_DIR .. "src/osd/modules/debugger/win/pointswininfo.c", |
| 84 | 75 | MAME_DIR .. "src/osd/modules/debugger/win/uimetrics.c", |
| 85 | | MAME_DIR .. "src/osd/modules/render/drawogl.c", |
| 86 | | MAME_DIR .. "src/osd/modules/opengl/gl_shader_tool.c", |
| 87 | | MAME_DIR .. "src/osd/modules/opengl/gl_shader_mgr.c", |
| 88 | | MAME_DIR .. "src/osd/modules/lib/osdobj_common.c", |
| 89 | | MAME_DIR .. "src/osd/modules/font/font_sdl.c", |
| 90 | | MAME_DIR .. "src/osd/modules/font/font_windows.c", |
| 91 | | MAME_DIR .. "src/osd/modules/font/font_osx.c", |
| 92 | | MAME_DIR .. "src/osd/modules/font/font_none.c", |
| 93 | | MAME_DIR .. "src/osd/modules/netdev/taptun.c", |
| 94 | | MAME_DIR .. "src/osd/modules/netdev/pcap.c", |
| 95 | | MAME_DIR .. "src/osd/modules/netdev/none.c", |
| 96 | | MAME_DIR .. "src/osd/modules/midi/portmidi.c", |
| 97 | | MAME_DIR .. "src/osd/modules/midi/none.c", |
| 98 | | MAME_DIR .. "src/osd/modules/sound/js_sound.c", |
| 99 | | MAME_DIR .. "src/osd/modules/sound/direct_sound.c", |
| 100 | | MAME_DIR .. "src/osd/modules/sound/sdl_sound.c", |
| 101 | | MAME_DIR .. "src/osd/modules/sound/none.c", |
| 102 | 76 | } |
| 103 | 77 | |
| 104 | | if USE_BGFX == 1 then |
| 105 | | files { |
| 106 | | MAME_DIR .. "src/osd/modules/render/drawbgfx.c", |
| 107 | | } |
| 108 | | end |
| 109 | 78 | |
| 110 | | |
| 111 | 79 | project ("ocore_" .. _OPTIONS["osd"]) |
| 112 | 80 | uuid (os.uuid("ocore_" .. _OPTIONS["osd"])) |
| 113 | 81 | kind "StaticLib" |