diff options
Diffstat (limited to 'scripts/src')
-rw-r--r-- | scripts/src/main.lua | 36 | ||||
-rw-r--r-- | scripts/src/osd/osdmini.lua | 5 | ||||
-rw-r--r-- | scripts/src/osd/sdl.lua | 35 | ||||
-rw-r--r-- | scripts/src/osd/sdl_cfg.lua | 25 | ||||
-rw-r--r-- | scripts/src/osd/windows.lua | 42 | ||||
-rw-r--r-- | scripts/src/osd/windows_cfg.lua | 8 |
6 files changed, 60 insertions, 91 deletions
diff --git a/scripts/src/main.lua b/scripts/src/main.lua index c000fce0443..08b5112ad73 100644 --- a/scripts/src/main.lua +++ b/scripts/src/main.lua @@ -22,15 +22,7 @@ function mainProject(_target, _subtarget) } end - configuration { "osx*" } - linkoptions { - "-sectcreate __TEXT __info_plist " .. GEN_DIR .. "/osd/sdl/" .. _OPTIONS["target"] .. "-Info.plist" - } - configuration { "mingw*" or "vs*" } - if _OPTIONS["osd"]=="sdl" then - targetprefix "sdl" - end targetextension ".exe" configuration { "asmjs" } @@ -69,34 +61,28 @@ function mainProject(_target, _subtarget) links{ "ocore_" .. _OPTIONS["osd"], } - dofile("src/osd/" .. _OPTIONS["osd"] .. "_cfg.lua") + maintargetosdoptions(_target) includedirs { MAME_DIR .. "src/emu", - MAME_DIR .. "src/mame", + MAME_DIR .. "src/" .. _target, MAME_DIR .. "src/lib", MAME_DIR .. "src/lib/util", MAME_DIR .. "3rdparty", MAME_DIR .. "3rdparty/zlib", - GEN_DIR .. "mame/layout", - GEN_DIR .. "ldplayer/layout", - GEN_DIR .. "osd/windows", + GEN_DIR .. _target .. "/layout", + GEN_DIR .. "resource", } includeosd() - if _OPTIONS["osd"]=="windows" then - local rcfile = MAME_DIR .. "src/" .. _target .. "/osd/windows/" .. _target ..".rc" - - if os.isfile(rcfile) then - files { - rcfile, - } - else - files { - MAME_DIR .. "src/osd/windows/mame.rc", - } - end + 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 { diff --git a/scripts/src/osd/osdmini.lua b/scripts/src/osd/osdmini.lua index 2a0dbb5298f..652ecda2124 100644 --- a/scripts/src/osd/osdmini.lua +++ b/scripts/src/osd/osdmini.lua @@ -1,7 +1,4 @@ -function includeosd() - includedirs { - MAME_DIR .. "src/osd", - } +function maintargetosdoptions(_target) end diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua index bbecc872cef..b45d1daee26 100644 --- a/scripts/src/osd/sdl.lua +++ b/scripts/src/osd/sdl.lua @@ -1,15 +1,32 @@ -function includeosd() - includedirs { - MAME_DIR .. "src/osd", - MAME_DIR .. "src/osd/sdl", - } -end +function maintargetosdoptions(_target) + if _OPTIONS["targetos"]=="windows" then + linkoptions{ + "-L$(shell qmake -query QT_INSTALL_LIBS)", + } + links { + "qtmain", + "QtGui4", + "QtCore4", + } + end -forcedincludes { - MAME_DIR .. "src/osd/sdl/sdlprefix.h" -} + if _OPTIONS["targetos"]=="linux" then + links { + 'QtGui', + 'QtCore', + } + + linkoptions { + '$(shell pkg-config --libs QtGui)', + } + end + configuration { "mingw*" or "vs*" } + targetprefix "sdl" + + configuration { } +end configuration { "mingw*" } linkoptions { diff --git a/scripts/src/osd/sdl_cfg.lua b/scripts/src/osd/sdl_cfg.lua index 50c01ef8806..24a80ff7bbc 100644 --- a/scripts/src/osd/sdl_cfg.lua +++ b/scripts/src/osd/sdl_cfg.lua @@ -1,6 +1,6 @@ ---forcedincludes { --- MAME_DIR .. "src/osd/sdl/sdlprefix.h" ---} +forcedincludes { + MAME_DIR .. "src/osd/sdl/sdlprefix.h" +} if _OPTIONS["targetos"]=="windows" then defines { @@ -20,16 +20,6 @@ if _OPTIONS["targetos"]=="windows" then "-I$(shell qmake -query QT_INSTALL_HEADERS)/QtGui", "-I$(shell qmake -query QT_INSTALL_HEADERS)", } - - linkoptions{ - "-L$(shell qmake -query QT_INSTALL_LIBS)", - } - - links { - "qtmain", - "QtGui4", - "QtCore4", - } end if _OPTIONS["targetos"]=="linux" then @@ -52,15 +42,6 @@ if _OPTIONS["targetos"]=="linux" then buildoptions { '$(shell pkg-config --cflags QtGui)', } - - links { - 'QtGui', - 'QtCore', - } - - linkoptions { - '$(shell pkg-config --libs QtGui)', - } end if _OPTIONS["targetos"]=="macosx" then diff --git a/scripts/src/osd/windows.lua b/scripts/src/osd/windows.lua index f197a137cda..0b935635aab 100644 --- a/scripts/src/osd/windows.lua +++ b/scripts/src/osd/windows.lua @@ -1,16 +1,18 @@ -function includeosd() - includedirs { - MAME_DIR .. "src/osd", - MAME_DIR .. "src/osd/windows", - } +function maintargetosdoptions(_target) + local rcfile = MAME_DIR .. "src/" .. _target .. "/osd/windows/" .. _target ..".rc" + + if os.isfile(rcfile) then + files { + rcfile, + } + else + files { + MAME_DIR .. "src/osd/windows/mame.rc", + } + end end -forcedincludes { - MAME_DIR .. "src/osd/windows/winprefix.h" -} - - project ("osd_" .. _OPTIONS["osd"]) uuid (os.uuid("osd_" .. _OPTIONS["osd"])) kind "StaticLib" @@ -116,23 +118,9 @@ project ("ocore_" .. _OPTIONS["osd"]) MAME_DIR .. "src/lib/util", } - --if _OPTIONS["targetos"]=="linux" then - -- BASE_TARGETOS = "unix" - -- SDLOS_TARGETOS = "unix" - -- SYNC_IMPLEMENTATION = "tc" - --end - - --if _OPTIONS["targetos"]=="windows" then - BASE_TARGETOS = "win32" - SDLOS_TARGETOS = "win32" - SYNC_IMPLEMENTATION = "windows" - --end - - --if _OPTIONS["targetos"]=="macosx" then - -- BASE_TARGETOS = "unix" - -- SDLOS_TARGETOS = "macosx" - -- SYNC_IMPLEMENTATION = "ntc" - --end + BASE_TARGETOS = "win32" + SDLOS_TARGETOS = "win32" + SYNC_IMPLEMENTATION = "windows" includedirs { MAME_DIR .. "src/osd/windows", diff --git a/scripts/src/osd/windows_cfg.lua b/scripts/src/osd/windows_cfg.lua index 7644c13164b..667a4dcf383 100644 --- a/scripts/src/osd/windows_cfg.lua +++ b/scripts/src/osd/windows_cfg.lua @@ -1,7 +1,10 @@ +forcedincludes { + MAME_DIR .. "src/osd/windows/winprefix.h" +} + defines { "UNICODE", "_UNICODE", - "X64_WINDOWS_ABI", "OSD_WINDOWS", "USE_SDL=0", "USE_QTDEBUG=0", @@ -9,6 +12,3 @@ defines { "USE_DISPATCH_GL=1", "DIRECTINPUT_VERSION=0x0800" } ---forcedincludes { --- MAME_DIR .. "src/osd/windows/winprefix.h" ---} |