X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Farchitecture.h;h=153230244f6aedfdce7fd6a5648619108fe93d12;hb=HEAD;hp=f60381f9905ddb6573c304470b0be7304aed6a9d;hpb=43bd25ffcb0b4f7882773f4676b209a99cb73c04;p=builder.git diff --git a/source/architecture.h b/source/architecture.h deleted file mode 100644 index f60381f..0000000 --- a/source/architecture.h +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef ARCHITECTURE_H_ -#define ARCHITECTURE_H_ - -#include -#include "buildinfo.h" -#include "misc.h" - -class Builder; - -// XXX Add lib/exe prefix/suffix fields. Some archs may need multiple alternatives, how to handle this? -class Architecture -{ -public: - class Loader: public Msp::DataFile::Loader - { - private: - Architecture &arch; - - public: - Loader(Architecture &); - Architecture &get_object() { return arch; } - private: - void tool(const std::string &t, const std::string &p); - }; - -private: - Builder &builder; - std::string type; - std::string cpu; - std::string system; - unsigned bits; - std::string name; - bool native; - std::string cross_prefix; - StringMap tools; - BuildInfo build_info; - -public: - 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; } - - 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; - -#endif