X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcomponent.cpp;h=5c859f7eaf80e01d0734f0d3fc4de4891be736c1;hb=1d687970cc35e54c3335f4aa2fdef23424fe0a06;hp=7db9880c051b52633310b4bddfacf04b867283c7;hpb=dcaf06c2bba4e02a312cd6af24ddc96410e7be4e;p=builder.git diff --git a/source/component.cpp b/source/component.cpp index 7db9880..5c859f7 100644 --- a/source/component.cpp +++ b/source/component.cpp @@ -6,10 +6,10 @@ #include #include "builder.h" #include "component.h" +#include "csourcefile.h" #include "datafile.h" #include "executable.h" #include "file.h" -#include "header.h" #include "objectfile.h" #include "sharedlibrary.h" #include "sourcepackage.h" @@ -76,17 +76,7 @@ void Component::create_build_info() } if(type==PROGRAM) - { - string strip = pkg.get_config().get_option("strip").value; - if(lexical_cast(strip)) - build_info.ldflags.push_back("-s"); - } - else if(type==LIBRARY) - { - build_info.cflags.push_back("-fPIC"); - } - - build_info.unique(); + build_info.strip = lexical_cast(pkg.get_config().get_option("strip").value); } void Component::create_targets() const @@ -177,7 +167,7 @@ void Component::create_targets() const { FileTarget *hdr = builder.get_vfs().get_target(*i); if(!hdr) - hdr = new Header(builder, *this, i->str()); + hdr = new CSourceFile(builder, *this, *i); // Install headers if requested if(type==HEADERS && install) @@ -283,7 +273,7 @@ void Component::Loader::source(const string &s) void Component::Loader::require(const string &n) { - Package *req = comp.pkg.get_builder().get_package(n); + Package *req = comp.pkg.get_builder().get_package_manager().find_package(n); if(req) comp.requires.push_back(req); }