]> git.tdb.fi Git - builder.git/blobdiff - source/component.cpp
Move C-specific stuff from SourceFile to CSourceFile
[builder.git] / source / component.cpp
index 7db9880c051b52633310b4bddfacf04b867283c7..cc4796cdee867cd9d9aea23d311951d4f091965a 100644 (file)
@@ -6,10 +6,10 @@
 #include <msp/strings/lexicalcast.h>
 #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<bool>(strip))
-                       build_info.ldflags.push_back("-s");
-       }
-       else if(type==LIBRARY)
-       {
-               build_info.cflags.push_back("-fPIC");
-       }
+               build_info.strip = lexical_cast<bool>(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)