2009-08-30 09:46:56 +02:00
|
|
|
# vim: set ts=2 sw=2 tw=99 noet ft=python:
|
|
|
|
import os
|
|
|
|
|
|
|
|
compiler = SM.DefaultCompiler()
|
|
|
|
base = AMBuild.sourceFolder
|
|
|
|
compiler['CXXINCLUDES'].append(os.path.join(SM.mmsPath, 'core', 'sourcehook'))
|
|
|
|
compiler['CXXINCLUDES'].append(os.path.join(base, 'core', 'logic'))
|
|
|
|
compiler['CXXINCLUDES'].append(os.path.join(base, 'public'))
|
|
|
|
compiler['CXXINCLUDES'].append(os.path.join(base, 'public', 'sourcepawn'))
|
2013-08-23 01:30:44 +02:00
|
|
|
compiler['CXXINCLUDES'].append(os.path.join(base, 'public', 'amtl'))
|
2009-08-30 09:46:56 +02:00
|
|
|
compiler['CDEFINES'].append('SM_DEFAULT_THREADER')
|
|
|
|
compiler['CDEFINES'].append('SM_LOGIC')
|
|
|
|
|
2009-08-31 02:27:44 +02:00
|
|
|
if AMBuild.target['platform'] == 'linux':
|
2009-08-31 02:26:03 +02:00
|
|
|
compiler['POSTLINKFLAGS'].append('-lpthread')
|
2013-08-20 05:58:02 +02:00
|
|
|
compiler['POSTLINKFLAGS'].append('-lrt')
|
2011-06-15 23:02:05 +02:00
|
|
|
if AMBuild.target['platform'] == 'darwin':
|
2012-08-25 18:28:52 +02:00
|
|
|
compiler['CFLAGS'].extend(['-Wno-deprecated-declarations'])
|
2011-06-15 23:02:05 +02:00
|
|
|
compiler['POSTLINKFLAGS'].extend(['-framework', 'CoreServices'])
|
2009-08-31 02:26:03 +02:00
|
|
|
|
2009-08-30 09:46:56 +02:00
|
|
|
extension = AMBuild.AddJob('sourcemod.logic')
|
|
|
|
binary = Cpp.LibraryBuilder('sourcemod.logic', AMBuild, extension, compiler)
|
|
|
|
files = [
|
|
|
|
'common_logic.cpp',
|
|
|
|
'smn_adt_array.cpp',
|
|
|
|
'smn_sorting.cpp',
|
|
|
|
'smn_maplists.cpp',
|
2013-10-09 14:43:08 +02:00
|
|
|
'ADTFactory.cpp',
|
2009-08-30 09:46:56 +02:00
|
|
|
'smn_adt_stack.cpp',
|
|
|
|
'thread/ThreadWorker.cpp',
|
|
|
|
'thread/BaseWorker.cpp',
|
|
|
|
'ThreadSupport.cpp',
|
|
|
|
'smn_float.cpp',
|
|
|
|
'TextParsers.cpp',
|
|
|
|
'smn_textparse.cpp',
|
|
|
|
'smn_adt_trie.cpp',
|
|
|
|
'Profiler.cpp',
|
2010-01-18 12:08:52 +01:00
|
|
|
'smn_functions.cpp',
|
2010-05-13 10:47:12 +02:00
|
|
|
'smn_timers.cpp',
|
2010-05-13 21:28:51 +02:00
|
|
|
'smn_players.cpp',
|
2010-05-15 01:14:59 +02:00
|
|
|
'MemoryUtils.cpp',
|
2010-05-15 02:46:19 +02:00
|
|
|
'smn_admin.cpp',
|
2010-05-15 03:22:03 +02:00
|
|
|
'smn_banning.cpp',
|
2013-02-17 00:52:11 +01:00
|
|
|
'smn_filesystem.cpp',
|
2010-05-15 04:28:10 +02:00
|
|
|
'stringutil.cpp',
|
2010-05-15 04:43:53 +02:00
|
|
|
'Translator.cpp',
|
|
|
|
'PhraseCollection.cpp',
|
|
|
|
'smn_lang.cpp',
|
2010-05-15 05:04:44 +02:00
|
|
|
'smn_string.cpp',
|
2010-05-15 06:06:06 +02:00
|
|
|
'smn_handles.cpp',
|
2010-05-15 06:16:35 +02:00
|
|
|
'smn_datapacks.cpp',
|
2010-05-15 08:35:42 +02:00
|
|
|
'smn_gameconfigs.cpp',
|
2013-03-29 19:37:29 +01:00
|
|
|
'smn_fakenatives.cpp',
|
2010-05-15 08:35:42 +02:00
|
|
|
'GameConfigs.cpp',
|
2011-05-22 11:04:34 +02:00
|
|
|
'sm_crc32.cpp',
|
2013-02-17 00:57:00 +01:00
|
|
|
'smn_profiler.cpp',
|
2013-03-29 19:37:29 +01:00
|
|
|
'ShareSys.cpp',
|
|
|
|
'PluginSys.cpp',
|
|
|
|
'HandleSys.cpp',
|
|
|
|
'NativeOwner.cpp',
|
|
|
|
'NativeInvoker.cpp',
|
|
|
|
'ExtensionSys.cpp',
|
2013-02-17 00:57:00 +01:00
|
|
|
'DebugReporter.cpp'
|
2009-08-30 09:46:56 +02:00
|
|
|
]
|
|
|
|
if AMBuild.target['platform'] == 'windows':
|
|
|
|
files.append('thread/WinThreads.cpp')
|
|
|
|
else:
|
|
|
|
files.append('thread/PosixThreads.cpp')
|
|
|
|
binary.AddSourceFiles('core/logic', files)
|
|
|
|
SM.AutoVersion('core/logic', binary)
|
2013-03-17 22:00:28 +01:00
|
|
|
SM.ExtractDebugInfo(extension, binary)
|
2009-08-30 09:46:56 +02:00
|
|
|
binary.SendToJob()
|
|
|
|
|