Previous 199869 Revisions Next

r36848 Tuesday 31st March, 2015 at 20:29:54 UTC by Vasantha Crabb
Refactor out common OSD modules into separate lua file
[/trunk]makefile
[scripts]genie.lua
[scripts/src/osd]modules.lua* sdl.lua sdl_cfg.lua windows.lua windows_cfg.lua
[src/osd/sdl]osdsdl.h sdlmain.c

trunk/makefile
r245359r245360
293293PARAMS += --targetos=$(TARGETOS)
294294endif
295295
296ifndef USE_QT
297ifneq ($(TARGETOS),macosx)
298USE_QT := 1
299else
300USE_QT := 0
301endif
302endif
303PARAMS += --USE_QT=$(USE_QT)
304
305296ifdef DONT_USE_NETWORK
306297PARAMS += --DONT_USE_NETWORK='$(DONT_USE_NETWORK)'
307298endif
r245359r245360
314305PARAMS += --USE_DISPATCH_GL='$(USE_DISPATCH_GL)'
315306endif
316307
308ifdef NO_USE_MIDI
309PARAMS += --NO_USE_MIDI='$(NO_USE_MIDI)'
310endif
311
312ifdef USE_QTDEBUG
313PARAMS += --USE_QTDEBUG='$(USE_QTDEBUG)'
314endif
315
317316ifdef MESA_INSTALL_ROOT
318317PARAMS += --MESA_INSTALL_ROOT='$(MESA_INSTALL_ROOT)'
319318endif
r245359r245360
326325PARAMS += --NO_USE_XINPUT='$(NO_USE_XINPUT)'
327326endif
328327
329ifdef NO_USE_MIDI
330PARAMS += --NO_USE_MIDI='$(NO_USE_MIDI)'
331endif
332
333328ifdef SDL_LIBVER
334329PARAMS += --SDL_LIBVER='$(SDL_LIBVER)'
335330endif
r245359r245360
710705
711706LAYOUTS=$(wildcard $(SRC)/emu/layout/*.lay) $(wildcard $(SRC)/$(TARGET)/layout/*.lay)
712707
713ifeq ($(USE_QT),0)
708# TODO: this will attempt to build on many platforms lacking Qt, e.g. emscripten and OS/2
709ifneq ($(TARGETOS),macosx)
714710MOC_FILES=
715711else
716712MOC_FILES=$(wildcard $(SRC)/osd/modules/debugger/qt/*.h)
trunk/scripts/genie.lua
r245359r245360
182182   }
183183}
184184
185newoption {
186   trigger = "USE_QT",
187   description = "Use of QT.",
188   allowed = {
189      { "0",   "Disabled"    },
190      { "1",   "Enabled"      },
191   }
192}
193
194newoption {
195   trigger = "DONT_USE_NETWORK",
196   description = "Disable network access",
197}
198
199185local os_version = str_to_version(_OPTIONS["os_version"])
200186
201187USE_BGFX = 1
r245359r245360
206192   USE_BGFX = tonumber(_OPTIONS["USE_BGFX"])
207193end
208194
209USE_QT = 1
210if(_OPTIONS["USE_QT"]~=nil) then
211   USE_QT = tonumber(_OPTIONS["USE_QT"])
212end
213
214195GEN_DIR = MAME_BUILD_DIR .. "generated/"
215196
216197if (_OPTIONS["target"] == nil) then return false end
trunk/scripts/src/osd/modules.lua
r0r245360
1function 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
122end
123
124
125function 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
177end
178
179
180newoption {
181   trigger = "DONT_USE_NETWORK",
182   description = "Disable network access",
183}
184
185newoption {
186   trigger = "NO_OPENGL",
187   description = "Disable use of OpenGL",
188   allowed = {
189      { "0",  "Enable OpenGL"  },
190      { "1",  "Disable OpenGL" },
191   },
192}
193
194if 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
200end
201
202newoption {
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
211if 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
217end
218
219newoption {
220   trigger = "NO_USE_MIDI",
221   description = "Disable MIDI I/O",
222   allowed = {
223      { "0",  "Enable MIDI"  },
224      { "1",  "Disable MIDI" },
225   },
226}
227
228if 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
234end
235
236newoption {
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
245if 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
251end
trunk/scripts/src/osd/sdl.lua
r245359r245360
1dofile("modules.lua")
2
3
14function maintargetosdoptions(_target)
5   osdmodulestargetconf()
6
27   if _OPTIONS["USE_DISPATCH_GL"]~="1" and _OPTIONS["MESA_INSTALL_ROOT"] then
38      libdirs {
49         path.join(_OPTIONS["MESA_INSTALL_ROOT"],"lib"),
r245359r245360
3237            "SDL_ttf",
3338         }
3439      end
35      if _OPTIONS["NO_OPENGL"]~="1" and _OPTIONS["USE_DISPATCH_GL"]~="1" then
36         links {
37            "GL"
38         }
39      end
4040      linkoptions {
4141         string.gsub(os.outputof("pkg-config --libs fontconfig"), '[\r\n]+', ' '),
4242      }
4343   end
4444
4545   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
5146      configuration { "mingw*" }
5247         linkoptions{
5348            "-municode",
r245359r245360
6560            "SDL2",
6661         }
6762      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
10163   elseif _OPTIONS["targetos"]=="haiku" then
10264      links {
10365         "network",
r245359r245360
12284
12385
12486newoption {
125   trigger = "NO_OPENGL",
126   description = "Disable use of OpenGL",
127   allowed = {
128      { "0",  "Enable OpenGL"  },
129      { "1",  "Disable OpenGL" },
130   },
131}
132
133if 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
139end
140
141newoption {
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
150if 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
156end
157
158newoption {
15987   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)",
16189}
16290
16391newoption {
r245359r245360
191119end
192120
193121newoption {
194   trigger = "NO_USE_MIDI",
195   description = "Disable MIDI I/O",
196   allowed = {
197      { "0",  "Enable MIDI"  },
198      { "1",  "Disable MIDI" },
199   },
200}
201
202if 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
208end
209
210newoption {
211122   trigger = "SDL_LIBVER",
212123   description = "Choose SDL version",
213124   allowed = {
r245359r245360
312223   if _OPTIONS["targetos"]=="macosx" then
313224      links {
314225         "Cocoa.framework",
315         "OpenGL.framework",
316226      }
317227      if _OPTIONS["MACOSX_USE_LIBSDL"]~="1" then
318228         linkoptions {
r245359r245360
374284   uuid (os.uuid("osd_" .. _OPTIONS["osd"]))
375285   kind "StaticLib"
376286
377   removeflags {
378      "SingleOutputDir",
379   }
380   
381   options {
382      "ForceCPP",
383   }
384
385287   dofile("sdl_cfg.lua")
386   
288   osdmodulesbuild()
289
387290   includedirs {
388291      MAME_DIR .. "src/emu",
389292      MAME_DIR .. "src/osd",
r245359r245360
391294      MAME_DIR .. "src/lib/util",
392295      MAME_DIR .. "src/osd/modules/render",
393296      MAME_DIR .. "3rdparty",
394      MAME_DIR .. "3rdparty/winpcap/Include",
395      MAME_DIR .. "3rdparty/bgfx/include",
396      MAME_DIR .. "3rdparty/bx/include",
397297      MAME_DIR .. "src/osd/sdl",
398298   }
399299
r245359r245360
439339      MAME_DIR .. "src/osd/sdl/window.c",
440340      MAME_DIR .. "src/osd/sdl/output.c",
441341      MAME_DIR .. "src/osd/sdl/watchdog.c",
442      MAME_DIR .. "src/osd/modules/lib/osdobj_common.c",
443342      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",
461343   }
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
469344   if _OPTIONS["SDL_LIBVER"]=="sdl2" then
470345      files {
471346         MAME_DIR .. "src/osd/modules/render/draw13.c",
472347      }
473348   end
474349
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",
486350
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
506351project ("ocore_" .. _OPTIONS["osd"])
507352   uuid (os.uuid("ocore_" .. _OPTIONS["osd"]))
508353   kind "StaticLib"
trunk/scripts/src/osd/sdl_cfg.lua
r245359r245360
88   }
99end
1010
11if _OPTIONS["NO_OPENGL"]=="1" then
12   defines {
13      "USE_OPENGL=0",
11if _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"),
1414   }
15else
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
2815end
2916
3017
r245359r245360
5441   }
5542end
5643
57if _OPTIONS["NO_USE_MIDI"]=="1" then
58   defines {
59      "NO_USE_MIDI",
60   }
61elseif _OPTIONS["targetos"]=="linux" then
44if _OPTIONS["NO_USE_MIDI"]~="1" and _OPTIONS["targetos"]=="linux" then
6245   buildoptions {
6346      string.gsub(os.outputof("pkg-config --cflags alsa"), '[\r\n]+', ' '),
6447   }
r245359r245360
7962   }
8063end
8164
82if USE_BGFX == 1 then
83   defines {
84      "USE_BGFX"
85   }
86end
87
8865defines {
8966   "OSD_SDL",
9067   "SYNC_IMPLEMENTATION=" .. SYNC_IMPLEMENTATION,
r245359r245360
124101   defines {
125102      "UNICODE",
126103      "_UNICODE",
127      "USE_QTDEBUG=" .. USE_QT,
128104      "main=utf8_main",
129105   }
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
137107   configuration { "vs*" }
138108      includedirs {
139109         path.join(_OPTIONS["SDL_INSTALL_ROOT"],"include")
r245359r245360
141111   configuration { }
142112
143113elseif _OPTIONS["targetos"]=="linux" then
144   defines {
145      "USE_QTDEBUG=" .. USE_QT,
146   }
147114   buildoptions {
148115      '$(shell pkg-config --cflags QtGui)',
149116   }
r245359r245360
151118   defines {
152119      "SDLMAME_MACOSX",
153120      "SDLMAME_DARWIN",
154      "USE_QTDEBUG=0",
155121   }
156122elseif _OPTIONS["targetos"]=="freebsd" then
157123   buildoptions {
trunk/scripts/src/osd/windows.lua
r245359r245360
1dofile("modules.lua")
2
3
14function maintargetosdoptions(_target)
5   osdmodulestargetconf()
6
27   linkoptions {
38      "-municode",
49   }
r245359r245360
2126   uuid (os.uuid("osd_" .. _OPTIONS["osd"]))
2227   kind "StaticLib"
2328
24   removeflags {
25      "SingleOutputDir",
26   }
27
28   options {
29      "ForceCPP",
30   }
31
3229   dofile("windows_cfg.lua")
30   osdmodulesbuild()
3331
3432   defines {
3533      "DIRECTINPUT_VERSION=0x0800",
r245359r245360
4341      MAME_DIR .. "src/lib/util",
4442      MAME_DIR .. "src/osd/modules/render",
4543      MAME_DIR .. "3rdparty",
46      MAME_DIR .. "3rdparty/winpcap/Include",
47      MAME_DIR .. "3rdparty/bgfx/include",
48      MAME_DIR .. "3rdparty/bx/include",
4944   }
5045
5146   includedirs {
r245359r245360
6560      MAME_DIR .. "src/osd/windows/window.c",
6661      MAME_DIR .. "src/osd/windows/winmenu.c",
6762      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",
7263      MAME_DIR .. "src/osd/modules/debugger/win/consolewininfo.c",
7364      MAME_DIR .. "src/osd/modules/debugger/win/debugbaseinfo.c",
7465      MAME_DIR .. "src/osd/modules/debugger/win/debugviewinfo.c",
r245359r245360
8273      MAME_DIR .. "src/osd/modules/debugger/win/memorywininfo.c",
8374      MAME_DIR .. "src/osd/modules/debugger/win/pointswininfo.c",
8475      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",
10276   }
10377
104   if USE_BGFX == 1 then
105      files {
106         MAME_DIR .. "src/osd/modules/render/drawbgfx.c",
107      }
108   end
10978
110
11179project ("ocore_" .. _OPTIONS["osd"])
11280   uuid (os.uuid("ocore_" .. _OPTIONS["osd"]))
11381   kind "StaticLib"
trunk/scripts/src/osd/windows_cfg.lua
r245359r245360
33   "_UNICODE",
44   "OSD_WINDOWS",
55   "USE_SDL=0",
6   "USE_QTDEBUG=0",
7   "USE_OPENGL=1",
8   "USE_DISPATCH_GL=1",
9   "DIRECTINPUT_VERSION=0x0800",
106   "main=utf8_main",
117   "_WIN32_WINNT=0x0501",
128}
trunk/src/osd/sdl/osdsdl.h
r245359r245360
3030   #define SDL13_COMBINE_RESIZE (0)
3131#endif
3232
33#if defined(NO_DEBUGGER)
34#define SDLMAME_HAS_DEBUGGER            (0)
35#else
36#define SDLMAME_HAS_DEBUGGER            (1)
37#endif
38
3933//============================================================
4034//  Defines
4135//============================================================
trunk/src/osd/sdl/sdlmain.c
r245359r245360
397397   MACRO_VERBOSE(LSB_FIRST);
398398   MACRO_VERBOSE(PTR64);
399399   MACRO_VERBOSE(MAME_DEBUG);
400   MACRO_VERBOSE(NO_DEBUGBER);
401400   MACRO_VERBOSE(BIGENDIAN);
402401   MACRO_VERBOSE(CPP_COMPILE);
403402   MACRO_VERBOSE(SYNC_IMPLEMENTATION);
r245359r245360
599598
600599   defines_verbose();
601600
602   if (!SDLMAME_HAS_DEBUGGER)
603      if (machine.debug_flags & DEBUG_FLAG_OSD_ENABLED)
604      {
605         osd_printf_error("sdlmame: -debug not supported on X11-less builds\n\n");
606         osd_exit();
607         exit(-1);
608      }
609
610601   osd_common_t::init_subsystems();
611602
612603   if (options().oslog())


Previous 199869 Revisions Next


© 1997-2024 The MAME Team