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
|
|
|
|
|
2013-12-30 23:50:56 +01:00
|
|
|
binary = SM.Library(builder, 'sourcepawn.jit.x86')
|
|
|
|
binary.compiler.includes += [
|
|
|
|
os.path.join(SM.mms_root, 'core', 'sourcehook'),
|
|
|
|
os.path.join(builder.sourcePath, 'sourcepawn', 'jit'),
|
|
|
|
os.path.join(builder.sourcePath, 'sourcepawn', 'jit', 'x86'),
|
|
|
|
os.path.join(builder.sourcePath, 'public'),
|
|
|
|
os.path.join(builder.sourcePath, 'public', 'sourcepawn'),
|
|
|
|
os.path.join(builder.sourcePath, 'public', 'amtl'),
|
|
|
|
os.path.join(builder.sourcePath, 'public', 'jit'),
|
|
|
|
os.path.join(builder.sourcePath, 'public', 'jit', 'x86'),
|
|
|
|
os.path.join(builder.sourcePath, 'knight', 'shared'),
|
2014-08-22 07:16:07 +02:00
|
|
|
|
|
|
|
# The include path for SP v2 stuff.
|
|
|
|
os.path.join(builder.sourcePath, 'sourcepawn', 'include'),
|
2013-12-30 23:50:56 +01:00
|
|
|
]
|
2009-08-30 09:46:56 +02:00
|
|
|
|
2014-09-12 02:15:59 +02:00
|
|
|
if binary.compiler.vendor == 'gcc' or binary.compiler.vendor == 'clang':
|
|
|
|
binary.compiler.cxxflags += ['-fno-rtti']
|
|
|
|
elif binary.compiler.vendor == 'msvc':
|
|
|
|
binary.compiler.cxxflags += ['/GR-']
|
|
|
|
|
2014-02-10 05:50:20 +01:00
|
|
|
if builder.target_platform == 'linux':
|
2013-12-30 23:50:56 +01:00
|
|
|
binary.compiler.postlink += ['-lpthread', '-lrt']
|
2012-04-14 02:12:24 +02:00
|
|
|
|
2014-07-02 20:46:39 +02:00
|
|
|
if binary.compiler.cc.behavior == 'msvc':
|
|
|
|
binary.compiler.cxxflags.remove('/TP')
|
|
|
|
|
2013-12-30 23:50:56 +01:00
|
|
|
binary.sources += [
|
|
|
|
'BaseRuntime.cpp',
|
|
|
|
'engine2.cpp',
|
|
|
|
'dll_exports.cpp',
|
|
|
|
'jit_function.cpp',
|
|
|
|
'sp_vm_basecontext.cpp',
|
|
|
|
'sp_vm_engine.cpp',
|
|
|
|
'sp_vm_function.cpp',
|
|
|
|
'opcodes.cpp',
|
|
|
|
'interpreter.cpp',
|
|
|
|
'watchdog_timer.cpp',
|
|
|
|
'x86/jit_x86.cpp',
|
|
|
|
'zlib/adler32.c',
|
|
|
|
'zlib/compress.c',
|
|
|
|
'zlib/crc32.c',
|
|
|
|
'zlib/deflate.c',
|
|
|
|
'zlib/gzio.c',
|
|
|
|
'zlib/infback.c',
|
|
|
|
'zlib/inffast.c',
|
|
|
|
'zlib/inflate.c',
|
|
|
|
'zlib/inftrees.c',
|
|
|
|
'zlib/trees.c',
|
|
|
|
'zlib/uncompr.c',
|
|
|
|
'zlib/zutil.c',
|
|
|
|
'md5/md5.cpp',
|
|
|
|
'../../knight/shared/KeCodeAllocator.cpp',
|
|
|
|
'../../public/jit/x86/assembler-x86.cpp',
|
|
|
|
]
|
|
|
|
SM.binaries += [builder.Add(binary)]
|