From e756a66b14d60a6ced720da68c20622e3477acf9 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sat, 26 Dec 2015 15:56:13 +0100 Subject: qtdebugger as separate lib (nw) --- scripts/src/osd/sdl.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'scripts/src/osd/sdl.lua') diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua index 30c776490c5..8b437fd9336 100644 --- a/scripts/src/osd/sdl.lua +++ b/scripts/src/osd/sdl.lua @@ -307,6 +307,21 @@ elseif BASE_TARGETOS=="os2" then } end +project ("qtdbg_" .. _OPTIONS["osd"]) + uuid (os.uuid("qtdbg_" .. _OPTIONS["osd"])) + kind (LIBTYPE) + + dofile("sdl_cfg.lua") + includedirs { + MAME_DIR .. "src/emu", + MAME_DIR .. "src/devices", -- accessing imagedev from debugger + MAME_DIR .. "src/osd", + MAME_DIR .. "src/lib", + MAME_DIR .. "src/lib/util", + MAME_DIR .. "src/osd/modules/render", + MAME_DIR .. "3rdparty", + } + qtdebuggerbuild() project ("osd_" .. _OPTIONS["osd"]) targetsubdir(_OPTIONS["target"] .."_" .._OPTIONS["subtarget"]) -- cgit v1.2.3-70-g09d2 From 75e80ec4f653bb18b377c8a1d84a09f5d6d495c8 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sun, 27 Dec 2015 13:47:54 +0100 Subject: Fix QT5 build on linux by adding -fPIC --- scripts/src/osd/sdl.lua | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'scripts/src/osd/sdl.lua') diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua index 8b437fd9336..f07686a885e 100644 --- a/scripts/src/osd/sdl.lua +++ b/scripts/src/osd/sdl.lua @@ -321,6 +321,12 @@ project ("qtdbg_" .. _OPTIONS["osd"]) MAME_DIR .. "src/osd/modules/render", MAME_DIR .. "3rdparty", } + configuration { "linux-*" } + buildoptions { + "-fPIC", + } + configuration { } + qtdebuggerbuild() project ("osd_" .. _OPTIONS["osd"]) @@ -384,7 +390,7 @@ project ("osd_" .. _OPTIONS["osd"]) MAME_DIR .. "src/osd/modules/debugger/osx/registersview.mm", MAME_DIR .. "src/osd/modules/debugger/osx/registersview.h", MAME_DIR .. "src/osd/modules/debugger/osx/watchpointsview.mm", - MAME_DIR .. "src/osd/modules/debugger/osx/watchpointsview.h", + MAME_DIR .. "src/osd/modules/debugger/osx/watchpointsview.h", MAME_DIR .. "src/osd/modules/debugger/osx/debugosx.h", } if _OPTIONS["SDL_LIBVER"]=="sdl" then @@ -453,7 +459,7 @@ project ("ocore_" .. _OPTIONS["osd"]) MAME_DIR .. "src/osd/sdl/sdlsocket.cpp", MAME_DIR .. "src/osd/sdl/sdlos_" .. SDLOS_TARGETOS .. ".cpp", MAME_DIR .. "src/osd/modules/osdmodule.cpp", - MAME_DIR .. "src/osd/modules/osdmodule.h", + MAME_DIR .. "src/osd/modules/osdmodule.h", MAME_DIR .. "src/osd/modules/lib/osdlib_" .. SDLOS_TARGETOS .. ".cpp", MAME_DIR .. "src/osd/modules/lib/osdlib.h", MAME_DIR .. "src/osd/modules/sync/sync_" .. SYNC_IMPLEMENTATION .. ".cpp", @@ -488,9 +494,9 @@ if _OPTIONS["with-tools"] then kind "ConsoleApp" flags { - "Symbols", -- always include minimum symbols for executables + "Symbols", -- always include minimum symbols for executables } - + dofile("sdl_cfg.lua") includedirs { @@ -498,7 +504,7 @@ if _OPTIONS["with-tools"] then MAME_DIR .. "src/lib/util", } - if _OPTIONS["SEPARATE_BIN"]~="1" then + if _OPTIONS["SEPARATE_BIN"]~="1" then targetdir(MAME_DIR) end @@ -549,12 +555,12 @@ if _OPTIONS["targetos"] == "macosx" and _OPTIONS["with-tools"] then kind "ConsoleApp" flags { - "Symbols", -- always include minimum symbols for executables + "Symbols", -- always include minimum symbols for executables } dofile("sdl_cfg.lua") - if _OPTIONS["SEPARATE_BIN"]~="1" then + if _OPTIONS["SEPARATE_BIN"]~="1" then targetdir(MAME_DIR) end -- cgit v1.2.3-70-g09d2 From 433676b7a1f37281cb22a0c6116856beec236efb Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Mon, 4 Jan 2016 19:15:32 +0100 Subject: Fixed OSX compile --- scripts/src/3rdparty.lua | 99 ++++++++++++++++++++++++++---------------------- scripts/src/osd/sdl.lua | 7 +++- 2 files changed, 60 insertions(+), 46 deletions(-) (limited to 'scripts/src/osd/sdl.lua') diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua index 579d246bbe9..9280da85f66 100644 --- a/scripts/src/3rdparty.lua +++ b/scripts/src/3rdparty.lua @@ -37,7 +37,7 @@ end "/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration } configuration { } - + files { MAME_DIR .. "3rdparty/expat/lib/xmlparse.c", MAME_DIR .. "3rdparty/expat/lib/xmlrole.c", @@ -65,7 +65,7 @@ project "zlib" buildoptions { "-Wno-shift-negative-value", } - end + end end configuration { "vs*" } @@ -117,7 +117,7 @@ end -------------------------------------------------- -- SoftFloat library objects -------------------------------------------------- - + project "softfloat" uuid "04fbf89e-4761-4cf2-8a12-64500cf0c5c5" kind "StaticLib" @@ -139,7 +139,7 @@ if _OPTIONS["vs"]=="intel-15" then buildoptions { "/Qwd2557", -- remark #2557: comparison between signed and unsigned operands } -end +end configuration { } files { @@ -159,7 +159,7 @@ project "jpeg" configuration { "vs*" } buildoptions { - "/wd4100", -- warning C4100: 'xxx' : unreferenced formal parameter + "/wd4100", -- warning C4100: 'xxx' : unreferenced formal parameter "/wd4127", -- warning C4127: conditional expression is constant "/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data } @@ -167,7 +167,7 @@ if _OPTIONS["vs"]=="intel-15" then buildoptions { "/Qwd869", -- remark #869: parameter "xxx" was never referenced } -end +end configuration { } @@ -238,7 +238,7 @@ project "flac" buildoptions { "/wd4127", -- warning C4127: conditional expression is constant "/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data - "/wd4100", -- warning C4100: 'xxx' : unreferenced formal parameter + "/wd4100", -- warning C4100: 'xxx' : unreferenced formal parameter "/wd4702", -- warning C4702: unreachable code } if _OPTIONS["vs"]=="intel-15" then @@ -249,7 +249,7 @@ if _OPTIONS["vs"]=="intel-15" then "/Qwd188", -- error #188: enumerated type mixed with another type "/Qwd869", -- remark #869: parameter "xxx" was never referenced } -end +end configuration { "mingw-clang" } buildoptions { @@ -333,7 +333,7 @@ end "/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration "/wd4457", -- warning C4457: declaration of 'xxx' hides function parameter } - + configuration { } defines { "_7ZIP_PPMD_SUPPPORT", @@ -371,7 +371,7 @@ project "lua" kind "StaticLib" -- uncomment the options below to - -- compile using c++. Do the same + -- compile using c++. Do the same -- in lsqlite3. -- In addition comment out the "extern "C"" -- in lua.hpp and do the same in luaengine.c line 47 @@ -383,7 +383,7 @@ project "lua" buildoptions_c { "-Wno-bad-function-cast" } - + configuration { "vs*" } buildoptions { "/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data @@ -409,7 +409,7 @@ end "LUA_32BITS", } end - + configuration { } includedirs { @@ -460,7 +460,7 @@ end -------------------------------------------------- -- sqlite3 lua library objects -------------------------------------------------- - + project "lsqlite3" uuid "1d84edab-94cf-48fb-83ee-b75bc697660e" kind "StaticLib" @@ -504,7 +504,7 @@ project "jsoncpp" buildoptions { "/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration } - + configuration { } includedirs { @@ -515,7 +515,7 @@ project "jsoncpp" MAME_DIR .. "3rdparty/jsoncpp/src/lib_json/json_reader.cpp", MAME_DIR .. "3rdparty/jsoncpp/src/lib_json/json_value.cpp", MAME_DIR .. "3rdparty/jsoncpp/src/lib_json/json_writer.cpp", - + } -------------------------------------------------- @@ -546,14 +546,14 @@ end buildoptions { "/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration } - - + + configuration { "gmake" } buildoptions_c { "-Wno-bad-function-cast", "-Wno-undef", } - + local version = str_to_version(_OPTIONS["gcc_version"]) if _OPTIONS["gcc"]~=nil and not string.find(_OPTIONS["gcc"], "clang") then if (version >= 40800) then @@ -587,7 +587,7 @@ project "portmidi" MAME_DIR .. "3rdparty/portmidi/pm_common", MAME_DIR .. "3rdparty/portmidi/porttime", } - + configuration { "vs*" } buildoptions { "/wd4100", -- warning C4100: 'xxx' : unreferenced formal parameter @@ -608,7 +608,7 @@ end buildoptions { "/wd4456", -- warning C4456: declaration of 'xxx' hides previous local declaration } - + configuration { "linux*" } defines { "PMALSA=1", @@ -660,11 +660,11 @@ links { "portmidi", } end -end +end -------------------------------------------------- -- BGFX library objects -------------------------------------------------- - + if (USE_BGFX == 1) then project "bgfx" uuid "d3e7e119-35cf-4f4f-aba0-d3bdcd1b879a" @@ -675,7 +675,7 @@ project "bgfx" "/wd4324", -- warning C4324: 'xxx' : structure was padded due to __declspec(align()) "/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data "/wd4611", -- warning C4611: interaction between '_setjmp' and C++ object destruction is non-portable - "/wd4310", -- warning C4310: cast truncates constant value + "/wd4310", -- warning C4310: cast truncates constant value } if _OPTIONS["vs"]=="intel-15" then buildoptions { @@ -686,7 +686,7 @@ if _OPTIONS["vs"]=="intel-15" then end configuration { } - includedirs { + includedirs { MAME_DIR .. "3rdparty/bgfx/include", MAME_DIR .. "3rdparty/bgfx/3rdparty", MAME_DIR .. "3rdparty/bx/include", @@ -707,7 +707,7 @@ end includedirs { MAME_DIR .. "3rdparty/bx/include/compat/osx", } - + configuration { "freebsd" } includedirs { MAME_DIR .. "3rdparty/bx/include/compat/freebsd", @@ -719,11 +719,11 @@ end } configuration { "gmake" } - buildoptions { + buildoptions { "-Wno-uninitialized", "-Wno-unused-function", } - + configuration { } if _OPTIONS["targetos"]=="windows" then @@ -736,7 +736,16 @@ end } end end - + + if _OPTIONS["targetos"]=="macosx" then + local version = str_to_version(_OPTIONS["gcc_version"]) + if _OPTIONS["gcc"]~=nil and string.find(_OPTIONS["gcc"], "clang") then + buildoptions { + "-Wno-switch", + } + end + end + defines { "__STDC_LIMIT_MACROS", "__STDC_FORMAT_MACROS", @@ -793,7 +802,7 @@ project "portaudio" configuration { "vs*" } buildoptions { - "/wd4245", -- warning C4245: 'conversion' : conversion from 'type1' to 'type2', signed/unsigned mismatch + "/wd4245", -- warning C4245: 'conversion' : conversion from 'type1' to 'type2', signed/unsigned mismatch "/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data "/wd4100", -- warning C4100: 'xxx' : unreferenced formal parameter "/wd4389", -- warning C4389: 'operator' : signed/unsigned mismatch @@ -825,7 +834,7 @@ end "-Wno-unknown-pragmas", } - local version = str_to_version(_OPTIONS["gcc_version"]) + local version = str_to_version(_OPTIONS["gcc_version"]) if (_OPTIONS["gcc"]~=nil) then if string.find(_OPTIONS["gcc"], "clang") then buildoptions_c { @@ -850,7 +859,7 @@ end "/wd4204", -- warning C4204: nonstandard extension used : non-constant aggregate initializer "/wd4701", -- warning C4701: potentially uninitialized local variable 'xxx' used } - + configuration { } includedirs { @@ -876,13 +885,13 @@ end "PA_USE_DS=1", "PA_USE_WDMKS=1", "PA_USE_WMME=1", - } + } includedirs { MAME_DIR .. "3rdparty/portaudio/src/os/win", } - configuration { } - files { + configuration { } + files { MAME_DIR .. "3rdparty/portaudio/src/os/win/pa_win_util.c", MAME_DIR .. "3rdparty/portaudio/src/os/win/pa_win_waveformat.c", MAME_DIR .. "3rdparty/portaudio/src/os/win/pa_win_hostapis.c", @@ -894,47 +903,47 @@ end MAME_DIR .. "3rdparty/portaudio/src/common/pa_ringbuffer.c", MAME_DIR .. "3rdparty/portaudio/src/hostapi/wmme/pa_win_wmme.c", } - + end if _OPTIONS["targetos"]=="linux" then defines { "PA_USE_ALSA=1", "PA_USE_OSS=1", "HAVE_LINUX_SOUNDCARD_H", - } + } includedirs { MAME_DIR .. "3rdparty/portaudio/src/os/unix", } - files { + files { MAME_DIR .. "3rdparty/portaudio/src/os/unix/pa_unix_hostapis.c", MAME_DIR .. "3rdparty/portaudio/src/os/unix/pa_unix_util.c", MAME_DIR .. "3rdparty/portaudio/src/hostapi/alsa/pa_linux_alsa.c", MAME_DIR .. "3rdparty/portaudio/src/hostapi/oss/pa_unix_oss.c", - } + } end if _OPTIONS["targetos"]=="macosx" then defines { "PA_USE_COREAUDIO=1", - } + } includedirs { MAME_DIR .. "3rdparty/portaudio/src/os/unix", } - files { + files { MAME_DIR .. "3rdparty/portaudio/src/os/unix/pa_unix_hostapis.c", MAME_DIR .. "3rdparty/portaudio/src/os/unix/pa_unix_util.c", MAME_DIR .. "3rdparty/portaudio/src/hostapi/coreaudio/pa_mac_core.c", MAME_DIR .. "3rdparty/portaudio/src/hostapi/coreaudio/pa_mac_core_utilities.c", MAME_DIR .. "3rdparty/portaudio/src/hostapi/coreaudio/pa_mac_core_blocking.c", MAME_DIR .. "3rdparty/portaudio/src/common/pa_ringbuffer.c", - } + } end - + else links { "portaudio", } end - + -------------------------------------------------- -- GoogleTest library objects -------------------------------------------------- @@ -966,7 +975,7 @@ end includedirs { MAME_DIR .. "3rdparty/googletest/googletest/include", MAME_DIR .. "3rdparty/googletest/googletest", - } - files { + } + files { MAME_DIR .. "3rdparty/googletest/googletest/src/gtest-all.cc", } diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua index f07686a885e..3eba9fdeb3b 100644 --- a/scripts/src/osd/sdl.lua +++ b/scripts/src/osd/sdl.lua @@ -244,6 +244,11 @@ if BASE_TARGETOS=="unix" then links { "Cocoa.framework", } + linkoptions { + "-framework QuartzCore", + "-framework OpenGL", + "-weak_framework Metal", + } if _OPTIONS["MACOSX_USE_LIBSDL"]~="1" then linkoptions { "-F" .. _OPTIONS["SDL_FRAMEWORK_PATH"], @@ -326,7 +331,7 @@ project ("qtdbg_" .. _OPTIONS["osd"]) "-fPIC", } configuration { } - + qtdebuggerbuild() project ("osd_" .. _OPTIONS["osd"]) -- cgit v1.2.3-70-g09d2 From 2ec885b8b29ad290e065dd61bddd1d7a0ded58e4 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Tue, 5 Jan 2016 12:26:47 +1100 Subject: don't link metal pre El Capitan --- scripts/src/osd/sdl.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'scripts/src/osd/sdl.lua') diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua index 3eba9fdeb3b..6acb5a2d262 100644 --- a/scripts/src/osd/sdl.lua +++ b/scripts/src/osd/sdl.lua @@ -241,14 +241,20 @@ end if BASE_TARGETOS=="unix" then if _OPTIONS["targetos"]=="macosx" then + local os_version = str_to_version(backtick("sw_vers -productVersion")) + links { "Cocoa.framework", } linkoptions { "-framework QuartzCore", "-framework OpenGL", - "-weak_framework Metal", } + if os_version>=101100 then + linkoptions { + "-weak_framework Metal", + } + end if _OPTIONS["MACOSX_USE_LIBSDL"]~="1" then linkoptions { "-F" .. _OPTIONS["SDL_FRAMEWORK_PATH"], -- cgit v1.2.3-70-g09d2