sm-ext-dhooks2/AMBuilder

39 lines
1.4 KiB
Plaintext
Raw Normal View History

2013-09-01 17:11:38 +02: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('.', i)
2013-09-02 03:44:26 +02:00
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache['SMCENTRAL'], 'public'))
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache['SMCENTRAL'], 'public', 'sourcepawn'))
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache['SMCENTRAL'], 'public', 'extensions'))
2013-09-02 03:47:39 +02:00
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache['SMCENTRAL'], 'public', 'jit'))
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache['SMCENTRAL'], 'public', 'jit', 'x86'))
2013-09-02 03:51:44 +02:00
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache['SMCENTRAL'], 'public', 'amtl'))
2013-09-01 17:11:38 +02:00
if compiler.cc.name == 'gcc':
compiler['CFLAGS'].append('-Wno-parentheses')
#if i != 'ep1':
# compiler['CDEFINES'].append('HOOKING_ENABLED')
name = 'dhooks.ext.' + sdk['ext']
extension = AMBuild.AddJob(name)
binary = Cpp.LibraryBuilder(name, AMBuild, extension, compiler)
SM.PreSetupHL2Job(extension, binary, i)
binary.AddSourceFiles('.', [
'extension.cpp',
'listeners.cpp',
'vhook.cpp',
'natives.cpp',
2013-09-02 03:55:44 +02:00
'sdk/smsdk_ext.cpp',
2013-09-02 04:00:08 +02:00
os.path.join(AMBuild.cache['SMCENTRAL'], 'public', 'jit', 'x86', 'assembler-x86.cpp')
2013-09-01 17:11:38 +02:00
])
SM.PostSetupHL2Job(extension, binary, i)
#SM.AutoVersion('.', binary)
binary.SendToJob()