2013-02-08 05:43:33 +01:00
|
|
|
# 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/sdkhooks', i)
|
2013-02-08 06:00:09 +01:00
|
|
|
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache[sdk['sdk']], 'game', 'shared'))
|
2013-02-08 05:43:33 +01:00
|
|
|
|
|
|
|
if compiler.cc.name == 'gcc' or compiler.cc.name == 'clang':
|
|
|
|
compiler['CXXFLAGS'].append('-Wno-invalid-offsetof')
|
|
|
|
|
|
|
|
name = 'sdkhooks.ext.' + sdk['ext']
|
|
|
|
extension = AMBuild.AddJob(name)
|
|
|
|
binary = Cpp.LibraryBuilder(name, AMBuild, extension, compiler)
|
|
|
|
SM.PreSetupHL2Job(extension, binary, i)
|
|
|
|
binary.AddSourceFiles('extensions/sdkhooks', [
|
|
|
|
'extension.cpp',
|
|
|
|
'natives.cpp',
|
|
|
|
'takedamageinfohack.cpp',
|
|
|
|
'util.cpp',
|
|
|
|
'sdk/smsdk_ext.cpp',
|
|
|
|
])
|
|
|
|
SM.PostSetupHL2Job(extension, binary, i)
|
|
|
|
SM.AutoVersion('extensions/sdkhooks', binary)
|
2013-03-17 22:00:28 +01:00
|
|
|
SM.ExtractDebugInfo(extension, binary)
|
2013-02-08 05:43:33 +01:00
|
|
|
binary.SendToJob()
|
|
|
|
|