50 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			50 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
| # vim: set ts=2 sw=2 tw=99 noet ft=python: 
 | |
| import os
 | |
| 
 | |
| for i in SM.sdkInfo:
 | |
| 	sdk = SM.sdkInfo[i]
 | |
| 	if AMBuild.target['platform'] not in sdk['platform']:
 | |
| 		continue
 | |
| 
 | |
| 	compiler = SM.DefaultHL2Compiler('extensions/sdktools', i)
 | |
| 	compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, 'public', 'jit'))
 | |
| 	compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, 'public', 'jit', 'x86'))
 | |
| 
 | |
| 	if compiler.cc.name == 'gcc':
 | |
| 		compiler['CFLAGS'].append('-Wno-parentheses')
 | |
| 
 | |
| 	if i != 'ep1':
 | |
| 		compiler['CDEFINES'].append('HOOKING_ENABLED')
 | |
| 
 | |
| 	name = 'sdktools.ext.' + sdk['ext']
 | |
| 	extension = AMBuild.AddJob(name)
 | |
| 	binary = Cpp.LibraryBuilder(name, AMBuild, extension, compiler)
 | |
| 	SM.PreSetupHL2Job(extension, binary, i)
 | |
| 	binary.AddSourceFiles('extensions/sdktools', [
 | |
| 		'extension.cpp',
 | |
| 		'inputnatives.cpp',
 | |
| 		'output.cpp',
 | |
| 		'outputnatives.cpp',
 | |
| 		'tempents.cpp',
 | |
| 		'tenatives.cpp',
 | |
| 		'teamnatives.cpp',
 | |
| 		'trnatives.cpp',
 | |
| 		'vcaller.cpp',
 | |
| 		'vcallbuilder.cpp',
 | |
| 		'vdecoder.cpp',
 | |
| 		'vglobals.cpp',
 | |
| 		'vhelpers.cpp',
 | |
| 		'vnatives.cpp',
 | |
| 		'voice.cpp',
 | |
| 		'vsound.cpp',
 | |
| 		'hooks.cpp',
 | |
| 		'vstringtable.cpp',
 | |
| 		'CDetour/detours.cpp',
 | |
| 		'sdk/smsdk_ext.cpp',
 | |
| 		'asm/asm.c'
 | |
| 		])
 | |
| 	SM.PostSetupHL2Job(extension, binary, i)
 | |
| 	SM.AutoVersion('extensions/sdktools', binary)
 | |
| 	binary.SendToJob()
 | |
| 
 |