]> git.tdb.fi Git - builder.git/commitdiff
Fix include and library search order
authorMikko Rasa <tdb@tdb.fi>
Tue, 30 Oct 2007 14:43:25 +0000 (14:43 +0000)
committerMikko Rasa <tdb@tdb.fi>
Tue, 30 Oct 2007 14:43:25 +0000 (14:43 +0000)
Fix some header names
Add binary package for DevIL

builderrc
source/builder.cpp
source/component.cpp
source/config.cpp

index 0947330418ba9eb35d829e45df795fa063bbbee5..6b2b0eadbf4dc4e8bfc08a65a81abbb8598fd592 100644 (file)
--- a/builderrc
+++ b/builderrc
@@ -51,6 +51,14 @@ binary_package "xlib"
        };
 };
 
+binary_package "devil"
+{
+       build_info
+       {
+               library "IL";
+       };
+};
+
 architecture "arm"
 {
        prefix "arm-linux-gnu";
index d9444ce8a2c878d1eed9e4f9a80456460d43ccbc..15c9e5455f84e0946fc01ef8c569181063d79394 100644 (file)
@@ -8,7 +8,7 @@ Distributed under the LGPL
 #include <fstream>
 #include <iostream>
 #include <set>
-#include <msp/core/error.h>
+#include <msp/core/except.h>
 #include <msp/core/getopt.h>
 #include <msp/datafile/parser.h>
 #include <msp/path/utils.h>
@@ -239,14 +239,14 @@ Target *Builder::get_header(const string &include, const string &arch, const str
        if(arch=="native")
                syspath.push_back("/usr/include");
        else
-               syspath.push_back("/usr/"+get_architecture(arch).get_prefix()+"/lib");
+               syspath.push_back("/usr/"+get_architecture(arch).get_prefix()+"/include");
        syspath.push_back((Path("/usr/include/c++/")/cxx_ver/fn).str());
 
        Target *tgt=0;
-       for(list<string>::const_iterator j=syspath.begin(); (!tgt && j!=syspath.end()); ++j)
-               tgt=get_header(Path(*j)/fn);
        for(list<string>::const_iterator j=path.begin(); (!tgt && j!=path.end()); ++j)
                tgt=get_header(cwd/ *j/fn);
+       for(list<string>::const_iterator j=syspath.begin(); (!tgt && j!=syspath.end()); ++j)
+               tgt=get_header(Path(*j)/fn);
 
        includes.insert(TargetMap::value_type(id, tgt));
 
@@ -289,10 +289,10 @@ Target *Builder::get_library(const string &lib, const string &arch, const list<s
                cout<<"Looking for library "<<lib<<" with path "<<join(path.begin(), path.end())<<'\n';
 
        Target *tgt=0;
-       for(StringList::iterator j=syspath.begin(); (!tgt && j!=syspath.end()); ++j)
-               tgt=get_library(lib, arch, *j, mode);
        for(StringList::const_iterator j=path.begin(); (!tgt && j!=path.end()); ++j)
                tgt=get_library(lib, arch, cwd/ *j, mode);
+       for(StringList::iterator j=syspath.begin(); (!tgt && j!=syspath.end()); ++j)
+               tgt=get_library(lib, arch, *j, mode);
 
        libraries.insert(TargetMap::value_type(id, tgt));
 
index 29f58b48c7633c1396d3938f73d33a9bf6a2b70d..e674b018aabf42c338585ef6072e76f70221f111 100644 (file)
@@ -5,7 +5,7 @@ Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions
 Distributed under the LGPL
 */
 
-#include <msp/core/error.h>
+#include <msp/core/except.h>
 #include <msp/path/utils.h>
 #include <msp/strings/lexicalcast.h>
 #include "builder.h"
index 482ceb862512e8316b51a289abaed8b734f20f91..2e3741e2a2a5120ab1d8e3bddfe573e2fc3ce21a 100644 (file)
@@ -6,7 +6,7 @@ Distributed under the LGPL
 */
 
 #include <fstream>
-#include <msp/core/error.h>
+#include <msp/core/except.h>
 #include <msp/path/utils.h>
 #include <msp/time/utils.h>
 #include "builder.h"