extensions/sdktools/AMBuilder
author Kyle Sanderson <kyle.leet@gmail.com>
Thu Jul 18 15:50:57 2013 -0400 (2013-07-18)
changeset 3951 c3f26df2183f
parent 3835 ac5919d50903
child 4182 8ef93b2feddf
permissions -rw-r--r--
Removed -Wno-parentheses from posix build and fixed warnings (bug 5745, r=psychonic).
     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['CXXFLAGS'].append('-Wno-invalid-offsetof')
    15 
    16 	if i != 'ep1':
    17 		compiler['CDEFINES'].append('HOOKING_ENABLED')
    18 
    19 	name = 'sdktools.ext.' + sdk['ext']
    20 	extension = AMBuild.AddJob(name)
    21 	binary = Cpp.LibraryBuilder(name, AMBuild, extension, compiler)
    22 	SM.PreSetupHL2Job(extension, binary, i)
    23 	binary.AddSourceFiles('extensions/sdktools', [
    24 		'extension.cpp',
    25 		'inputnatives.cpp',
    26 		'output.cpp',
    27 		'outputnatives.cpp',
    28 		'tempents.cpp',
    29 		'tenatives.cpp',
    30 		'teamnatives.cpp',
    31 		'trnatives.cpp',
    32 		'vcaller.cpp',
    33 		'vcallbuilder.cpp',
    34 		'vdecoder.cpp',
    35 		'vglobals.cpp',
    36 		'vhelpers.cpp',
    37 		'vnatives.cpp',
    38 		'voice.cpp',
    39 		'vsound.cpp',
    40 		'clientnatives.cpp',
    41 		'hooks.cpp',
    42 		'gamerulesnatives.cpp',
    43 		'vstringtable.cpp',
    44 		'CDetour/detours.cpp',
    45 		'sdk/smsdk_ext.cpp',
    46 		'asm/asm.c'
    47 		])
    48 	SM.PostSetupHL2Job(extension, binary, i)
    49 	SM.AutoVersion('extensions/sdktools', binary)
    50 	SM.ExtractDebugInfo(extension, binary)
    51 	binary.SendToJob()
    52