Build/Features/guess-platform-code.lua
Reece dd109c82cb [+] Base64 utils
[+] Vala compiler support
[+] Improve guess-platform-code
[*] Clean up
2021-09-14 14:15:46 +01:00

107 lines
2.3 KiB
Lua

local feature = function()
local excludeFiles = function(name, noFiles)
if (not noFiles) then
excludes("**/*" .. name .. ".masm")
excludes("**/*" .. name .. ".*")
end
excludes("**/" .. name .. "/**")
end
if (not _G["win32"]) then
if (not _G["x86_64"]) then
excludeFiles "win64"
end
excludeFiles "win32"
end
if (not _G["win32"]) then
excludeFiles "windows"
end
if (not _G["xbox"]) then
excludeFiles "xbox"
end
if (not _G["uwp"]) then
excludeFiles "uwp"
end
if (not _G["win32"] and not _G["xbox"]) then
excludeFiles "nt"
end
if (not _G["android"]) then
excludeFiles "android"
end
if (_G["mac"]) then
excludeFiles "macos"
end
local isNotApple = not _G["mac"]
and not _G["ios"]
local isNotBsd = not _G["bsd"]
and not _G["ps4"]
and not _G["ps5"]
and isNotApple
if (not isNotBsd) then
excludeFiles "bsd"
end
if (isNotApple) then
excludeFiles "apple"
excludeFiles "xnu"
end
if (not _G["mac"]) then
excludeFiles "osx"
end
local isNotLinux = not _G["linux"]
and not _G["android"]
if (isNotBsd and isNotLinux) then
excludeFiles "unix"
end
if (isNotLinux) then
excludeFiles "linux"
end
if (not _G["x86_64"]) then
excludeFiles "x64"
excludeFiles "x86_64"
excludeFiles "amd64"
end
if (not _G["x86_32"]) then
excludes "**/x86/**"
excludes "**/x86/**.c"
excludes "**/x86/**.h"
excludes "**/x86/**.*pp"
excludes "**/x86/**.masm"
excludes "**/x86/**.inl"
excludes "**/x86/**.cpp"
excludes "**/*.x86.*pp"
excludeFiles "x86_32"
excludeFiles "intel"
end
if (not _G["arm"]) then
excludeFiles ("arm", true)
excludeFiles "aarch64"
excludeFiles "aarch"
end
excludeFiles "mips"
excludeFiles "mips64"
excludeFiles "amiga"
excludeFiles "powerpc"
excludeFiles "riscv"
end
return feature