2014-02-08 13:14:15 +04:00
|
|
|
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
|
|
|
import os.path
|
|
|
|
|
|
|
|
binary = AMXX.Program(builder, 'amxxpc')
|
|
|
|
|
|
|
|
binary.compiler.defines += [
|
|
|
|
'AMX_ANSIONLY',
|
|
|
|
]
|
2014-02-09 04:09:29 +04:00
|
|
|
|
2014-08-02 23:29:53 +04:00
|
|
|
if builder.compiler.like('gcc'):
|
2014-02-09 04:09:29 +04:00
|
|
|
binary.compiler.cxxflags.remove('-fno-exceptions')
|
2014-02-08 13:14:15 +04:00
|
|
|
|
|
|
|
if builder.target_platform == 'linux':
|
|
|
|
binary.compiler.postlink += [
|
|
|
|
'-ldl',
|
2014-04-20 23:52:50 +04:00
|
|
|
binary.Dep(AMXX.stdcxx_path),
|
2014-02-08 13:14:15 +04:00
|
|
|
]
|
|
|
|
elif builder.target_platform == 'windows':
|
2014-02-09 04:09:29 +04:00
|
|
|
binary.compiler.defines += ['_MBCS']
|
|
|
|
binary.compiler.linkflags.remove('/SUBSYSTEM:WINDOWS')
|
|
|
|
binary.compiler.linkflags.append('/SUBSYSTEM:CONSOLE')
|
2014-02-08 13:14:15 +04:00
|
|
|
|
|
|
|
binary.sources = [
|
|
|
|
'amx.cpp',
|
|
|
|
'amxxpc.cpp',
|
|
|
|
'Binary.cpp',
|
2014-08-16 03:33:33 +04:00
|
|
|
'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',
|
2014-02-08 13:14:15 +04:00
|
|
|
]
|
|
|
|
|
2014-02-09 08:53:01 +04:00
|
|
|
if builder.target_platform == 'windows':
|
|
|
|
binary.sources += ['amxxpc1.rc']
|
|
|
|
|
2014-02-09 00:42:00 +04:00
|
|
|
AMXX.amxxpc = builder.Add(binary)
|