Build/Features/guess-platform-code.lua
Reece 100644b0de [+] Static dependencies no longer link agasint things they shouldn't
[+] Nonstatic entities
[+] Build order is not perserved anymore for UX. Namespaces are ordered more neatly now
[*] Bug fixes in platform guess and remove code
2021-06-18 00:58:12 +01:00

73 lines
1.6 KiB
Lua

local feature = function()
local readdPattern = function(pattern)
files (getProjectInfo(getCurrentProjectName()).path .. "/" .. pattern)
end
local readd = function(name)
readdPattern("**/*" .. name .. ".cc")
readdPattern("**/*" .. name .. ".c")
readdPattern("**/*" .. name .. ".h")
readdPattern("**/*" .. name .. ".*pp")
readdPattern("**/*" .. name .. ".masm")
readdPattern("**/*" .. name .. ".inl")
end
if (_G["win32"]) then
if (_G["x86_64"]) then
readd "win64"
end
readd "win32"
readd "windows"
end
if (_G["linux"]) then
readd "linux"
readd "unix"
end
if (_G["android"]) then
readd "linux"
readd "android"
readd "unix"
end
if (_G["mac"]) then
readd "macos"
readd "mac"
readd "apple"
readd "unix"
end
if (_G["ios"]) then
readd "apple"
readd "ios"
end
if (_G["x86_64"]) then
readd "x64"
readd "x86_64"
readd "amd64"
end
if (_G["x86_32"]) then
readdPattern "**/x86/**"
readdPattern "**/x86/**.c"
readdPattern "**/x86/**.h"
readdPattern "**/x86/**.*pp"
readdPattern "**/x86/**.masm"
readdPattern "**/x86/**.inl"
readdPattern "**/x86/**.cpp"
readdPattern "**/*.x86.*pp"
readd "x86_32"
readd "intel"
end
if (_G["arm"]) then
readd "arm"
readd "aarch64"
readd "aarch"
end
end
return feature