X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcomponent.cpp;h=cc4796cdee867cd9d9aea23d311951d4f091965a;hb=4facd021514ab372c23b1b132d6b4b62baa4efbf;hp=7db9880c051b52633310b4bddfacf04b867283c7;hpb=dcaf06c2bba4e02a312cd6af24ddc96410e7be4e;p=builder.git diff --git a/source/component.cpp b/source/component.cpp index 7db9880..cc4796c 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,15 +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.strip = lexical_cast(pkg.get_config().get_option("strip").value); build_info.unique(); } @@ -177,7 +169,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)