first commit
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||
import os
|
||||
|
||||
libcurl = builder.Build('curl/lib/AMBuilder')
|
||||
libjansson = builder.Build('jansson/src/AMBuilder')
|
||||
libmbedtls = builder.Build('mbedtls/library/AMBuilder')
|
||||
libnghttp2 = builder.Build('nghttp2/lib/AMBuilder')
|
||||
libuv = builder.Build('libuv/src/AMBuilder')
|
||||
libz = builder.Build('zlib/AMBuilder')
|
||||
|
||||
for cxx in builder.targets:
|
||||
binary = Extension.Library(builder, cxx, 'rip.ext')
|
||||
arch = binary.compiler.target.arch
|
||||
|
||||
binary.sources += [
|
||||
'extension.cpp',
|
||||
'httpclient.cpp',
|
||||
'httprequest.cpp',
|
||||
'httprequestcontext.cpp',
|
||||
'httpfilecontext.cpp',
|
||||
'httpformcontext.cpp',
|
||||
'http_natives.cpp',
|
||||
'json_natives.cpp',
|
||||
os.path.join(Extension.sm_root, 'public', 'smsdk_ext.cpp'),
|
||||
]
|
||||
|
||||
binary.compiler.includes += [
|
||||
os.path.join(builder.sourcePath, 'curl', 'include'),
|
||||
os.path.join(builder.sourcePath, 'jansson', 'include'),
|
||||
os.path.join(builder.sourcePath, 'libuv', '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,
|
||||
libjansson[arch].binary,
|
||||
libmbedtls[arch].binary,
|
||||
libnghttp2[arch].binary,
|
||||
libuv[arch].binary,
|
||||
libz[arch].binary,
|
||||
]
|
||||
|
||||
if binary.compiler.target.platform == 'linux':
|
||||
binary.compiler.postlink += ['-lrt']
|
||||
elif binary.compiler.target.platform == 'windows':
|
||||
binary.compiler.postlink += [
|
||||
'iphlpapi.lib',
|
||||
'psapi.lib',
|
||||
'userenv.lib',
|
||||
'ws2_32.lib',
|
||||
]
|
||||
|
||||
Extension.extensions += [builder.Add(binary)]
|
||||
Reference in New Issue
Block a user