2013-12-30 23:50:56 +01:00
|
|
|
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
2009-08-30 09:46:56 +02:00
|
|
|
import os.path
|
|
|
|
|
2017-10-02 14:18:57 +02:00
|
|
|
if builder.target.platform in ['windows', 'mac']:
|
2013-12-30 23:50:56 +01:00
|
|
|
name = 'sourcemod_mm'
|
|
|
|
extra_ldflags = []
|
2017-10-02 14:18:57 +02:00
|
|
|
elif builder.target.platform == 'linux':
|
2013-12-30 23:50:56 +01:00
|
|
|
name = 'sourcemod_mm_i486'
|
|
|
|
extra_ldflags = ['-ldl']
|
2009-08-30 09:46:56 +02:00
|
|
|
|
2013-12-30 23:50:56 +01:00
|
|
|
binary = SM.Library(builder, name)
|
|
|
|
binary.compiler.cxxincludes += [
|
|
|
|
os.path.join(SM.mms_root, 'core'),
|
|
|
|
os.path.join(SM.mms_root, 'sourcehook')
|
|
|
|
]
|
2017-10-02 14:18:57 +02:00
|
|
|
if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang':
|
2014-09-12 02:15:59 +02:00
|
|
|
binary.compiler.cxxflags += ['-fno-rtti']
|
2017-10-02 14:18:57 +02:00
|
|
|
elif binary.compiler.family == 'msvc':
|
2014-09-12 02:15:59 +02:00
|
|
|
binary.compiler.cxxflags += ['/GR-']
|
2013-12-30 23:50:56 +01:00
|
|
|
binary.compiler.linkflags += extra_ldflags
|
|
|
|
binary.sources = [
|
|
|
|
'loader.cpp'
|
|
|
|
]
|
2012-04-14 02:12:24 +02:00
|
|
|
|
2013-12-30 23:50:56 +01:00
|
|
|
nodes = builder.Add(binary)
|
|
|
|
SM.binaries += [nodes]
|