sourcemod/loader/AMBuilder
David Anderson 7ed329c11f
Remove arch loops from build scripts. (#889)
This simplifies non-sdk build scripts by removing their loops over SM.archs. Instead the top-level
build script will re-evaluate them for each architecture.
2018-09-30 09:59:28 -07:00

31 lines
830 B
Python

# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
import os.path
if builder.target.platform in ['windows', 'mac']:
name = 'sourcemod_mm'
extra_ldflags = []
elif builder.target.platform == 'linux':
name = 'sourcemod_mm_i486'
extra_ldflags = ['-ldl']
if arch == 'x64':
name = 'sourcemod_mm.x64'
binary = SM.Library(builder, name, arch)
binary.compiler.cxxincludes += [
os.path.join(SM.mms_root, 'core'),
os.path.join(SM.mms_root, 'sourcehook')
]
binary.compiler.defines += ['META_NO_HL2SDK']
if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang':
binary.compiler.cxxflags += ['-fno-rtti']
elif binary.compiler.family == 'msvc':
binary.compiler.cxxflags += ['/GR-']
binary.compiler.linkflags += extra_ldflags
binary.sources = [
'loader.cpp'
]
nodes = builder.Add(binary)
SM.binaries += [nodes]