]> git.tdb.fi Git - builder.git/blobdiff - source/architecture.h
Drop some deprecated datafile statements from Component
[builder.git] / source / architecture.h
index 3a4d7ec50d966f44d19cdc95f19d8133e3319aa6..1f643dc325b4a1512170d95b50b22871b84de5bd 100644 (file)
@@ -1,14 +1,8 @@
-/* $Id$
-
-This file is part of builder
-Copyright © 2007-2009  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #ifndef ARCHITECTURE_H_
 #define ARCHITECTURE_H_
 
 #include <msp/datafile/loader.h>
+#include "buildinfo.h"
 #include "misc.h"
 
 class Builder;
@@ -31,18 +25,33 @@ public:
 
 private:
        Builder &builder;
+       std::string type;
+       std::string cpu;
+       std::string system;
+       unsigned bits;
        std::string name;
        bool native;
-       std::string prefix;
+       std::string cross_prefix;
        StringMap tools;
 
 public:
-       Architecture(Builder &b, const std::string &n, bool a=false);
-       void set_tool(const std::string &t, const std::string &p);
-       std::string get_tool(const std::string &t) const;
+       Architecture(Builder &b, const std::string &spec);
+
        const std::string &get_name() const { return name; }
+       const std::string &get_system() const { return system; }
+       unsigned get_bits() const { return bits; }
+       const std::string &get_cpu() const { return cpu; }
+       bool match_name(const std::string &) const;
        bool is_native() const { return native; }
-       const std::string &get_prefix() const { return prefix; }
+
+       void set_tool(const std::string &t, const std::string &p);
+       void set_cross_prefix(const std::string &);
+       std::string get_tool(const std::string &t) const;
+       const std::string &get_cross_prefix() const { return cross_prefix; }
+
+private:
+       std::string resolve_alias(const std::string &) const;
+       void parse_specification(const std::string &);
 };
 
 typedef std::map<std::string, Architecture> ArchMap;