X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Farchitecture.h;h=f60381f9905ddb6573c304470b0be7304aed6a9d;hb=0c83b922e56976a30506d9f8d43c9dcd38d573b5;hp=aa5f8650ddae92803114d9ffd98049b9e6647071;hpb=04c316da6d5d90e43cba262f54d90ca231f703bf;p=builder.git diff --git a/source/architecture.h b/source/architecture.h index aa5f865..f60381f 100644 --- a/source/architecture.h +++ b/source/architecture.h @@ -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 +#include "buildinfo.h" #include "misc.h" class Builder; @@ -31,18 +25,34 @@ 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; + BuildInfo build_info; 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; } + 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; } + + const BuildInfo &get_build_info() const { return build_info; } + +private: + std::string resolve_alias(const std::string &) const; + void parse_specification(const std::string &); }; typedef std::map ArchMap;