diff options
author | 2015-03-28 06:57:07 +0100 | |
---|---|---|
committer | 2015-03-28 06:57:07 +0100 | |
commit | cf02c07fdabff8d685d0ba2ed7966ad6056ab1df (patch) | |
tree | db94db813fa4949b590dba4abdea5242bfab5020 /scripts | |
parent | ae98425a87c0950fd744331b26d4fbed86415256 (diff) | |
parent | 523b36f8bd3e32a5bcbf7038e41777145f1b9bdc (diff) |
Merge branch 'master' of https://github.com/mamedev/mame
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/genie.lua | 67 | ||||
-rw-r--r-- | scripts/src/main.lua | 22 | ||||
-rw-r--r-- | scripts/src/osd/osdmini.lua | 7 | ||||
-rw-r--r-- | scripts/src/osd/sdl.lua | 22 | ||||
-rw-r--r-- | scripts/src/osd/windows.lua | 13 | ||||
-rw-r--r-- | scripts/toolchain.lua | 114 |
6 files changed, 127 insertions, 118 deletions
diff --git a/scripts/genie.lua b/scripts/genie.lua index 635ccafa5f5..c179e5b5392 100644 --- a/scripts/genie.lua +++ b/scripts/genie.lua @@ -5,21 +5,6 @@ local MAME_BUILD_DIR = (MAME_DIR .. "build/") local naclToolchain = "" -function includeosd() - includedirs { - MAME_DIR .. "src/osd", - } - if _OPTIONS["osd"]=="windows" then - includedirs { - MAME_DIR .. "src/osd/windows", - } - else - includedirs { - MAME_DIR .. "src/osd/sdl", - } - end -end - function str_to_version (str) local val = 0 if (str == nil or str == '') then @@ -277,16 +262,6 @@ configuration { } dofile ("toolchain.lua") -if _OPTIONS["osd"]=="windows" then - forcedincludes { - MAME_DIR .. "src/osd/windows/winprefix.h" - } -elseif _OPTIONS["osd"]=="sdl" then - forcedincludes { - MAME_DIR .. "src/osd/sdl/sdlprefix.h" - } -end - if _OPTIONS["targetos"]=="windows" then configuration { "x64" } defines { @@ -608,12 +583,12 @@ end local subdir if (_OPTIONS["target"] == _OPTIONS["subtarget"]) then - subdir = _OPTIONS["target"] + subdir = _OPTIONS["osd"] .. "/" .. _OPTIONS["target"] else - subdir = _OPTIONS["target"] .. _OPTIONS["subtarget"] + subdir = _OPTIONS["osd"] .. "/" .. _OPTIONS["target"] .. _OPTIONS["subtarget"] end -if not toolchain(MAME_BUILD_DIR, subdir) then +if not toolchain(_OPTIONS["osd"], MAME_BUILD_DIR, subdir) then return -- no action specified end @@ -703,20 +678,16 @@ configuration { "mingw*" } "-static-libstdc++", "-municode", } - if _OPTIONS["osd"]=="sdl" then - linkoptions { - "-Wl,--allow-multiple-definition", - "-static" - } - links { - "opengl32", - "SDL2", - "Imm32", - "version", - "ole32", - "oleaut32", - } - end +if _OPTIONS["osd"]=="sdl" then + links { + "opengl32", + "SDL2", + "Imm32", + "version", + "ole32", + "oleaut32", + } +end links { "user32", "gdi32", @@ -871,17 +842,19 @@ configuration { "x64", "vs*" } configuration { } -group "libs" -dofile(path.join("src", "3rdparty.lua")) -dofile(path.join("src", "lib.lua")) -group "core" +group "libs" if (not os.isfile(path.join("src", "osd", _OPTIONS["osd"] .. ".lua"))) then error("Unsupported value '" .. _OPTIONS["osd"] .. "' for OSD") end - dofile(path.join("src", "osd", _OPTIONS["osd"] .. ".lua")) + +dofile(path.join("src", "3rdparty.lua")) +dofile(path.join("src", "lib.lua")) + +group "core" + dofile(path.join("src", "emu.lua")) emuProject(_OPTIONS["target"],_OPTIONS["subtarget"]) diff --git a/scripts/src/main.lua b/scripts/src/main.lua index f7030d7ca82..059d086c00a 100644 --- a/scripts/src/main.lua +++ b/scripts/src/main.lua @@ -5,7 +5,7 @@ function mainProject(_target, _subtarget) project (_target .. _subtarget) end uuid (os.uuid(_target .."_" .. _subtarget)) - kind "ConsoleApp" + kind "ConsoleApp" options { "ForceCPP", @@ -27,21 +27,15 @@ function mainProject(_target, _subtarget) "-sectcreate __TEXT __info_plist " .. GEN_DIR .. "/osd/sdl/" .. _OPTIONS["target"] .. "-Info.plist" } - configuration { "mingw*" } + configuration { "mingw*" or "vs*" } if _OPTIONS["osd"]=="sdl" then targetprefix "sdl" end targetextension ".exe" - - configuration { "vs*" } - if _OPTIONS["osd"]=="sdl" then - targetprefix "sdl" - end - targetextension ".exe" - + configuration { "asmjs" } targetextension ".bc" - + configuration { } targetdir(MAME_DIR) @@ -76,7 +70,7 @@ function mainProject(_target, _subtarget) "ocore_" .. _OPTIONS["osd"], } dofile("src/osd/" .. _OPTIONS["osd"] .. "_cfg.lua") - + includedirs { MAME_DIR .. "src/emu", MAME_DIR .. "src/mame", @@ -99,9 +93,9 @@ function mainProject(_target, _subtarget) rcfile, } else - files { - MAME_DIR .. "src/osd/windows/mame.rc", - } + files { + MAME_DIR .. "src/osd/windows/mame.rc", + } end end diff --git a/scripts/src/osd/osdmini.lua b/scripts/src/osd/osdmini.lua index c3db9d211c6..cd51f8cf1e6 100644 --- a/scripts/src/osd/osdmini.lua +++ b/scripts/src/osd/osdmini.lua @@ -1,3 +1,10 @@ +function includeosd() + includedirs { + MAME_DIR .. "src/osd", + } +end + + project ("osd_" .. _OPTIONS["osd"]) uuid (os.uuid("osd_" .. _OPTIONS["osd"])) kind "StaticLib" diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua index fb7eae99383..ff49229d470 100644 --- a/scripts/src/osd/sdl.lua +++ b/scripts/src/osd/sdl.lua @@ -1,3 +1,25 @@ +function includeosd() + includedirs { + MAME_DIR .. "src/osd", + MAME_DIR .. "src/osd/sdl", + } +end + + +forcedincludes { + MAME_DIR .. "src/osd/sdl/sdlprefix.h" +} + + +configuration { "mingw*" } + linkoptions { + "-Wl,--allow-multiple-definition", + "-static" + } + +configuration { } + + project ("osd_" .. _OPTIONS["osd"]) uuid (os.uuid("osd_" .. _OPTIONS["osd"])) kind "StaticLib" diff --git a/scripts/src/osd/windows.lua b/scripts/src/osd/windows.lua index 1cc64c2eae9..9a786632f6a 100644 --- a/scripts/src/osd/windows.lua +++ b/scripts/src/osd/windows.lua @@ -1,3 +1,16 @@ +function includeosd() + includedirs { + MAME_DIR .. "src/osd", + MAME_DIR .. "src/osd/windows", + } +end + + +forcedincludes { + MAME_DIR .. "src/osd/windows/winprefix.h" +} + + project ("osd_" .. _OPTIONS["osd"]) uuid (os.uuid("osd_" .. _OPTIONS["osd"])) kind "StaticLib" diff --git a/scripts/toolchain.lua b/scripts/toolchain.lua index 362cfa9ebb0..89024439f6d 100644 --- a/scripts/toolchain.lua +++ b/scripts/toolchain.lua @@ -60,7 +60,7 @@ newoption { description = "Set iOS target version (default: 8.0).", } -function toolchain(_buildDir, _subDir) +function toolchain(_osd, _buildDir, _subDir) location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION) @@ -352,37 +352,37 @@ function toolchain(_buildDir, _subDir) configuration { "x32", "vs*" } - targetdir (_buildDir .. "win32_" .. _ACTION .. "/bin") - objdir (_buildDir .. "win32_" .. _ACTION .. "/obj") + targetdir (_buildDir .. _osd .. "/win32_" .. _ACTION .. "/bin") + objdir (_buildDir .. _osd .. "/win32_" .. _ACTION .. "/obj") configuration { "x64", "vs*" } defines { "_WIN64" } - targetdir (_buildDir .. "win64_" .. _ACTION .. "/bin") - objdir (_buildDir .. "win64_" .. _ACTION .. "/obj") + targetdir (_buildDir .. _osd .. "/win64_" .. _ACTION .. "/bin") + objdir (_buildDir .. _osd .. "/win64_" .. _ACTION .. "/obj") configuration { "ARM", "vs*" } - targetdir (_buildDir .. "arm_" .. _ACTION .. "/bin") - objdir (_buildDir .. "arm_" .. _ACTION .. "/obj") + targetdir (_buildDir .. _osd .. "/arm_" .. _ACTION .. "/bin") + objdir (_buildDir .. _osd .. "/arm_" .. _ACTION .. "/obj") configuration { "x32", "vs*-clang" } - targetdir (_buildDir .. "win32_" .. _ACTION .. "-clang/bin") - objdir (_buildDir .. "win32_" .. _ACTION .. "-clang/obj") + targetdir (_buildDir .. _osd .. "/win32_" .. _ACTION .. "-clang/bin") + objdir (_buildDir .. _osd .. "/win32_" .. _ACTION .. "-clang/obj") configuration { "x64", "vs*-clang" } - targetdir (_buildDir .. "win64_" .. _ACTION .. "-clang/bin") - objdir (_buildDir .. "win64_" .. _ACTION .. "-clang/obj") + targetdir (_buildDir .. _osd .. "/win64_" .. _ACTION .. "-clang/bin") + objdir (_buildDir .. _osd .. "/win64_" .. _ACTION .. "-clang/obj") configuration { "mingw*" } defines { "WIN32" } configuration { "x32", "mingw32-gcc" } - targetdir (_buildDir .. "win32_mingw-gcc" .. "/bin") - objdir (_buildDir .. "win32_mingw-gcc" .. "/obj") + targetdir (_buildDir .. _osd .. "/win32_mingw-gcc" .. "/bin") + objdir (_buildDir .. _osd .. "/win32_mingw-gcc" .. "/obj") buildoptions { "-m32" } configuration { "x64", "mingw64-gcc" } - targetdir (_buildDir .. "win64_mingw-gcc" .. "/bin") - objdir (_buildDir .. "win64_mingw-gcc" .. "/obj") + targetdir (_buildDir .. _osd .. "/win64_mingw-gcc" .. "/bin") + objdir (_buildDir .. _osd .. "/win64_mingw-gcc" .. "/obj") buildoptions { "-m64" } configuration { "mingw-clang" } @@ -392,8 +392,8 @@ function toolchain(_buildDir, _subDir) } configuration { "x32", "mingw-clang" } - targetdir (_buildDir .. "win32_mingw-clang/bin") - objdir ( _buildDir .. "win32_mingw-clang/obj") + targetdir (_buildDir .. _osd .. "/win32_mingw-clang/bin") + objdir ( _buildDir .. _osd .. "/win32_mingw-clang/obj") buildoptions { "-m32" } buildoptions { "-isystem$(MINGW32)/i686-w64-mingw32/include/c++", @@ -402,8 +402,8 @@ function toolchain(_buildDir, _subDir) } configuration { "x64", "mingw-clang" } - targetdir (_buildDir .. "win64_mingw-clang/bin") - objdir (_buildDir .. "win64_mingw-clang/obj") + targetdir (_buildDir .. _osd .. "/win64_mingw-clang/bin") + objdir (_buildDir .. _osd .. "/win64_mingw-clang/obj") buildoptions { "-m64" } buildoptions { "-isystem$(MINGW64)/x86_64-w64-mingw32/include/c++", @@ -412,29 +412,29 @@ function toolchain(_buildDir, _subDir) } configuration { "linux-gcc", "x32" } - targetdir (_buildDir .. "linux32_gcc" .. "/bin") - objdir (_buildDir .. "linux32_gcc" .. "/obj") + targetdir (_buildDir .. _osd .. "/linux32_gcc" .. "/bin") + objdir (_buildDir .. _osd .. "/linux32_gcc" .. "/obj") buildoptions { "-m32", } configuration { "linux-gcc", "x64" } - targetdir (_buildDir .. "linux64_gcc" .. "/bin") - objdir (_buildDir .. "linux64_gcc" .. "/obj") + targetdir (_buildDir .. _osd .. "/linux64_gcc" .. "/bin") + objdir (_buildDir .. _osd .. "/linux64_gcc" .. "/obj") buildoptions { "-m64", } configuration { "linux-clang", "x32" } - targetdir (_buildDir .. "linux32_clang" .. "/bin") - objdir (_buildDir .. "linux32_clang" .. "/obj") + targetdir (_buildDir .. _osd .. "/linux32_clang" .. "/bin") + objdir (_buildDir .. _osd .. "/linux32_clang" .. "/obj") buildoptions { "-m32", } configuration { "linux-clang", "x64" } - targetdir (_buildDir .. "linux64_clang" .. "/bin") - objdir (_buildDir .. "linux64_clang" .. "/obj") + targetdir (_buildDir .. _osd .. "/linux64_clang" .. "/bin") + objdir (_buildDir .. _osd .. "/linux64_clang" .. "/obj") buildoptions { "-m64", } @@ -481,8 +481,8 @@ function toolchain(_buildDir, _subDir) configuration { "android-arm" } - targetdir (_buildDir .. "android-arm" .. "/bin") - objdir (_buildDir .. "android-arm" .. "/obj") + targetdir (_buildDir .. _osd .. "/android-arm" .. "/bin") + objdir (_buildDir .. _osd .. "/android-arm" .. "/obj") libdirs { "$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a", } @@ -507,8 +507,8 @@ function toolchain(_buildDir, _subDir) } configuration { "android-mips" } - targetdir (_buildDir .. "android-mips" .. "/bin") - objdir (_buildDir .. "android-mips" .. "/obj") + targetdir (_buildDir .. _osd .. "/android-mips" .. "/bin") + objdir (_buildDir .. _osd .. "/android-mips" .. "/obj") libdirs { "$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/mips", } @@ -527,8 +527,8 @@ function toolchain(_buildDir, _subDir) } configuration { "android-x86" } - targetdir (_buildDir .. "android-x86" .. "/bin") - objdir (_buildDir .. "android-x86" .. "/obj") + targetdir (_buildDir .. _osd .. "/android-x86" .. "/bin") + objdir (_buildDir .. _osd .. "/android-x86" .. "/obj") libdirs { "$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/x86", } @@ -553,8 +553,8 @@ function toolchain(_buildDir, _subDir) configuration { "asmjs" } - targetdir (_buildDir .. "asmjs" .. "/bin") - objdir (_buildDir .. "asmjs" .. "/obj") + targetdir (_buildDir .. _osd .. "/asmjs" .. "/bin") + objdir (_buildDir .. _osd .. "/asmjs" .. "/obj") buildoptions { "-isystem$(EMSCRIPTEN)/system/include", "-isystem$(EMSCRIPTEN)/system/include/compat", @@ -571,8 +571,8 @@ function toolchain(_buildDir, _subDir) } configuration { "freebsd" } - targetdir (_buildDir .. "freebsd" .. "/bin") - objdir (_buildDir .. "freebsd" .. "/obj") + targetdir (_buildDir .. _osd .. "/freebsd" .. "/bin") + objdir (_buildDir .. _osd .. "/freebsd" .. "/obj") configuration { "nacl or nacl-arm or pnacl" } buildoptions { @@ -600,8 +600,8 @@ function toolchain(_buildDir, _subDir) } configuration { "x32", "nacl" } - targetdir (_buildDir .. "nacl-x86" .. "/bin") - objdir (_buildDir .. "nacl-x86" .. "/obj") + targetdir (_buildDir .. _osd .. "/nacl-x86" .. "/bin") + objdir (_buildDir .. _osd .. "/nacl-x86" .. "/obj") configuration { "x32", "nacl", "Debug" } libdirs { "$(NACL_SDK_ROOT)/lib/newlib_x86_32/Debug" } @@ -610,8 +610,8 @@ function toolchain(_buildDir, _subDir) libdirs { "$(NACL_SDK_ROOT)/lib/newlib_x86_32/Release" } configuration { "x64", "nacl" } - targetdir (_buildDir .. "nacl-x64" .. "/bin") - objdir (_buildDir .. "nacl-x64" .. "/obj") + targetdir (_buildDir .. _osd .. "/nacl-x64" .. "/bin") + objdir (_buildDir .. _osd .. "/nacl-x64" .. "/obj") configuration { "x64", "nacl", "Debug" } libdirs { "$(NACL_SDK_ROOT)/lib/newlib_x86_64/Debug" } @@ -620,8 +620,8 @@ function toolchain(_buildDir, _subDir) libdirs { "$(NACL_SDK_ROOT)/lib/newlib_x86_64/Release" } configuration { "nacl-arm" } - targetdir (_buildDir .. "nacl-arm" .. "/bin") - objdir (_buildDir .. "nacl-arm" .. "/obj") + targetdir (_buildDir .. _osd .. "/nacl-arm" .. "/bin") + objdir (_buildDir .. _osd .. "/nacl-arm" .. "/obj") configuration { "nacl-arm", "Debug" } libdirs { "$(NACL_SDK_ROOT)/lib/newlib_arm/Debug" } @@ -630,8 +630,8 @@ function toolchain(_buildDir, _subDir) libdirs { "$(NACL_SDK_ROOT)/lib/newlib_arm/Release" } configuration { "pnacl" } - targetdir (_buildDir .. "pnacl" .. "/bin") - objdir (_buildDir .. "pnacl" .. "/obj") + targetdir (_buildDir .. _osd .. "/pnacl" .. "/bin") + objdir (_buildDir .. _osd .. "/pnacl" .. "/obj") configuration { "pnacl", "Debug" } libdirs { "$(NACL_SDK_ROOT)/lib/pnacl/Debug" } @@ -640,34 +640,34 @@ function toolchain(_buildDir, _subDir) libdirs { "$(NACL_SDK_ROOT)/lib/pnacl/Release" } configuration { "osx*", "x32" } - targetdir (_buildDir .. "osx32_clang" .. "/bin") - objdir (_buildDir .. "osx32_clang" .. "/obj") + targetdir (_buildDir .. _osd .. "/osx32_clang" .. "/bin") + objdir (_buildDir .. _osd .. "/osx32_clang" .. "/obj") buildoptions { "-m32", } configuration { "osx*", "x64" } - targetdir (_buildDir .. "osx64_clang" .. "/bin") - objdir (_buildDir .. "osx64_clang" .. "/obj") + targetdir (_buildDir .. _osd .. "/osx64_clang" .. "/bin") + objdir (_buildDir .. _osd .. "/osx64_clang" .. "/obj") buildoptions { "-m64", } configuration { "ios-arm" } - targetdir (_buildDir .. "ios-arm" .. "/bin") - objdir (_buildDir .. "ios-arm" .. "/obj") + targetdir (_buildDir .. _osd .. "/ios-arm" .. "/bin") + objdir (_buildDir .. _osd .. "/ios-arm" .. "/obj") configuration { "ios-simulator" } - targetdir (_buildDir .. "ios-simulator" .. "/bin") - objdir (_buildDir .. "ios-simulator" .. "/obj") + targetdir (_buildDir .. _osd .. "/ios-simulator" .. "/bin") + objdir (_buildDir .. _osd .. "/ios-simulator" .. "/obj") configuration { "qnx-arm" } - targetdir (_buildDir .. "qnx-arm" .. "/bin") - objdir (_buildDir .. "qnx-arm" .. "/obj") + targetdir (_buildDir .. _osd .. "/qnx-arm" .. "/bin") + objdir (_buildDir .. _osd .. "/qnx-arm" .. "/obj") configuration { "rpi" } - targetdir (_buildDir .. "rpi" .. "/bin") - objdir (_buildDir .. "rpi" .. "/obj") + targetdir (_buildDir .. _osd .. "/rpi" .. "/bin") + objdir (_buildDir .. _osd .. "/rpi" .. "/obj") configuration {} -- reset configuration |