extensions/sdktools/AMBuilder
author Nicholas Hastings <skamonkey@gmail.com>
Wed May 25 13:30:40 2011 -0400 (2011-05-25)
changeset 3284 a7a73225f8ee
parent 3283 abe4ce9d3e0e
child 3285 065beec73902
permissions -rw-r--r--
Backed out changeset: abe4ce9d3e0e
     1 # vim: set ts=2 sw=2 tw=99 noet ft=python: 
     2 import os
     3 
     4 for i in SM.sdkInfo:
     5 	sdk = SM.sdkInfo[i]
     6 	if AMBuild.target['platform'] not in sdk['platform']:
     7 		continue
     8 
     9 	compiler = SM.DefaultHL2Compiler('extensions/sdktools', i)
    10 	compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, 'public', 'jit'))
    11 	compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, 'public', 'jit', 'x86'))
    12 
    13 	if compiler.cc.name == 'gcc' or compiler.cc.name == 'clang':
    14 		compiler['CFLAGS'].append('-Wno-parentheses')
    15 		compiler['CFLAGS'].append('-Wno-invalid-offsetof')
    16 
    17 	if i != 'ep1':
    18 		compiler['CDEFINES'].append('HOOKING_ENABLED')
    19 
    20 	name = 'sdktools.ext.' + sdk['ext']
    21 	extension = AMBuild.AddJob(name)
    22 	binary = Cpp.LibraryBuilder(name, AMBuild, extension, compiler)
    23 	SM.PreSetupHL2Job(extension, binary, i)
    24 	binary.AddSourceFiles('extensions/sdktools', [
    25 		'extension.cpp',
    26 		'inputnatives.cpp',
    27 		'output.cpp',
    28 		'outputnatives.cpp',
    29 		'tempents.cpp',
    30 		'tenatives.cpp',
    31 		'teamnatives.cpp',
    32 		'trnatives.cpp',
    33 		'vcaller.cpp',
    34 		'vcallbuilder.cpp',
    35 		'vdecoder.cpp',
    36 		'vglobals.cpp',
    37 		'vhelpers.cpp',
    38 		'vnatives.cpp',
    39 		'voice.cpp',
    40 		'vsound.cpp',
    41 		'hooks.cpp',
    42 		'vstringtable.cpp',
    43 		'CDetour/detours.cpp',
    44 		'sdk/smsdk_ext.cpp',
    45 		'asm/asm.c'
    46 		])
    47 	SM.PostSetupHL2Job(extension, binary, i)
    48 	SM.AutoVersion('extensions/sdktools', binary)
    49 	binary.SendToJob()
    50