diff options
Diffstat (limited to 'AMBuilder')
-rw-r--r-- | AMBuilder | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/AMBuilder b/AMBuilder new file mode 100644 index 0000000..4896901 --- /dev/null +++ b/AMBuilder @@ -0,0 +1,35 @@ +import os + +Extension.configure() + +projectName = 'curl' + +ext = builder.compiler.Library(projectName + '.ext') +Extension.ConfigureForExtension(builder, ext.compiler) + +ext.sources += [os.path.join(Extension.sm_root, 'public', 'smsdk_ext.cpp')] +ext.sources += [os.path.join('extension', p) for p in [ + 'curlmanager.cpp', + 'curlthread.cpp', + 'extension.cpp', + 'natives.cpp', + 'opensslmanager.cpp', + 'opensslthread.cpp' +]] + +# pkg_config fix never got backported to 2.0 +import types +from ambuild2.frontend.v2_2.cpp.compiler import CliCompiler +def run_pkg_config(self, argv): + return CliCompiler.run_pkg_config(argv) +ext.compiler.run_pkg_config = types.MethodType(run_pkg_config, ext.compiler) + +ext.compiler.cxxincludes += [ + os.path.join(builder.currentSourcePath, 'extension'), + os.path.join(Extension.mms_root, 'core', 'sourcehook') +] +ext.compiler.cxxflags += ['-Wno-error=deprecated-declarations'] +ext.compiler.pkg_config('libcurl', link='static') +ext.compiler.pkg_config('openssl', link='static') + +Extension.extensions += [builder.Add(ext)] |