34 lines
958 B
Python
34 lines
958 B
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
|
|
|
|
name = 'bintools.ext.' + sdk['ext']
|
|
|
|
compiler = SM.DefaultHL2Compiler('extensions/bintools', i, True, '')
|
|
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, 'public', 'jit'))
|
|
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, 'public', 'jit', 'x86'))
|
|
|
|
if i != 'ep1':
|
|
compiler['CDEFINES'].append('HOOKING_ENABLED')
|
|
|
|
extension = AMBuild.AddJob(name)
|
|
binary = Cpp.LibraryBuilder(name, AMBuild, extension, compiler)
|
|
SM.PreSetupHL2Job(extension, binary, i)
|
|
binary.AddSourceFiles('extensions/bintools', [
|
|
'extension.cpp',
|
|
'CallMaker.cpp',
|
|
'CallWrapper.cpp',
|
|
'HookWrapper.cpp',
|
|
'jit_call.cpp',
|
|
'jit_hook.cpp',
|
|
'sdk/smsdk_ext.cpp'
|
|
])
|
|
SM.PostSetupHL2Job(extension, binary, i)
|
|
SM.AutoVersion('extensions/bintools', binary)
|
|
binary.SendToJob()
|
|
|