64-bit support for CSGO on Linux and macOS (#705)
This commit is contained in:
+21
-21
@@ -2,27 +2,27 @@
|
||||
import os
|
||||
|
||||
libcurl = builder.Build('curl-src/lib/AMBuilder')
|
||||
for arch in SM.archs:
|
||||
binary = SM.ExtLibrary(builder, 'webternet.ext', arch)
|
||||
binary.compiler.includes += [
|
||||
os.path.join(builder.sourcePath, 'extensions', 'curl', 'curl-src', 'include')
|
||||
]
|
||||
binary.compiler.defines += ['CURL_STATICLIB']
|
||||
if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang':
|
||||
binary.compiler.cxxflags += ['-fno-rtti']
|
||||
elif binary.compiler.family == 'msvc':
|
||||
binary.compiler.cxxflags += ['/GR-']
|
||||
binary.compiler.postlink += [libcurl[arch].binary]
|
||||
if builder.target.platform == 'linux':
|
||||
binary.compiler.postlink += ['-lrt']
|
||||
elif builder.target.platform == 'windows':
|
||||
binary.compiler.postlink += ['ws2_32.lib']
|
||||
|
||||
binary = SM.ExtLibrary(builder, 'webternet.ext')
|
||||
binary.compiler.includes += [
|
||||
os.path.join(builder.sourcePath, 'extensions', 'curl', 'curl-src', 'include')
|
||||
]
|
||||
binary.compiler.defines += ['CURL_STATICLIB']
|
||||
if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang':
|
||||
binary.compiler.cxxflags += ['-fno-rtti']
|
||||
elif binary.compiler.family == 'msvc':
|
||||
binary.compiler.cxxflags += ['/GR-']
|
||||
binary.compiler.postlink += [libcurl.binary]
|
||||
if builder.target.platform == 'linux':
|
||||
binary.compiler.postlink += ['-lrt']
|
||||
elif builder.target.platform == 'windows':
|
||||
binary.compiler.postlink += ['ws2_32.lib']
|
||||
binary.sources += [
|
||||
'extension.cpp',
|
||||
'curlapi.cpp',
|
||||
'../../public/smsdk_ext.cpp'
|
||||
]
|
||||
|
||||
binary.sources += [
|
||||
'extension.cpp',
|
||||
'curlapi.cpp',
|
||||
'../../public/smsdk_ext.cpp'
|
||||
]
|
||||
|
||||
SM.extensions += [builder.Add(binary)]
|
||||
SM.extensions += [builder.Add(binary)]
|
||||
|
||||
|
||||
@@ -3,96 +3,98 @@ import os, platform
|
||||
|
||||
builder.SetBuildFolder('libcurl')
|
||||
|
||||
binary = SM.StaticLibrary(builder, 'curl')
|
||||
binary.compiler.includes += [
|
||||
os.path.join(builder.sourcePath, 'extensions', 'curl', 'curl-src', 'lib'),
|
||||
os.path.join(builder.sourcePath, 'extensions', 'curl', 'curl-src', 'include')
|
||||
]
|
||||
|
||||
if builder.target.platform == 'mac':
|
||||
mac_version, ignore, ignore = platform.mac_ver()
|
||||
mac_tuple = mac_version.split('.')
|
||||
if int(mac_tuple[0]) >= 10 and int(mac_tuple[1]) >= 9:
|
||||
binary.compiler.defines += ['BUILTIN_STRLCAT']
|
||||
elif builder.target.platform == 'windows':
|
||||
binary.compiler.defines += [
|
||||
'BUILDING_LIBCURL',
|
||||
'CURL_STATICLIB',
|
||||
'CURL_DISABLE_LDAP',
|
||||
rvalue = {}
|
||||
for arch in SM.archs:
|
||||
binary = SM.StaticLibrary(builder, 'curl', arch)
|
||||
binary.compiler.includes += [
|
||||
os.path.join(builder.sourcePath, 'extensions', 'curl', 'curl-src', 'lib'),
|
||||
os.path.join(builder.sourcePath, 'extensions', 'curl', 'curl-src', 'include')
|
||||
]
|
||||
elif builder.target.platform == 'linux':
|
||||
binary.compiler.defines += ['_GNU_SOURCE']
|
||||
|
||||
if binary.compiler.family == 'clang':
|
||||
# https://llvm.org/bugs/show_bug.cgi?id=16428
|
||||
binary.compiler.cflags += ['-Wno-attributes']
|
||||
if builder.target.platform == 'mac':
|
||||
mac_version, ignore, ignore = platform.mac_ver()
|
||||
mac_tuple = mac_version.split('.')
|
||||
if int(mac_tuple[0]) >= 10 and int(mac_tuple[1]) >= 9:
|
||||
binary.compiler.defines += ['BUILTIN_STRLCAT']
|
||||
elif builder.target.platform == 'windows':
|
||||
binary.compiler.defines += [
|
||||
'BUILDING_LIBCURL',
|
||||
'CURL_STATICLIB',
|
||||
'CURL_DISABLE_LDAP',
|
||||
]
|
||||
elif builder.target.platform == 'linux':
|
||||
binary.compiler.defines += ['_GNU_SOURCE']
|
||||
|
||||
binary.sources += [
|
||||
'base64.c',
|
||||
'connect.c',
|
||||
'content_encoding.c',
|
||||
'cookie.c',
|
||||
'curl_addrinfo.c',
|
||||
'dict.c',
|
||||
'easy.c',
|
||||
'escape.c',
|
||||
'file.c',
|
||||
'formdata.c',
|
||||
'ftp.c',
|
||||
'getenv.c',
|
||||
'getinfo.c',
|
||||
'gtls.c',
|
||||
'hash.c',
|
||||
'hostares.c',
|
||||
'hostasyn.c',
|
||||
'hostip.c',
|
||||
'hostip4.c',
|
||||
'hostip6.c',
|
||||
'hostsyn.c',
|
||||
'hostthre.c',
|
||||
'http.c',
|
||||
'http_chunks.c',
|
||||
'http_digest.c',
|
||||
'http_negotiate.c',
|
||||
'http_ntlm.c',
|
||||
'if2ip.c',
|
||||
'inet_ntop.c',
|
||||
'inet_pton.c',
|
||||
'krb4.c',
|
||||
'krb5.c',
|
||||
'ldap.c',
|
||||
'llist.c',
|
||||
'md5.c',
|
||||
'memdebug.c',
|
||||
'mprintf.c',
|
||||
'multi.c',
|
||||
'netrc.c',
|
||||
'nss.c',
|
||||
'parsedate.c',
|
||||
'progress.c',
|
||||
'qssl.c',
|
||||
'rawstr.c',
|
||||
'security.c',
|
||||
'select.c',
|
||||
'sendf.c',
|
||||
'share.c',
|
||||
'socks.c',
|
||||
'speedcheck.c',
|
||||
'splay.c',
|
||||
'ssh.c',
|
||||
'sslgen.c',
|
||||
'ssluse.c',
|
||||
'strdup.c',
|
||||
'strequal.c',
|
||||
'strerror.c',
|
||||
'strtok.c',
|
||||
'strtoofft.c',
|
||||
'telnet.c',
|
||||
'tftp.c',
|
||||
'timeval.c',
|
||||
'transfer.c',
|
||||
'url.c',
|
||||
'version.c'
|
||||
]
|
||||
rvalue = builder.Add(binary)
|
||||
if binary.compiler.family == 'clang':
|
||||
# https://llvm.org/bugs/show_bug.cgi?id=16428
|
||||
binary.compiler.cflags += ['-Wno-attributes']
|
||||
|
||||
binary.sources += [
|
||||
'base64.c',
|
||||
'connect.c',
|
||||
'content_encoding.c',
|
||||
'cookie.c',
|
||||
'curl_addrinfo.c',
|
||||
'dict.c',
|
||||
'easy.c',
|
||||
'escape.c',
|
||||
'file.c',
|
||||
'formdata.c',
|
||||
'ftp.c',
|
||||
'getenv.c',
|
||||
'getinfo.c',
|
||||
'gtls.c',
|
||||
'hash.c',
|
||||
'hostares.c',
|
||||
'hostasyn.c',
|
||||
'hostip.c',
|
||||
'hostip4.c',
|
||||
'hostip6.c',
|
||||
'hostsyn.c',
|
||||
'hostthre.c',
|
||||
'http.c',
|
||||
'http_chunks.c',
|
||||
'http_digest.c',
|
||||
'http_negotiate.c',
|
||||
'http_ntlm.c',
|
||||
'if2ip.c',
|
||||
'inet_ntop.c',
|
||||
'inet_pton.c',
|
||||
'krb4.c',
|
||||
'krb5.c',
|
||||
'ldap.c',
|
||||
'llist.c',
|
||||
'md5.c',
|
||||
'memdebug.c',
|
||||
'mprintf.c',
|
||||
'multi.c',
|
||||
'netrc.c',
|
||||
'nss.c',
|
||||
'parsedate.c',
|
||||
'progress.c',
|
||||
'qssl.c',
|
||||
'rawstr.c',
|
||||
'security.c',
|
||||
'select.c',
|
||||
'sendf.c',
|
||||
'share.c',
|
||||
'socks.c',
|
||||
'speedcheck.c',
|
||||
'splay.c',
|
||||
'ssh.c',
|
||||
'sslgen.c',
|
||||
'ssluse.c',
|
||||
'strdup.c',
|
||||
'strequal.c',
|
||||
'strerror.c',
|
||||
'strtok.c',
|
||||
'strtoofft.c',
|
||||
'telnet.c',
|
||||
'tftp.c',
|
||||
'timeval.c',
|
||||
'transfer.c',
|
||||
'url.c',
|
||||
'version.c'
|
||||
]
|
||||
rvalue[arch] = builder.Add(binary)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user