3 This file is part of builder
4 Copyright © 2007-2010 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #ifndef ARCHITECTURE_H_
9 #define ARCHITECTURE_H_
11 #include <msp/datafile/loader.h>
12 #include "buildinfo.h"
17 // XXX Add lib/exe prefix/suffix fields. Some archs may need multiple alternatives, how to handle this?
21 class Loader: public Msp::DataFile::Loader
27 Loader(Architecture &);
28 Architecture &get_object() { return arch; }
30 void tool(const std::string &t, const std::string &p);
41 std::string cross_prefix;
46 Architecture(Builder &b, const std::string &spec);
48 const std::string &get_name() const { return name; }
49 const std::string &get_system() const { return system; }
50 bool match_name(const std::string &) const;
51 bool is_native() const { return native; }
53 void set_tool(const std::string &t, const std::string &p);
54 void set_cross_prefix(const std::string &);
55 std::string get_tool(const std::string &t) const;
56 const std::string &get_cross_prefix() const { return cross_prefix; }
58 const BuildInfo &get_build_info() const { return build_info; }
61 std::string resolve_alias(const std::string &) const;
62 void parse_specification(const std::string &);
65 typedef std::map<std::string, Architecture> ArchMap;