2013-12-30 23:50:57 +01:00
|
|
|
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python :
|
|
|
|
import os
|
2009-08-30 09:46:56 +02:00
|
|
|
|
2013-12-30 23:50:57 +01:00
|
|
|
libcurl = builder.RunScript('curl-src/lib/AMBuilder')
|
2009-08-30 09:46:56 +02:00
|
|
|
|
2013-12-30 23:50:57 +01:00
|
|
|
binary = SM.ExtLibrary(builder, 'webternet.ext')
|
|
|
|
binary.compiler.includes += [
|
|
|
|
os.path.join(builder.sourcePath, 'extensions', 'curl', 'curl-src', 'include')
|
|
|
|
]
|
|
|
|
binary.compiler.defines += ['CURL_STATICLIB']
|
2014-09-12 02:28:24 +02:00
|
|
|
if binary.compiler.vendor == 'gcc' or binary.compiler.vendor == 'clang':
|
|
|
|
binary.compiler.cxxflags += ['-fno-rtti']
|
|
|
|
elif binary.compiler.vendor == 'msvc':
|
|
|
|
binary.compiler.cxxflags += ['/GR-']
|
2013-12-30 23:50:57 +01:00
|
|
|
binary.compiler.postlink += [libcurl.binary]
|
2014-02-10 05:50:20 +01:00
|
|
|
if builder.target_platform == 'linux':
|
2013-12-30 23:50:57 +01:00
|
|
|
binary.compiler.postlink += ['-lrt']
|
2014-02-10 05:50:20 +01:00
|
|
|
elif builder.target_platform == 'windows':
|
2013-12-30 23:50:57 +01:00
|
|
|
binary.compiler.postlink += ['ws2_32.lib']
|
2009-08-30 09:46:56 +02:00
|
|
|
|
2013-12-30 23:50:57 +01:00
|
|
|
binary.sources += [
|
|
|
|
'extension.cpp',
|
|
|
|
'curlapi.cpp',
|
2014-04-24 04:19:28 +02:00
|
|
|
'../../public/smsdk_ext.cpp'
|
2013-12-30 23:50:57 +01:00
|
|
|
]
|
2009-08-30 09:46:56 +02:00
|
|
|
|
2013-12-30 23:50:59 +01:00
|
|
|
SM.extensions += [builder.Add(binary)]
|
2012-04-14 02:12:24 +02:00
|
|
|
|