mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-02-26 19:54:14 +01:00
Move .x64 build folder suffix logic to main AMBuildScript.
This commit is contained in:
parent
71e6db5400
commit
e37083888e
@ -96,6 +96,10 @@ def SetArchFlags(compiler, arch, platform):
|
|||||||
elif builder.target.arch == 'x86_64':
|
elif builder.target.arch == 'x86_64':
|
||||||
compiler.linkflags += ['/MACHINE:X64']
|
compiler.linkflags += ['/MACHINE:X64']
|
||||||
|
|
||||||
|
def AppendArchSuffix(binary, name, arch):
|
||||||
|
if arch == 'x86_64':
|
||||||
|
binary.localFolder = name + '.x64'
|
||||||
|
|
||||||
class MMSConfig(object):
|
class MMSConfig(object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.sdks = {}
|
self.sdks = {}
|
||||||
@ -367,11 +371,13 @@ class MMSConfig(object):
|
|||||||
|
|
||||||
def LibraryBuilder(self, compiler, name, arch):
|
def LibraryBuilder(self, compiler, name, arch):
|
||||||
binary = compiler.Library(name)
|
binary = compiler.Library(name)
|
||||||
|
AppendArchSuffix(binary, name, arch)
|
||||||
self.AddVersioning(binary, arch)
|
self.AddVersioning(binary, arch)
|
||||||
return binary
|
return binary
|
||||||
|
|
||||||
def ProgramBuilder(self, compiler, name, arch):
|
def ProgramBuilder(self, compiler, name, arch):
|
||||||
binary = compiler.Program(name)
|
binary = compiler.Program(name)
|
||||||
|
AppendArchSuffix(binary, name, arch)
|
||||||
self.AddVersioning(binary, arch)
|
self.AddVersioning(binary, arch)
|
||||||
if '-static-libgcc' in binary.compiler.linkflags:
|
if '-static-libgcc' in binary.compiler.linkflags:
|
||||||
binary.compiler.linkflags.remove('-static-libgcc')
|
binary.compiler.linkflags.remove('-static-libgcc')
|
||||||
@ -381,8 +387,9 @@ class MMSConfig(object):
|
|||||||
binary.compiler.linkflags += ['-lstdc++']
|
binary.compiler.linkflags += ['-lstdc++']
|
||||||
return binary
|
return binary
|
||||||
|
|
||||||
def StaticLibraryBuilder(self, compiler, name):
|
def StaticLibraryBuilder(self, compiler, name, arch):
|
||||||
binary = compiler.StaticLibrary(name)
|
binary = compiler.StaticLibrary(name)
|
||||||
|
AppendArchSuffix(binary, name, arch)
|
||||||
return binary;
|
return binary;
|
||||||
|
|
||||||
def Library(self, context, name, arch):
|
def Library(self, context, name, arch):
|
||||||
@ -398,7 +405,7 @@ class MMSConfig(object):
|
|||||||
def StaticLibrary(self, context, name, arch):
|
def StaticLibrary(self, context, name, arch):
|
||||||
compiler = context.cxx.clone()
|
compiler = context.cxx.clone()
|
||||||
SetArchFlags(compiler, arch, builder.target.platform)
|
SetArchFlags(compiler, arch, builder.target.platform)
|
||||||
return self.StaticLibraryBuilder(compiler, name)
|
return self.StaticLibraryBuilder(compiler, name, arch)
|
||||||
|
|
||||||
def HL2Library(self, context, name, sdk, arch):
|
def HL2Library(self, context, name, sdk, arch):
|
||||||
compiler = self.HL2Compiler(context, sdk, arch)
|
compiler = self.HL2Compiler(context, sdk, arch)
|
||||||
@ -436,9 +443,6 @@ class MMSConfig(object):
|
|||||||
|
|
||||||
binary = self.LibraryBuilder(compiler, name, arch)
|
binary = self.LibraryBuilder(compiler, name, arch)
|
||||||
|
|
||||||
if arch == 'x86_64':
|
|
||||||
binary.localFolder = name + ".x64"
|
|
||||||
|
|
||||||
dynamic_libs = []
|
dynamic_libs = []
|
||||||
if builder.target.platform == 'linux':
|
if builder.target.platform == 'linux':
|
||||||
compiler.linkflags[0:0] = ['-lm']
|
compiler.linkflags[0:0] = ['-lm']
|
||||||
|
@ -9,8 +9,6 @@ for arch in MMS.archs:
|
|||||||
]
|
]
|
||||||
if binary.compiler.version >= 'clang-2.9' or binary.compiler.version >= 'apple-clang-3.0':
|
if binary.compiler.version >= 'clang-2.9' or binary.compiler.version >= 'apple-clang-3.0':
|
||||||
binary.compiler.cxxflags += ['-Wno-null-dereference']
|
binary.compiler.cxxflags += ['-Wno-null-dereference']
|
||||||
if arch == 'x86_64':
|
|
||||||
binary.localFolder = name + ".x64"
|
|
||||||
|
|
||||||
binary.sources += [
|
binary.sources += [
|
||||||
'main.cpp',
|
'main.cpp',
|
||||||
|
@ -11,8 +11,6 @@ def configure_library(name, linux_defines, arch):
|
|||||||
'serverplugin.cpp',
|
'serverplugin.cpp',
|
||||||
'utility.cpp',
|
'utility.cpp',
|
||||||
]
|
]
|
||||||
if arch == 'x86_64':
|
|
||||||
binary.localFolder = name + ".x64"
|
|
||||||
|
|
||||||
if builder.target.platform == 'linux':
|
if builder.target.platform == 'linux':
|
||||||
binary.compiler.defines += linux_defines
|
binary.compiler.defines += linux_defines
|
||||||
|
@ -9,8 +9,6 @@ for arch in MMS.archs:
|
|||||||
lib.sources += [
|
lib.sources += [
|
||||||
'versionlib.cpp'
|
'versionlib.cpp'
|
||||||
]
|
]
|
||||||
if arch == 'x86_64':
|
|
||||||
lib.localFolder = libname + '.x64'
|
|
||||||
|
|
||||||
cmd = builder.Add(lib)
|
cmd = builder.Add(lib)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user