AMBuildScript
author Ruben Gonzalez <drifter01620@gmail.com>
Wed Oct 01 11:50:24 2014 -0400 (2014-10-01)
changeset 193 277c856152b0
parent 186 072ae02a1bc6
permissions -rw-r--r--
Update linix CS:GO gamedata
[email protected]
     1
# vim: set ts=2 sw=2 tw=99 noet ft=python:
[email protected]
     2
import os
[email protected]
     3
import sys
[email protected]
     4
from ambuild.command import SymlinkCommand
[email protected]
     5
[email protected]
     6
class CSSDM:
[email protected]
     7
	def __init__(self):
[email protected]
     8
		self.compiler = Cpp.Compiler()
[email protected]
     9
[email protected]
    10
		#Build SDK info
[email protected]
    11
		self.sdkInfo = { }
[email protected]
    12
		self.sdkInfo['css'] =  {'sdk': 'HL2SDKCSS',   'ext': '2.css',  'def': '6',
[email protected]
    13
		                         'name': 'CSS', 'platform': ['windows', 'linux', 'darwin']}
[email protected]
    14
		
[email protected]
    15
		self.sdkInfo['csgo'] =  {'sdk': 'HL2SDKCSGO',     'ext': '2.csgo',  'def': '11',
[email protected]
    16
		                         'name': 'CSGO',           'platform': ['windows', 'linux']}
[email protected]
    17
[email protected]
    18
		if AMBuild.mode == 'config':
[email protected]
    19
			#Detect compilers
[email protected]
    20
			self.compiler.DetectAll(AMBuild)
[email protected]
    21
[email protected]
    22
			#Detect variables
[email protected]
    23
			envvars = { 'MMSOURCE19': 'mmsource-1.9' }
[email protected]
    24
			envvars['SOURCEMOD14'] = 'sourcemod-1.4'
[email protected]
    25
			envvars['SOURCEMOD-BIN'] = 'sourcemod-bin'
[email protected]
    26
			#envvars['HL2SDKOBVALVE'] = 'hl2sdk-ob-valve'
[email protected]
    27
			envvars['HL2SDKCSS'] = 'hl2sdk-css'
[email protected]
    28
			if AMBuild.target['platform'] != 'darwin':
[email protected]
    29
				envvars['HL2SDKCSGO'] = 'hl2sdk-csgo'
[email protected]
    30
[email protected]
    31
			#Must have a path for each envvar (file a bug if you don't like this)
[email protected]
    32
			for i in envvars:
[email protected]
    33
				if i in os.environ:
[email protected]
    34
					path = os.environ[i]
[email protected]
    35
					if not os.path.isdir(path):
[email protected]
    36
						raise Exception('Path for {0} was not found: {1}'.format(i, path))
[email protected]
    37
				else:
[email protected]
    38
					head = os.getcwd()
[email protected]
    39
					oldhead = None
[email protected]
    40
					while head != None and head != oldhead:
[email protected]
    41
						path = os.path.join(head, envvars[i])
[email protected]
    42
						if os.path.isdir(path):
[email protected]
    43
							break
[email protected]
    44
						oldhead = head
[email protected]
    45
						head, tail = os.path.split(head)
[email protected]
    46
					if head == None or head == oldhead:
[email protected]
    47
						raise Exception('Could not find a valid path for {0}'.format(i))
[email protected]
    48
				AMBuild.cache.CacheVariable(i, path)
[email protected]
    49
[email protected]
    50
			#Set up defines
[email protected]
    51
			cxx = self.compiler.cxx
[email protected]
    52
			if isinstance(cxx, Cpp.CompatGCC):
[email protected]
    53
				if isinstance(cxx, Cpp.GCC):
[email protected]
    54
					self.vendor = 'gcc'
[email protected]
    55
				elif isinstance(cxx, Cpp.Clang):
[email protected]
    56
					self.vendor = 'clang'
[email protected]
    57
				self.compiler.AddToListVar('CDEFINES', 'stricmp=strcasecmp')
[email protected]
    58
				self.compiler.AddToListVar('CDEFINES', '_stricmp=strcasecmp')
[email protected]
    59
				self.compiler.AddToListVar('CDEFINES', '_snprintf=snprintf')
[email protected]
    60
				self.compiler.AddToListVar('CDEFINES', '_vsnprintf=vsnprintf')
[email protected]
    61
				self.compiler.AddToListVar('CFLAGS', '-pipe')
[email protected]
    62
				self.compiler.AddToListVar('CFLAGS', '-fno-strict-aliasing')
[email protected]
    63
				if (self.vendor == 'gcc' and cxx.majorVersion >= 4) or self.vendor == 'clang':
[email protected]
    64
					self.compiler.AddToListVar('CFLAGS', '-fvisibility=hidden')
[email protected]
    65
					self.compiler.AddToListVar('CXXFLAGS', '-fvisibility-inlines-hidden')
[email protected]
    66
				self.compiler.AddToListVar('CFLAGS', '-Wall')
[email protected]
    67
				self.compiler.AddToListVar('CFLAGS', '-Werror')
[email protected]
    68
				self.compiler.AddToListVar('CFLAGS', '-Wno-uninitialized')
[email protected]
    69
				self.compiler.AddToListVar('CXXFLAGS', '-Wno-invalid-offsetof')
[email protected]
    70
				self.compiler.AddToListVar('CFLAGS', '-Wno-unused')
[email protected]
    71
				self.compiler.AddToListVar('CFLAGS', '-Wno-switch')
[email protected]
    72
				self.compiler.AddToListVar('CXXFLAGS', '-Wno-delete-non-virtual-dtor')
[email protected]
    73
				self.compiler.AddToListVar('CFLAGS', '-msse')
[email protected]
    74
				self.compiler.AddToListVar('CFLAGS', '-m32')
[email protected]
    75
				self.compiler.AddToListVar('POSTLINKFLAGS', '-m32')
[email protected]
    76
				self.compiler.AddToListVar('CXXFLAGS', '-fno-exceptions')
[email protected]
    77
				self.compiler.AddToListVar('CXXFLAGS', '-fno-rtti')
[email protected]
    78
				self.compiler.AddToListVar('CXXFLAGS', '-fno-threadsafe-statics')
[email protected]
    79
				self.compiler.AddToListVar('CXXFLAGS', '-Wno-non-virtual-dtor')
[email protected]
    80
				self.compiler.AddToListVar('CXXFLAGS', '-Wno-overloaded-virtual')
[email protected]
    81
				if (self.vendor == 'gcc' and cxx.majorVersion >= 4 and cxx.minorVersion >= 7) or \
[email protected]
    82
						(self.vendor == 'clang' and cxx.majorVersion >= 3):
[email protected]
    83
					self.compiler.AddToListVar('CXXFLAGS', '-Wno-delete-non-virtual-dtor')
[email protected]
    84
				self.compiler.AddToListVar('CDEFINES', 'HAVE_STDINT_H')
[email protected]
    85
				if self.vendor == 'gcc':
[email protected]
    86
					self.compiler.AddToListVar('CFLAGS', '-mfpmath=sse')
[email protected]
    87
			elif isinstance(cxx, Cpp.MSVC):
[email protected]
    88
				self.vendor = 'msvc'
[email protected]
    89
				if AMBuild.options.debug == '1':
[email protected]
    90
					self.compiler.AddToListVar('CFLAGS', '/MTd')
[email protected]
    91
					self.compiler.AddToListVar('POSTLINKFLAGS', '/NODEFAULTLIB:libcmt')
[email protected]
    92
				else:
[email protected]
    93
					self.compiler.AddToListVar('CFLAGS', '/MT')
[email protected]
    94
				self.compiler.AddToListVar('CDEFINES', '_CRT_SECURE_NO_DEPRECATE')
[email protected]
    95
				self.compiler.AddToListVar('CDEFINES', '_CRT_SECURE_NO_WARNINGS')
[email protected]
    96
				self.compiler.AddToListVar('CDEFINES', '_CRT_NONSTDC_NO_DEPRECATE')
[email protected]
    97
				self.compiler.AddToListVar('CXXFLAGS', '/EHsc')
[email protected]
    98
				self.compiler.AddToListVar('CXXFLAGS', '/GR-')
[email protected]
    99
				self.compiler.AddToListVar('CFLAGS', '/W3')
[email protected]
   100
				self.compiler.AddToListVar('CFLAGS', '/nologo')
[email protected]
   101
				self.compiler.AddToListVar('CFLAGS', '/Zi')
[email protected]
   102
				self.compiler.AddToListVar('CXXFLAGS', '/TP')
[email protected]
   103
				self.compiler.AddToListVar('POSTLINKFLAGS', '/DEBUG')
[email protected]
   104
				self.compiler.AddToListVar('POSTLINKFLAGS', '/MACHINE:X86')
[email protected]
   105
				self.compiler.AddToListVar('POSTLINKFLAGS', '/SUBSYSTEM:WINDOWS')
[email protected]
   106
				self.compiler.AddToListVar('POSTLINKFLAGS', 'kernel32.lib')
[email protected]
   107
				self.compiler.AddToListVar('POSTLINKFLAGS', 'user32.lib')
[email protected]
   108
				self.compiler.AddToListVar('POSTLINKFLAGS', 'gdi32.lib')
[email protected]
   109
				self.compiler.AddToListVar('POSTLINKFLAGS', 'winspool.lib')
[email protected]
   110
				self.compiler.AddToListVar('POSTLINKFLAGS', 'comdlg32.lib')
[email protected]
   111
				self.compiler.AddToListVar('POSTLINKFLAGS', 'advapi32.lib')
[email protected]
   112
				self.compiler.AddToListVar('POSTLINKFLAGS', 'shell32.lib')
[email protected]
   113
				self.compiler.AddToListVar('POSTLINKFLAGS', 'ole32.lib')
[email protected]
   114
				self.compiler.AddToListVar('POSTLINKFLAGS', 'oleaut32.lib')
[email protected]
   115
				self.compiler.AddToListVar('POSTLINKFLAGS', 'uuid.lib')
[email protected]
   116
				self.compiler.AddToListVar('POSTLINKFLAGS', 'odbc32.lib')
[email protected]
   117
				self.compiler.AddToListVar('POSTLINKFLAGS', 'odbccp32.lib')
[email protected]
   118
[email protected]
   119
			#Optimization
[email protected]
   120
			if AMBuild.options.opt == '1':
[email protected]
   121
				self.compiler.AddToListVar('CDEFINES', 'NDEBUG')
[email protected]
   122
				if self.vendor == 'gcc' or self.vendor == 'clang':
[email protected]
   123
					self.compiler.AddToListVar('CFLAGS', '-O3')
[email protected]
   124
				elif self.vendor == 'msvc':
[email protected]
   125
					self.compiler.AddToListVar('CFLAGS', '/Ox')
[email protected]
   126
					self.compiler.AddToListVar('POSTLINKFLAGS', '/OPT:ICF')
[email protected]
   127
					self.compiler.AddToListVar('POSTLINKFLAGS', '/OPT:REF')
[email protected]
   128
[email protected]
   129
			#Debugging
[email protected]
   130
			if AMBuild.options.debug == '1':
[email protected]
   131
				self.compiler.AddToListVar('CDEFINES', 'DEBUG')
[email protected]
   132
				self.compiler.AddToListVar('CDEFINES', '_DEBUG')
[email protected]
   133
				if self.vendor == 'gcc' or self.vendor == 'clang':
[email protected]
   134
					self.compiler.AddToListVar('CFLAGS', '-g3')
dva[email protected]
   135
				elif self.vendor == 'msvc':
[email protected]
   136
					self.compiler.AddToListVar('CFLAGS', '/Od')
[email protected]
   137
					self.compiler.AddToListVar('CFLAGS', '/RTC1')
[email protected]
   138
[email protected]
   139
			#Platform-specifics
[email protected]
   140
			if AMBuild.target['platform'] == 'linux':
[email protected]
   141
				self.compiler.AddToListVar('CDEFINES', '_LINUX')
[email protected]
   142
				if self.vendor == 'gcc':
[email protected]
   143
					self.compiler.AddToListVar('POSTLINKFLAGS', '-static-libgcc')
[email protected]
   144
				if self.vendor == 'clang':
[email protected]
   145
					self.compiler.AddToListVar('POSTLINKFLAGS', '-lgcc_eh')
[email protected]
   146
			elif AMBuild.target['platform'] == 'darwin':
[email protected]
   147
				self.compiler.AddToListVar('POSTLINKFLAGS', '-mmacosx-version-min=10.5')
[email protected]
   148
				self.compiler.AddToListVar('POSTLINKFLAGS', ['-arch', 'i386'])
[email protected]
   149
				self.compiler.AddToListVar('POSTLINKFLAGS', '-lstdc++')
[email protected]
   150
[email protected]
   151
				# For OS X dylib versioning
[email protected]
   152
				import re
[email protected]
   153
				productFile = open(os.path.join(AMBuild.sourceFolder, 'product.version'), 'r')
[email protected]
   154
				productContents = productFile.read()
[email protected]
   155
				productFile.close()
[email protected]
   156
				m = re.match('(\d+)\.(\d+)\.(\d+).*', productContents)
[email protected]
   157
				if m == None:
[email protected]
   158
					self.version = '1.0.0'
[email protected]
   159
				else:
[email protected]
   160
					major, minor, release = m.groups()
[email protected]
   161
					self.version = '{0}.{1}.{2}'.format(major, minor, release)
[email protected]
   162
				AMBuild.cache.CacheVariable('version', self.version)
[email protected]
   163
			elif AMBuild.target['platform'] == 'windows':
[email protected]
   164
				self.compiler.AddToListVar('CDEFINES', 'WIN32')
[email protected]
   165
				self.compiler.AddToListVar('CDEFINES', '_WINDOWS')
[email protected]
   166
[email protected]
   167
			#Finish up
[email protected]
   168
			self.compiler.AddToListVar('CDEFINES', 'CSSDM_GENERATED_BUILD')
[email protected]
   169
			self.compiler.AddToListVar('CINCLUDES',
[email protected]
   170
			                           os.path.join(AMBuild.outputFolder, 'includes'))
[email protected]
   171
			self.compiler.ToConfig(AMBuild, 'compiler')
[email protected]
   172
			AMBuild.cache.CacheVariable('vendor', self.vendor)
[email protected]
   173
			self.targetMap = { }
[email protected]
   174
			AMBuild.cache.CacheVariable('targetMap', self.targetMap)
[email protected]
   175
		else:
[email protected]
   176
			self.compiler.FromConfig(AMBuild, 'compiler')
[email protected]
   177
			self.targetMap = AMBuild.cache['targetMap']
[email protected]
   178
[email protected]
   179
		if AMBuild.target['platform'] == 'windows':
[email protected]
   180
			self.compiler.AddToListVar('RCINCLUDES', os.path.join(AMBuild.sourceFolder, 'public'))
[email protected]
   181
			self.compiler.AddToListVar('RCINCLUDES',
[email protected]
   182
			                           os.path.join(AMBuild.outputFolder, 'includes'))
[email protected]
   183
		self.mmsPath = AMBuild.cache['MMSOURCE19']
[email protected]
   184
		self.smSourcePath = AMBuild.cache['SOURCEMOD14']
[email protected]
   185
		self.smBinPath = AMBuild.cache['SOURCEMOD-BIN']
[email protected]
   186
[email protected]
   187
	def DefaultCompiler(self):
[email protected]
   188
		compiler = self.compiler.Clone()
[email protected]
   189
		compiler['CXXINCLUDES'].append(os.path.join(self.mmsPath, 'core', 'sourcehook'))
[email protected]
   190
		return compiler
[email protected]
   191
[email protected]
   192
	def JobMatters(self, jobname):
[email protected]
   193
		file = sys._getframe().f_code.co_filename
[email protected]
   194
		if AMBuild.mode == 'config':
[email protected]
   195
			self.targetMap[jobname] = file
[email protected]
   196
			return True
[email protected]
   197
		if len(AMBuild.args) == 0:
[email protected]
   198
			return True
[email protected]
   199
		if not jobname in AMBuild.args:
[email protected]
   200
			return False
[email protected]
   201
[email protected]
   202
	def AutoVersion(self, folder, binary):
[email protected]
   203
		if AMBuild.target['platform'] == 'windows':
[email protected]
   204
			env = {'RCDEFINES': ['BINARY_NAME="' + binary.binaryFile + '"', 'CSSDM_GENERATED_BUILD']}
[email protected]
   205
			binary.AddResourceFile(os.path.join(folder, 'version.rc' ), env)
[email protected]
   206
		elif AMBuild.target['platform'] == 'darwin' and isinstance(binary, Cpp.LibraryBuilder):
[email protected]
   207
			binary.compiler['POSTLINKFLAGS'].extend(['-compatibility_version', '1.0.0'])
[email protected]
   208
			binary.compiler['POSTLINKFLAGS'].extend(['-current_version', AMBuild.cache['version']])
[email protected]
   209
		else:
[email protected]
   210
			return
[email protected]
   211
[email protected]
   212
	def PreSetupHL2Job(self, job, builder, sdk):
[email protected]
   213
		info = self.sdkInfo[sdk]
[email protected]
   214
		sdkPath = AMBuild.cache[info['sdk']]
[email protected]
   215
		if AMBuild.target['platform'] == 'linux':
[email protected]
   216
			if sdk == 'ep1':
[email protected]
   217
				staticLibs = os.path.join(sdkPath, 'linux_sdk')
[email protected]
   218
			else:
[email protected]
   219
				staticLibs = os.path.join(sdkPath, 'lib', 'linux')
[email protected]
   220
			workFolder = os.path.join(AMBuild.outputFolder, job.workFolder)
[email protected]
   221
			if sdk in ['ep2v', 'l4d', 'l4d2', 'csgo', 'css']:
[email protected]
   222
				libs = ['tier1_i486.a', 'mathlib_i486.a', 'libvstdlib.so', 'libtier0.so']
[email protected]
   223
				
[email protected]
   224
				if sdk in ['ep2v', 'css']:
[email protected]
   225
					libs = ['tier1_i486.a', 'mathlib_i486.a', 'libvstdlib_srv.so', 'libtier0_srv.so']
[email protected]
   226
					
[email protected]
   227
				if sdk == 'csgo':
[email protected]
   228
					libs.append('interfaces_i486.a')
[email protected]
   229
					builder['POSTLINKFLAGS'].append('-lstdc++')
[email protected]
   230
					
[email protected]
   231
				for i in libs:
[email protected]
   232
					link = os.path.join(workFolder, i)
[email protected]
   233
					target = os.path.join(staticLibs, i)
[email protected]
   234
					try:
[email protected]
   235
						os.lstat(link)
[email protected]
   236
					except:
[email protected]
   237
						job.AddCommand(SymlinkCommand(link, target))
[email protected]
   238
			else:
[email protected]
   239
				for i in ['tier1_i486.a', 'mathlib_i486.a', 'vstdlib_i486.so', 'tier0_i486.so']:
[email protected]
   240
					link = os.path.join(workFolder, i)
[email protected]
   241
					target = os.path.join(staticLibs, i)
[email protected]
   242
					try:
[email protected]
   243
						os.lstat(link)
[email protected]
   244
					except:
[email protected]
   245
						job.AddCommand(SymlinkCommand(link, target))
[email protected]
   246
		elif AMBuild.target['platform'] == 'darwin':
[email protected]
   247
			staticLibs = os.path.join(sdkPath, 'lib', 'mac')
[email protected]
   248
			workFolder = os.path.join(AMBuild.outputFolder, job.workFolder)
[email protected]
   249
			libs = ['tier1_i486.a', 'mathlib_i486.a', 'libvstdlib.dylib', 'libtier0.dylib']
[email protected]
   250
			if sdk == 'csgo':
[email protected]
   251
				libs.append('interfaces_i486.a')
[email protected]
   252
			for i in libs:
[email protected]
   253
				link = os.path.join(workFolder, i)
[email protected]
   254
				target = os.path.join(staticLibs, i)
[email protected]
   255
				try:
[email protected]
   256
					os.lstat(link)
[email protected]
   257
				except:
[email protected]
   258
					job.AddCommand(SymlinkCommand(link, target))
[email protected]
   259
		elif AMBuild.target['platform'] == 'windows':
[email protected]
   260
			libs = ['tier0', 'tier1', 'vstdlib', 'mathlib']
[email protected]
   261
			if sdk == 'swarm' or sdk == 'csgo':
[email protected]
   262
				libs.append('interfaces')
[email protected]
   263
			for lib in libs:
[email protected]
   264
				libPath = os.path.join(sdkPath, 'lib', 'public', lib) + '.lib'
[email protected]
   265
				builder.RebuildIfNewer(libPath)
[email protected]
   266
				builder['POSTLINKFLAGS'].append(libPath)
[email protected]
   267
[email protected]
   268
	def PostSetupHL2Job(self, job, builder, sdk):
[email protected]
   269
		if AMBuild.target['platform'] in ['linux', 'darwin']:
[email protected]
   270
			builder.AddObjectFiles(['tier1_i486.a', 'mathlib_i486.a'])
[email protected]
   271
			if sdk == 'csgo':
[email protected]
   272
				builder.AddObjectFiles(['interfaces_i486.a'])
[email protected]
   273
[email protected]
   274
	def DefaultHL2Compiler(self, path, sdk, noLink = False, oldMms = '-legacy'):
[email protected]
   275
		compiler = self.DefaultCompiler()
[email protected]
   276
[email protected]
   277
		mms = 'core'
[email protected]
   278
		if sdk == 'ep1':
[email protected]
   279
			mms += oldMms
[email protected]
   280
[email protected]
   281
		compiler['CXXINCLUDES'].append(os.path.join(self.mmsPath, mms))
[email protected]
   282
		compiler['CXXINCLUDES'].append(os.path.join(self.mmsPath, mms, 'sourcehook'))
[email protected]
   283
		compiler['CXXINCLUDES'].append(os.path.join(self.smSourcePath, 'public'))
[email protected]
   284
		compiler['CXXINCLUDES'].append(os.path.join(self.smSourcePath, 'public/extensions'))
[email protected]
   285
		compiler['CXXINCLUDES'].append(os.path.join(self.smSourcePath, 'public/sourcepawn'))
[email protected]
   286
[email protected]
   287
		info = self.sdkInfo
[email protected]
   288
		compiler['CDEFINES'].extend(['SE_' + info[i]['name'] + '=' + info[i]['def'] for i in info])
[email protected]
   289
[email protected]
   290
		paths = [['public'], ['public', 'engine'], ['public', 'mathlib'], ['public', 'vstdlib'],
[email protected]
   291
						 ['public', 'tier0'], ['public', 'tier1']]
[email protected]
   292
		if sdk == 'ep1' or sdk == 'darkm':
[email protected]
   293
			paths.append(['public', 'dlls'])
[email protected]
   294
			paths.append(['game_shared'])
[email protected]
   295
		else:
[email protected]
   296
			paths.append(['public', 'game', 'server'])
[email protected]
   297
			paths.append(['game', 'shared'])
[email protected]
   298
			paths.append(['game', 'server'])
[email protected]
   299
			paths.append(['common'])
[email protected]
   300
[email protected]
   301
		info = self.sdkInfo[sdk]
[email protected]
   302
		sdkPath = AMBuild.cache[info['sdk']]
[email protected]
   303
[email protected]
   304
		compiler['CDEFINES'].append('SOURCE_ENGINE=' + info['def'])
[email protected]
   305
drifter[email protected]
   306
		if sdk in ['swarm','csgo']:
[email protected]
   307
			if AMBuild.target['platform'] == 'windows':
[email protected]
   308
				compiler['CDEFINES'].extend(['COMPILER_MSVC', 'COMPILER_MSVC32'])
[email protected]
   309
			else:
[email protected]
   310
				compiler['CDEFINES'].extend(['COMPILER_GCC', 'POSIX'])
[email protected]
   311
[email protected]
   312
		if sdk == 'ep1':
[email protected]
   313
			if AMBuild.target['platform'] == 'linux':
[email protected]
   314
				staticLibs = os.path.join(sdkPath, 'linux_sdk')
[email protected]
   315
		else:
[email protected]
   316
			if AMBuild.target['platform'] == 'linux':
[email protected]
   317
				compiler['CDEFINES'].extend(['COMPILER_GCC', 'POSIX'])
[email protected]
   318
				staticLibs = os.path.join(sdkPath, 'lib', 'linux')
[email protected]
   319
			elif AMBuild.target['platform'] == 'darwin':
[email protected]
   320
				compiler['CDEFINES'].extend(['OSX', 'POSIX'])
[email protected]
   321
				staticLibs = os.path.join(sdkPath, 'lib', 'mac')
[email protected]
   322
[email protected]
   323
		for i in paths:
[email protected]
   324
			compiler['CXXINCLUDES'].append(os.path.join(sdkPath, *i))
[email protected]
   325
[email protected]
   326
		if not noLink:
[email protected]
   327
			if AMBuild.target['platform'] == 'linux':
[email protected]
   328
				compiler['POSTLINKFLAGS'][0:0] = ['-lm']
[email protected]
   329
				if sdk in ['ep2v', 'css']:
[email protected]
   330
					compiler['POSTLINKFLAGS'][0:0] = ['libtier0_srv.so']
[email protected]
   331
					compiler['POSTLINKFLAGS'][0:0] = ['libvstdlib_srv.so']
[email protected]
   332
				elif sdk in ['l4d', 'l4d2', 'csgo']:
[email protected]
   333
					compiler['POSTLINKFLAGS'][0:0] = ['libtier0.so']
[email protected]
   334
					compiler['POSTLINKFLAGS'][0:0] = ['libvstdlib.so']
[email protected]
   335
				else:
[email protected]
   336
					compiler['POSTLINKFLAGS'][0:0] = ['tier0_i486.so']
[email protected]
   337
					compiler['POSTLINKFLAGS'][0:0] = ['vstdlib_i486.so']
[email protected]
   338
			elif AMBuild.target['platform'] == 'darwin':
[email protected]
   339
				compiler['POSTLINKFLAGS'][0:0] = ['libtier0.dylib']
[email protected]
   340
				compiler['POSTLINKFLAGS'][0:0] = ['libvstdlib.dylib']
[email protected]
   341
[email protected]
   342
		return compiler
[email protected]
   343
[email protected]
   344
cssdm = CSSDM()
[email protected]
   345
globals = {
[email protected]
   346
	'CSSDM': cssdm
[email protected]
   347
}
[email protected]
   348
[email protected]
   349
AMBuild.Include(os.path.join('buildbot', 'Versioning'), globals)
[email protected]
   350
[email protected]
   351
FileList = [
[email protected]
   352
		['ExtensionBuilder'],
[email protected]
   353
		['PluginBuilder'],
[email protected]
   354
		['PackageScript']
[email protected]
   355
	]
[email protected]
   356
[email protected]
   357
for parts in FileList:
[email protected]
   358
	AMBuild.Include(os.path.join(*parts), globals)
[email protected]
   359