forked from 0ad/0ad
Attempt to make build system's CPU architecture detection slightly less broken
This was SVN commit r7458.
This commit is contained in:
parent
d6ab843f9d
commit
701fcc18a6
@ -12,7 +12,7 @@ use_dcdt = false -- disable it since it's a non-Free library
|
||||
dofile("functions.lua")
|
||||
dofile("extern_libs.lua")
|
||||
|
||||
-- detect CPU architecture (simplistic, currently only supports x86 and amd64
|
||||
-- detect CPU architecture (simplistic, currently only supports x86 and amd64)
|
||||
arch = "x86"
|
||||
if OS == "windows" then
|
||||
if os.getenv("PROCESSOR_ARCHITECTURE") == "amd64" or os.getenv("PROCESSOR_ARCHITEW6432") == "amd64" then
|
||||
@ -22,8 +22,7 @@ else
|
||||
arch = os.getenv("HOSTTYPE")
|
||||
if arch == "x86_64" then
|
||||
arch = "amd64"
|
||||
end
|
||||
if not arch then
|
||||
else
|
||||
os.execute("gcc -dumpmachine > .gccmachine.tmp")
|
||||
local f = io.open(".gccmachine.tmp", "r")
|
||||
local machine = f:read("*line")
|
||||
|
@ -25,4 +25,7 @@ make -C src || die "Premake build failed"
|
||||
|
||||
echo
|
||||
|
||||
# If we're in bash then make HOSTTYPE available to Premake, for primitive arch-detection
|
||||
export HOSTTYPE="$HOSTTYPE"
|
||||
|
||||
src/bin/premake --outpath ../workspaces/gcc --atlas --collada "$@" --target gnu || die "Premake failed"
|
||||
|
Loading…
Reference in New Issue
Block a user