sm-ext-AsyncSocket/extension/AMBuilder
2015-05-23 22:57:44 -04:00

24 lines
715 B
Python

# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
import os
binary = builder.compiler.Library('async_socket.ext')
AsyncSocket.ConfigureForExtension(builder, binary.compiler)
binary.compiler.includes += [
os.path.join(builder.sourcePath, 'extension', 'libs', 'libuv-v1.5.0', 'include')
]
binary.sources += [
'extension.cpp',
'context.cpp',
os.path.join(AsyncSocket.sm_root, 'public', 'smsdk_ext.cpp')
]
binary.compiler.defines += ['SOURCEMOD_BUILD']
binary.compiler.postlink += [os.path.join(builder.sourcePath, 'extension', 'libs', 'libuv-v1.5.0', '.libs', 'libuv.a')]
if builder.target_platform == 'windows':
binary.compiler.linkflags += ['ws2_32.lib']
AsyncSocket.extensions += [builder.Add(binary)]