/builder
/builder.pc
/builder-stage1
+/clangtools.dlm
+/gnutools.dlm
/libbuilder.a
/libbuilder.so
/libandroidtools.a
/libbuiltintools.a
-/libclangtools.a
/libdatatools.a
-/libgnutools.a
-/libmsvctools.a
+/msvctools.dlm
/temp
default false;
};
- library "gnutools"
- {
- source "plugins/gnu";
- default false;
- };
-
- library "clangtools"
- {
- source "plugins/clang";
- default false;
- };
-
- library "msvctools"
- {
- source "plugins/msvc";
- default false;
- };
-
library "androidtools"
{
source "plugins/android";
{
source "source/lib";
use "builtintools";
- use "gnutools";
- use "clangtools";
- use "msvctools";
use "androidtools";
use "datatools";
build_info
install true;
};
+ module "gnutools"
+ {
+ source "plugins/gnu";
+ install true;
+ };
+
+ module "clangtools"
+ {
+ source "plugins/clang";
+ install true;
+ };
+
+ module "msvctools"
+ {
+ source "plugins/msvc";
+ install true;
+ };
+
source_archive
{
source "bootstrap.sh";
--- /dev/null
+#include "clangplugin.h"
+#include "clangtools.h"
+
+void ClangPlugin::add_tools(Toolchain &toolchain, const Architecture &arch) const
+{
+ toolchain.add_toolchain(new ClangTools(builder, arch));
+}
+
+
+extern "C"
+Plugin *create_plugin(Builder &builder)
+{
+ return new ClangPlugin(builder);
+}
--- /dev/null
+#ifndef CLANGPLUGIN_H_
+#define CLANGPLUGIN_H_
+
+#include <msp/builder/plugin.h>
+
+class ClangPlugin: public Plugin
+{
+public:
+ ClangPlugin(Builder &b): Plugin(b) { }
+
+ void add_tools(Toolchain &, const Architecture &) const override;
+};
+
+#endif
--- /dev/null
+#include "gnuplugin.h"
+#include "gnutools.h"
+
+void GnuPlugin::add_tools(Toolchain &toolchain, const Architecture &arch) const
+{
+ toolchain.add_toolchain(new GnuTools(builder, arch));
+}
+
+
+extern "C"
+Plugin *create_plugin(Builder &builder)
+{
+ return new GnuPlugin(builder);
+}
--- /dev/null
+#ifndef GNUPLUGIN_H_
+#define GNUPLUGIN_H_
+
+#include <msp/builder/plugin.h>
+
+class GnuPlugin: public Plugin
+{
+public:
+ GnuPlugin(Builder &b): Plugin(b) { }
+
+ void add_tools(Toolchain &, const Architecture &) const override;
+};
+
+#endif
--- /dev/null
+#include <msp/builder/architecture.h>
+#include "microsofttools.h"
+#include "msvcplugin.h"
+
+void MsvcPlugin::add_tools(Toolchain &toolchain, const Architecture &arch) const
+{
+ if(arch.get_system()=="windows")
+ toolchain.add_toolchain(new MicrosoftTools(builder, arch));
+}
+
+
+extern "C"
+Plugin *create_plugin(Builder &builder)
+{
+ return new MsvcPlugin(builder);
+}
--- /dev/null
+#ifndef MSVCPLUGIN_H_
+#define MSVCPLUGIN_H_
+
+#include <msp/builder/plugin.h>
+
+class MsvcPlugin: public Plugin
+{
+public:
+ MsvcPlugin(Builder &b): Plugin(b) { }
+
+ void add_tools(Toolchain &, const Architecture &) const override;
+};
+
+#endif
#include "binarypackage.h"
#include "builder.h"
#include "builtin/builtintools.h"
-#include "clang/clangtools.h"
#include "datafile/datatool.h"
-#include "gnu/gnutools.h"
#include "installedfile.h"
-#include "msvc/microsofttools.h"
#include "package.h"
#include "plugin.h"
#include "sharedlibrary.h"
void Builder::add_default_tools()
{
- toolchain.add_toolchain(new GnuTools(*this, *current_arch));
- toolchain.add_toolchain(new ClangTools(*this, *current_arch));
if(current_arch->get_system()=="android")
toolchain.add_toolchain(new AndroidTools(*this, *current_arch));
- if(current_arch->get_system()=="windows")
- toolchain.add_toolchain(new MicrosoftTools(*this, *current_arch));
toolchain.add_toolchain(new BuiltinTools(*this));
toolchain.add_tool(new DataTool(*this));
for(const LoadedPlugin &p: plugins)