diff options
author | 2015-04-01 16:11:48 +1100 | |
---|---|---|
committer | 2015-04-01 16:12:03 +1100 | |
commit | 19d52cef70b0ef0c373ddb8c49cefd179d309f37 (patch) | |
tree | 08bcd31f5ca3705aaa0141c2ac728f06e09be84f /scripts | |
parent | 2bd0eb2b0d39b7980750dbad0df400bad394762e (diff) |
Bring back NOASM
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/genie.lua | 160 | ||||
-rw-r--r-- | scripts/src/osd/sdl.lua | 14 | ||||
-rw-r--r-- | scripts/src/osd/windows.lua | 11 |
3 files changed, 115 insertions, 70 deletions
diff --git a/scripts/genie.lua b/scripts/genie.lua index 5ebbdd18873..dfcb17d08a7 100644 --- a/scripts/genie.lua +++ b/scripts/genie.lua @@ -164,6 +164,15 @@ newoption { } newoption { + trigger = "NOASM", + description = "Disable implementations based on assembler code", + allowed = { + { "0", "Enable assembler code" }, + { "1", "Disable assembler code" }, + }, +} + +newoption { trigger = "FORCE_DRC_C_BACKEND", description = "Force DRC C backend.", } @@ -180,10 +189,22 @@ newoption { { "0", "Disabled" }, { "1", "Enabled" }, } -} +} local os_version = str_to_version(_OPTIONS["os_version"]) +if not _OPTIONS["NOASM"] then + if _OPTIONS["targetos"]=="emscripten" then + _OPTIONS["NOASM"] = "1" + else + _OPTIONS["NOASM"] = "0" + end +end + +if _OPTIONS["NOASM"]=="1" and not _OPTIONS["FORCE_DRC_C_BACKEND"] then + _OPTIONS["FORCE_DRC_C_BACKEND"] = "1" +end + USE_BGFX = 1 if (_OPTIONS["targetos"]=="macosx" and os_version < 100700) then USE_BGFX = 0 @@ -201,42 +222,44 @@ if (_OPTIONS["target"] == _OPTIONS["subtarget"]) then solution (_OPTIONS["target"]) else solution (_OPTIONS["target"] .. _OPTIONS["subtarget"]) -end - configurations { - "Debug", - "Release", - } +end - platforms { - "x32", - "x64", - "Native", -- for targets where bitness is not specified - } +configurations { + "Debug", + "Release", +} - language "C++" +platforms { + "x32", + "x64", + "Native", -- for targets where bitness is not specified +} - flags { - "StaticRuntime", - "Unicode", - "NoPCH", - } - - configuration { "vs*" } +language "C++" + +flags { + "StaticRuntime", + "Unicode", + "NoPCH", +} + +configuration { "vs*" } flags { "ExtraWarnings", } - if _OPTIONS["NOWERROR"]==nil then - flags{ - "FatalWarnings", - } + if not _OPTIONS["NOWERROR"] then + flags{ + "FatalWarnings", + } end - configuration { "Debug", "vs*" } - flags { - "Symbols", - } - configuration {} +configuration { "Debug", "vs*" } + flags { + "Symbols", + } + +configuration {} --aftercompilefile ("\t$(SILENT) gawk -f ../../../../../scripts/depfilter.awk $(@:%.o=%.d) > $(@:%.o=%.dep)\n\t$(SILENT) mv $(@:%.o=%.dep) $(@:%.o=%.d)") @@ -305,11 +328,11 @@ dofile ("toolchain.lua") if _OPTIONS["targetos"]=="windows" then -configuration { "x64" } - defines { - "X64_WINDOWS_ABI", - } -configuration { } + configuration { "x64" } + defines { + "X64_WINDOWS_ABI", + } + configuration { } end -- Avoid error when invoking genie --help. @@ -349,46 +372,53 @@ configuration { "Release" } } configuration { } - -- CR/LF setup: use both on win32/os2, CR only on everything else - if _OPTIONS["targetos"]=="windows" or _OPTIONS["targetos"]=="os2" then - defines { - "CRLF=3", - } - else - defines { - "CRLF=2", - } - end +-- CR/LF setup: use both on win32/os2, CR only on everything else +if _OPTIONS["targetos"]=="windows" or _OPTIONS["targetos"]=="os2" then + defines { + "CRLF=3", + } +else + defines { + "CRLF=2", + } +end + + +-- define LSB_FIRST if we are a little-endian target +defines { + "LSB_FIRST", +} - -- define LSB_FIRST if we are a little-endian target +-- define USE_NETWORK if networking is enabled (not OS/2 and hasn't been disabled) +if not _OPTIONS["targetos"]=="os2" then defines { - "LSB_FIRST", + "USE_NETWORK", } +end +-- need to ensure FLAC functions are statically linked +defines { + "FLAC__NO_DLL", +} - -- define USE_NETWORK if networking is enabled (not OS/2 and hasn't been disabled) - if not _OPTIONS["targetos"]=="os2" then - defines { - "USE_NETWORK", - } - end - -- need to ensure FLAC functions are statically linked +if _OPTIONS["NOASM"]=="1" then defines { - "FLAC__NO_DLL", + "MAME_NOASM" } +end - -- fixme -- need to make this work for other target architectures (PPC) - if _OPTIONS["FORCE_DRC_C_BACKEND"]==nil then - configuration { "x64" } - defines { - "NATIVE_DRC=drcbe_x64", - } - configuration { "x32" } - defines { - "NATIVE_DRC=drcbe_x86", - } - configuration { } - end +-- fixme -- need to make this work for other target architectures (PPC) +if not _OPTIONS["FORCE_DRC_C_BACKEND"] then + configuration { "x64" } + defines { + "NATIVE_DRC=drcbe_x64", + } + configuration { "x32" } + defines { + "NATIVE_DRC=drcbe_x86", + } + configuration { } +end -- define USE_SYSTEM_JPEGLIB if library shipped with MAME is not used --ifneq ($(BUILD_JPEGLIB),1) diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua index 732442d70b9..96b171c0192 100644 --- a/scripts/src/osd/sdl.lua +++ b/scripts/src/osd/sdl.lua @@ -382,12 +382,18 @@ project ("ocore_" .. _OPTIONS["osd"]) MAME_DIR .. "src/osd/modules/osdmodule.c", MAME_DIR .. "src/osd/modules/lib/osdlib_" .. SDLOS_TARGETOS .. ".c", MAME_DIR .. "src/osd/modules/sync/sync_" .. SYNC_IMPLEMENTATION .. ".c", - --ifdef NOASM - --MAME_DIR .. "src/osd/modules/sync/work_mini.c", - --else - MAME_DIR .. "src/osd/modules/sync/work_osd.c", } + if _OPTIONS["NOASM"]=="1" then + files { + MAME_DIR .. "src/osd/modules/sync/work_mini.c", + } + else + files { + MAME_DIR .. "src/osd/modules/sync/work_osd.c", + } + end + if _OPTIONS["targetos"]=="macosx" then files { MAME_DIR .. "src/osd/sdl/osxutils.m", diff --git a/scripts/src/osd/windows.lua b/scripts/src/osd/windows.lua index 03d3948dd4f..8774c848eec 100644 --- a/scripts/src/osd/windows.lua +++ b/scripts/src/osd/windows.lua @@ -150,10 +150,19 @@ project ("ocore_" .. _OPTIONS["osd"]) MAME_DIR .. "src/osd/windows/winsocket.c", MAME_DIR .. "src/osd/windows/winptty.c", MAME_DIR .. "src/osd/modules/osdmodule.c", - MAME_DIR .. "src/osd/modules/sync/work_osd.c", MAME_DIR .. "src/osd/modules/lib/osdlib_win32.c", } + if _OPTIONS["NOASM"]=="1" then + files { + MAME_DIR .. "src/osd/modules/sync/work_mini.c", + } + else + files { + MAME_DIR .. "src/osd/modules/sync/work_osd.c", + } + end + -------------------------------------------------- -- ledutil |