2014-02-08 09:14:15 +00:00
|
|
|
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
|
|
|
import os.path
|
|
|
|
|
|
|
|
binary = AMXX.MetaPlugin(builder, 'amxmodx')
|
|
|
|
|
|
|
|
binary.compiler.defines += [
|
|
|
|
'JIT',
|
|
|
|
'ASM32',
|
|
|
|
'HAVE_STDINT_H',
|
|
|
|
]
|
|
|
|
|
|
|
|
if builder.target_platform == 'mac':
|
|
|
|
jit_objects = [
|
|
|
|
binary.Dep('JIT/amxexecn-darwin.o'),
|
|
|
|
binary.Dep('JIT/amxjitsn-darwin.o'),
|
|
|
|
binary.Dep('JIT/natives-darwin-x86.o'),
|
|
|
|
binary.Dep('JIT/helpers-darwin-x86.o'),
|
|
|
|
]
|
2017-12-07 17:45:16 +00:00
|
|
|
binary.compiler.postlink += [
|
|
|
|
'-Wl,-read_only_relocs,suppress'
|
|
|
|
]
|
2014-02-08 09:14:15 +00:00
|
|
|
elif builder.target_platform == 'linux':
|
|
|
|
jit_objects = [
|
|
|
|
binary.Dep('JIT/amxexecn.o'),
|
|
|
|
binary.Dep('JIT/amxjitsn.o'),
|
|
|
|
binary.Dep('JIT/natives-x86.o'),
|
|
|
|
binary.Dep('JIT/helpers-x86.o'),
|
|
|
|
]
|
2014-02-09 00:09:29 +00:00
|
|
|
elif builder.target_platform == 'windows':
|
|
|
|
jit_objects = [
|
|
|
|
binary.Dep('JIT/amxexecn.obj'),
|
|
|
|
binary.Dep('JIT/amxjitsn.obj'),
|
|
|
|
binary.Dep('JIT/helpers-x86.obj'),
|
|
|
|
binary.Dep('JIT/natives-x86.obj'),
|
|
|
|
]
|
2017-12-07 17:45:16 +00:00
|
|
|
binary.compiler.linkflags += [
|
|
|
|
'/EXPORT:GiveFnptrsToDll=_GiveFnptrsToDll@8,@1',
|
|
|
|
'/SECTION:.data,RW',
|
|
|
|
]
|
2014-02-08 09:14:15 +00:00
|
|
|
|
2014-02-08 23:25:57 +00:00
|
|
|
binary.compiler.linkflags += jit_objects
|
2017-08-05 08:32:16 +00:00
|
|
|
binary.compiler.linkflags += [AMXX.zlib.binary, AMXX.hashing.binary, AMXX.utf8rewind.binary]
|
2014-02-08 23:25:57 +00:00
|
|
|
|
2014-02-08 09:14:15 +00:00
|
|
|
binary.sources = [
|
|
|
|
'meta_api.cpp',
|
|
|
|
'CVault.cpp',
|
|
|
|
'vault.cpp',
|
|
|
|
'float.cpp',
|
|
|
|
'file.cpp',
|
|
|
|
'modules.cpp',
|
|
|
|
'CMisc.cpp',
|
|
|
|
'CTask.cpp',
|
|
|
|
'string.cpp',
|
|
|
|
'amxmodx.cpp',
|
|
|
|
'CEvent.cpp',
|
|
|
|
'CCmd.cpp',
|
|
|
|
'CLogEvent.cpp',
|
|
|
|
'srvcmd.cpp',
|
|
|
|
'strptime.cpp',
|
|
|
|
'amxcore.cpp',
|
|
|
|
'amxtime.cpp',
|
|
|
|
'power.cpp',
|
|
|
|
'amxxlog.cpp',
|
|
|
|
'fakemeta.cpp',
|
|
|
|
'amxxfile.cpp',
|
|
|
|
'CLang.cpp',
|
|
|
|
'emsg.cpp',
|
|
|
|
'CForward.cpp',
|
|
|
|
'CPlugin.cpp',
|
|
|
|
'CModule.cpp',
|
|
|
|
'CMenu.cpp',
|
|
|
|
'util.cpp',
|
|
|
|
'amx.cpp',
|
|
|
|
'amxdbg.cpp',
|
|
|
|
'natives.cpp',
|
|
|
|
'newmenus.cpp',
|
|
|
|
'debugger.cpp',
|
|
|
|
'optimizer.cpp',
|
|
|
|
'format.cpp',
|
|
|
|
'messages.cpp',
|
|
|
|
'libraries.cpp',
|
|
|
|
'vector.cpp',
|
|
|
|
'sorting.cpp',
|
|
|
|
'nongpl_matches.cpp',
|
|
|
|
'CFlagManager.cpp',
|
|
|
|
'datastructs.cpp',
|
|
|
|
'trie_natives.cpp',
|
2014-04-11 20:57:42 +00:00
|
|
|
'CDataPack.cpp',
|
2014-07-23 16:51:57 +00:00
|
|
|
'datapacks.cpp',
|
|
|
|
'stackstructs.cpp',
|
2014-07-21 19:12:35 +00:00
|
|
|
'CTextParsers.cpp',
|
|
|
|
'textparse.cpp',
|
2015-01-21 22:58:01 +00:00
|
|
|
'CvarManager.cpp',
|
2015-01-16 21:27:24 +00:00
|
|
|
'cvars.cpp',
|
2015-06-23 17:39:01 +00:00
|
|
|
'../public/memtools/MemoryUtils.cpp',
|
2015-01-16 21:27:24 +00:00
|
|
|
'../public/memtools/CDetour/detours.cpp',
|
|
|
|
'../public/memtools/CDetour/asm/asm.c',
|
2017-03-09 18:59:38 +00:00
|
|
|
'../public/resdk/mod_rehlds_api.cpp',
|
2015-03-08 22:45:27 +00:00
|
|
|
'CLibrarySys.cpp',
|
2015-06-23 17:39:01 +00:00
|
|
|
'CGameConfigs.cpp',
|
2015-06-24 15:45:12 +00:00
|
|
|
'gameconfigs.cpp',
|
2015-07-19 19:06:43 +00:00
|
|
|
'CoreConfig.cpp',
|
2014-02-08 09:14:15 +00:00
|
|
|
]
|
|
|
|
|
2014-02-09 04:53:01 +00:00
|
|
|
if builder.target_platform == 'windows':
|
|
|
|
binary.sources += ['version.rc']
|
|
|
|
|
2014-02-08 09:14:15 +00:00
|
|
|
AMXX.binaries += [builder.Add(binary)]
|