#include <msp/time/utils.h>
#include "binarypackage.h"
#include "builder.h"
-#include "copy.h"
+#include "builtintools.h"
#include "datatool.h"
-#include "gnuarchiver.h"
-#include "gnuccompiler.h"
-#include "gnucxxcompiler.h"
-#include "gnulinker.h"
+#include "gnutools.h"
#include "installedfile.h"
-#include "mingwdlltool.h"
#include "package.h"
-#include "pkgconfiggenerator.h"
#include "sharedlibrary.h"
#include "sourcepackage.h"
-#include "tar.h"
#include "task.h"
#include "virtualtarget.h"
void Builder::add_default_tools()
{
- toolchain.add_tool(new GnuCCompiler(*this, *current_arch));
- toolchain.add_tool(new GnuCxxCompiler(*this, *current_arch));
- toolchain.add_tool(new GnuLinker(*this, *current_arch));
- toolchain.add_tool(new GnuArchiver(*this, *current_arch));
- toolchain.add_tool(new Copy(*this));
- toolchain.add_tool(new Tar(*this));
- toolchain.add_tool(new PkgConfigGenerator(*this));
- if(current_arch->get_system()=="windows")
- toolchain.add_tool(new MingwDllTool(*this, *current_arch));
+ toolchain.add_toolchain(new GnuTools(*this, *current_arch));
+ toolchain.add_toolchain(new BuiltinTools(*this));
toolchain.add_tool(new DataTool(*this));
}
--- /dev/null
+#include "builtintools.h"
+#include "copy.h"
+#include "pkgconfiggenerator.h"
+#include "tar.h"
+
+BuiltinTools::BuiltinTools(Builder &builder)
+{
+ add_tool(new Copy(builder));
+ add_tool(new Tar(builder));
+ add_tool(new PkgConfigGenerator(builder));
+}
--- /dev/null
+#include "architecture.h"
+#include "gnuarchiver.h"
+#include "gnuccompiler.h"
+#include "gnucxxcompiler.h"
+#include "gnulinker.h"
+#include "gnutools.h"
+#include "mingwdlltool.h"
+
+GnuTools::GnuTools(Builder &builder, const Architecture &arch)
+{
+ add_tool(new GnuCCompiler(builder, arch));
+ add_tool(new GnuCxxCompiler(builder, arch));
+ add_tool(new GnuLinker(builder, arch));
+ add_tool(new GnuArchiver(builder, arch));
+ if(arch.get_system()=="windows")
+ add_tool(new MingwDllTool(builder, arch));
+}