X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Farchitecture.cpp;h=627ba66ccf6ab6defbcaa960c09fbca775845b14;hb=HEAD;hp=50013e88de7adc955dbb37b10f0ac381edbf65a9;hpb=329dc80e392faf7354338621e73dba1880fc767d;p=builder.git diff --git a/source/architecture.cpp b/source/architecture.cpp deleted file mode 100644 index 50013e8..0000000 --- a/source/architecture.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* $Id$ - -This file is part of builder -Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - -#include "architecture.h" -#include "builder.h" - -using namespace std; -using namespace Msp; - -Architecture::Architecture(Builder &b, const string &n): - builder(b), - name(n) -{ } - -void Architecture::set_tool(const string &t, const string &p) -{ - tools[t]=p; -} - -std::string Architecture::get_tool(const string &t) const -{ - StringMap::const_iterator i=tools.find(t); - if(i!=tools.end()) - { - if(i->second[0]=='-') - return prefix+i->second; - else - return i->second; - } - - if(name!="native") - { - const Architecture &native=builder.get_architecture("native"); - return prefix+"-"+native.get_tool(t); - } - else - throw KeyError("Unknown tool"); -} - - -Architecture::Loader::Loader(Architecture &a): - arch(a) -{ - add("prefix", &Architecture::prefix); - add("tool", &Loader::tool); -} - -void Architecture::Loader::tool(const string &t, const string &p) -{ - arch.tools[t]=p; -}