2015-05-24 04:57:44 +02:00
|
|
|
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
|
|
|
import os
|
|
|
|
|
2017-01-08 16:36:28 +01:00
|
|
|
binary = builder.compiler.Library('AsyncSocket.ext')
|
2015-05-24 04:57:44 +02:00
|
|
|
AsyncSocket.ConfigureForExtension(builder, binary.compiler)
|
|
|
|
|
|
|
|
binary.compiler.includes += [
|
2016-12-24 12:12:27 +01:00
|
|
|
os.path.join(builder.sourcePath, 'extension', 'libuv', 'include')
|
2015-05-24 04:57:44 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
binary.sources += [
|
|
|
|
'extension.cpp',
|
|
|
|
'context.cpp',
|
|
|
|
os.path.join(AsyncSocket.sm_root, 'public', 'smsdk_ext.cpp')
|
|
|
|
]
|
|
|
|
|
2016-12-24 12:12:27 +01:00
|
|
|
binary.compiler.defines += [
|
|
|
|
'SOURCEMOD_BUILD'
|
|
|
|
]
|
2015-05-24 04:57:44 +02:00
|
|
|
|
2016-12-24 12:12:27 +01:00
|
|
|
binary.compiler.postlink += [
|
|
|
|
os.path.join(builder.sourcePath, 'extension', 'libuv', 'libuv.a')
|
|
|
|
]
|
2015-05-24 04:57:44 +02:00
|
|
|
|
|
|
|
if builder.target_platform == 'windows':
|
|
|
|
binary.compiler.linkflags += ['ws2_32.lib']
|
|
|
|
|
2016-12-24 12:12:27 +01:00
|
|
|
AsyncSocket.extensions += [
|
|
|
|
builder.Add(binary)
|
|
|
|
]
|