diff options
| author | 2025-04-20 02:36:58 +1000 | |
|---|---|---|
| committer | 2025-04-20 02:36:58 +1000 | |
| commit | 8c28d3ff7eb420452a8f3499d77b3957ca7edf58 (patch) | |
| tree | ddd98c2e08b9be0146a0f80d0d24bc4130acd6ea /scripts | |
| parent | b1d2a52ddd96375d0608fee4d666998d621679c6 (diff) | |
Cleaned up build scripts and compiling documentation:
* Made it a bit easier to cross-compile for x86-64 or i686 on an AArch64
Windows system.
* Choose the default native recompiler back-end based on predefined
macros rather than requiring the build scripts to set it.
* Don't require every target without a native recompiler to declare
this.
* Got rid of the code that was supposed to set -m32 or -m64 when
building GENie (it didn't work - it tried to use ARCHITECTURE before
setting it).
* Avoid relying on the unreliable PROCESSOR_ARCHITECTURE environment
variable.
* Got rid of stuff for versions of Xcode that are definitely no longer
supported.
* Got rid of workarounds for very old Linux distros.
* Use newer makefile syntax for if/else/if structures, comment some else
and endif statements for clarity.
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/genie.lua | 44 | ||||
| -rwxr-xr-x | scripts/src/3rdparty.lua | 18 | ||||
| -rw-r--r-- | scripts/src/cpu.lua | 10 | ||||
| -rw-r--r-- | scripts/toolchain.lua | 5 |
4 files changed, 9 insertions, 68 deletions
diff --git a/scripts/genie.lua b/scripts/genie.lua index fab53dafec1..9f6bcb3ce8e 100644 --- a/scripts/genie.lua +++ b/scripts/genie.lua @@ -158,16 +158,6 @@ newoption { } newoption { - trigger = "distro", - description = "Choose distribution", - allowed = { - { "generic", "generic" }, - { "debian-stable", "debian-stable" }, - { "ubuntu-intrepid", "ubuntu-intrepid" }, - }, -} - -newoption { trigger = "target", description = "Building target", } @@ -694,32 +684,18 @@ else } end -if _OPTIONS["NOASM"]=="1" then +if _OPTIONS["NOASM"] == "1" then defines { "MAME_NOASM" } end -if not _OPTIONS["FORCE_DRC_C_BACKEND"] then - if _OPTIONS["BIGENDIAN"]~="1" then - if (_OPTIONS["PLATFORM"]=="arm64") then - configuration { } - defines { - "NATIVE_DRC=drcbe_arm64", - } - else - configuration { "x64" } - defines { - "NATIVE_DRC=drcbe_x64", - } - configuration { "x32" } - defines { - "NATIVE_DRC=drcbe_x86", - } - configuration { } - end - end - +if _OPTIONS["FORCE_DRC_C_BACKEND"] then + configuration { } + defines { + "NATIVE_DRC=drcbe_c", + } +elseif (_OPTIONS["PLATFORM"] == "x86") or (_OPTIONS["PLATFORM"] == "arm64") then configuration { } defines { "ASMJIT_STATIC", @@ -1228,12 +1204,6 @@ configuration { "linux-*" } flags { "LinkSupportCircularDependencies", } - if _OPTIONS["distro"]=="debian-stable" then - defines - { - "NO_AFFINITY_NP", - } - end configuration { "freebsd or netbsd" } diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua index 3ea340dbd9e..c391cea657e 100755 --- a/scripts/src/3rdparty.lua +++ b/scripts/src/3rdparty.lua @@ -1602,14 +1602,6 @@ end end end - if _OPTIONS["targetos"]=="macosx" and _OPTIONS["gcc"]~=nil then - if string.find(_OPTIONS["gcc"], "clang") and (version < 80000) then - defines { - "TARGET_OS_OSX=1", - } - end - end - files { MAME_DIR .. "3rdparty/bgfx/src/bgfx.cpp", MAME_DIR .. "3rdparty/bgfx/src/debug_renderdoc.cpp", @@ -1954,7 +1946,7 @@ project "ymfm" -- asmjit library -------------------------------------------------- -if not _OPTIONS["FORCE_DRC_C_BACKEND"] then +if (not _OPTIONS["FORCE_DRC_C_BACKEND"]) and ((_OPTIONS["PLATFORM"] == "x86") or (_OPTIONS["PLATFORM"] == "arm64")) then project "asmjit" uuid "4539757c-6e99-4bae-b3d0-b342a7c49539" kind "StaticLib" @@ -1971,14 +1963,6 @@ project "asmjit" "ASMJIT_STATIC", } - if _OPTIONS["targetos"]=="macosx" and _OPTIONS["gcc"]~=nil then - if string.find(_OPTIONS["gcc"], "clang") and (version < 80000) then - defines { - "TARGET_OS_OSX=1", - } - end - end - files { MAME_DIR .. "3rdparty/asmjit/src/asmjit/a64.h", MAME_DIR .. "3rdparty/asmjit/src/asmjit/arm.h", diff --git a/scripts/src/cpu.lua b/scripts/src/cpu.lua index 37bee222d71..6e7a71ba0d5 100644 --- a/scripts/src/cpu.lua +++ b/scripts/src/cpu.lua @@ -41,7 +41,7 @@ if (CPU_INCLUDE_DRC) then MAME_DIR .. "src/devices/cpu/x86log.h", MAME_DIR .. "src/devices/cpu/drcumlsh.h", } - if not _OPTIONS["FORCE_DRC_C_BACKEND"] then + if (not _OPTIONS["FORCE_DRC_C_BACKEND"]) and ((_OPTIONS["PLATFORM"] == "x86") or (_OPTIONS["PLATFORM"] == "arm64")) then files { MAME_DIR .. "src/devices/cpu/drcbearm64.cpp", MAME_DIR .. "src/devices/cpu/drcbearm64.h", @@ -51,14 +51,6 @@ if (CPU_INCLUDE_DRC) then MAME_DIR .. "src/devices/cpu/drcbex86.h", } end - - if _OPTIONS["targetos"]=="macosx" and _OPTIONS["gcc"]~=nil then - if string.find(_OPTIONS["gcc"], "clang") and (str_to_version(_OPTIONS["gcc_version"]) < 80000) then - defines { - "TARGET_OS_OSX=1", - } - end - end end -------------------------------------------------- diff --git a/scripts/toolchain.lua b/scripts/toolchain.lua index 6ee4748b258..59e8bdb504a 100644 --- a/scripts/toolchain.lua +++ b/scripts/toolchain.lua @@ -141,11 +141,6 @@ function toolchain(_buildDir, _subDir) end if "linux-gcc" == _OPTIONS["gcc"] then - -- Force gcc-4.2 on ubuntu-intrepid - if _OPTIONS["distro"]=="ubuntu-intrepid" then - premake.gcc.cc = "@gcc -V 4.2" - premake.gcc.cxx = "@g++-4.2" - end premake.gcc.ar = "ar" location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-linux") end |
