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, 'sourcemod.logic')
|
|
|
|
binary.compiler.cxxincludes += [
|
|
|
|
os.path.join(builder.sourcePath, 'core', 'logic'),
|
|
|
|
os.path.join(builder.sourcePath, 'public'),
|
2015-03-07 20:13:32 +01:00
|
|
|
os.path.join(builder.sourcePath, 'sourcepawn', 'include'),
|
2013-12-30 23:50:56 +01:00
|
|
|
os.path.join(builder.sourcePath, 'public', 'amtl'),
|
|
|
|
os.path.join(SM.mms_root, 'core', 'sourcehook')
|
|
|
|
]
|
|
|
|
binary.compiler.defines += [
|
|
|
|
'SM_DEFAULT_THREADER',
|
|
|
|
'SM_LOGIC'
|
|
|
|
]
|
|
|
|
|
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']
|
2014-02-10 05:50:20 +01:00
|
|
|
elif builder.target_platform == 'mac':
|
2013-12-30 23:50:56 +01:00
|
|
|
binary.compiler.cflags += ['-Wno-deprecated-declarations']
|
|
|
|
binary.compiler.postlink += ['-framework', 'CoreServices']
|
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-']
|
|
|
|
|
2013-12-30 23:50:56 +01:00
|
|
|
binary.sources += [
|
|
|
|
'common_logic.cpp',
|
|
|
|
'smn_adt_array.cpp',
|
|
|
|
'smn_sorting.cpp',
|
|
|
|
'smn_maplists.cpp',
|
|
|
|
'ADTFactory.cpp',
|
|
|
|
'smn_adt_stack.cpp',
|
|
|
|
'thread/ThreadWorker.cpp',
|
|
|
|
'thread/BaseWorker.cpp',
|
|
|
|
'ThreadSupport.cpp',
|
|
|
|
'smn_float.cpp',
|
|
|
|
'TextParsers.cpp',
|
|
|
|
'smn_textparse.cpp',
|
|
|
|
'smn_adt_trie.cpp',
|
|
|
|
'smn_functions.cpp',
|
|
|
|
'smn_timers.cpp',
|
|
|
|
'smn_players.cpp',
|
|
|
|
'MemoryUtils.cpp',
|
|
|
|
'smn_admin.cpp',
|
|
|
|
'smn_banning.cpp',
|
|
|
|
'smn_filesystem.cpp',
|
|
|
|
'stringutil.cpp',
|
|
|
|
'Translator.cpp',
|
|
|
|
'PhraseCollection.cpp',
|
|
|
|
'smn_lang.cpp',
|
|
|
|
'smn_string.cpp',
|
|
|
|
'smn_handles.cpp',
|
|
|
|
'smn_datapacks.cpp',
|
|
|
|
'smn_gameconfigs.cpp',
|
|
|
|
'smn_fakenatives.cpp',
|
|
|
|
'GameConfigs.cpp',
|
|
|
|
'sm_crc32.cpp',
|
|
|
|
'smn_profiler.cpp',
|
|
|
|
'ShareSys.cpp',
|
|
|
|
'PluginSys.cpp',
|
|
|
|
'HandleSys.cpp',
|
|
|
|
'NativeOwner.cpp',
|
|
|
|
'ExtensionSys.cpp',
|
|
|
|
'DebugReporter.cpp',
|
|
|
|
'Database.cpp',
|
|
|
|
'smn_database.cpp',
|
|
|
|
'ForwardSys.cpp',
|
2014-05-29 19:31:12 +02:00
|
|
|
'AdminCache.cpp',
|
|
|
|
'sm_trie.cpp',
|
|
|
|
'smn_console.cpp',
|
2014-06-24 10:04:13 +02:00
|
|
|
'ProfileTools.cpp',
|
2014-08-13 23:24:35 +02:00
|
|
|
'Logger.cpp',
|
|
|
|
'smn_core.cpp',
|
2014-09-05 03:01:12 +02:00
|
|
|
'smn_menus.cpp',
|
2013-12-30 23:50:56 +01:00
|
|
|
]
|
2014-02-10 05:50:20 +01:00
|
|
|
if builder.target_platform == 'windows':
|
2013-12-30 23:50:56 +01:00
|
|
|
binary.sources += ['thread/WinThreads.cpp']
|
2009-08-30 09:46:56 +02:00
|
|
|
else:
|
2013-12-30 23:50:56 +01:00
|
|
|
binary.sources += ['thread/PosixThreads.cpp']
|
2009-08-30 09:46:56 +02:00
|
|
|
|
2013-12-30 23:50:56 +01:00
|
|
|
SM.binaries += [builder.Add(binary)]
|