From 2b2802fc59798480872b9e03b5c2187394c6fbc6 Mon Sep 17 00:00:00 2001 From: yuuko Date: Sun, 25 Aug 2024 14:26:48 -0700 Subject: treewide: nuke vendoring, make -> ambuild MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit “GOODBYE DIRT” -derek bum --- AMBuilder | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 AMBuilder (limited to 'AMBuilder') 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)] -- cgit v1.2.3