X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcomponent.cpp;h=5e32de5275f12a2dc1eb1f66c3466d15b482e050;hb=ce86d90028b2e69799a82fda19f78161e1c09099;hp=26ce71058dfd79edf38b5006e2d5620cd82261b3;hpb=b3ce9052ba98a4585aec75117265d170b7ccfdb8;p=builder.git diff --git a/source/component.cpp b/source/component.cpp index 26ce710..5e32de5 100644 --- a/source/component.cpp +++ b/source/component.cpp @@ -67,6 +67,10 @@ void Component::create_build_info() if(lexical_cast(strip)) build_info.ldflags.push_back("-s"); } + else if(type==LIBRARY) + { + build_info.cflags.push_back("-fPIC"); + } if(modular) { @@ -145,7 +149,13 @@ void Component::create_targets() const else source=new File(builder, pkg, files.front()); ::DataFile *result=new ::DataFile(builder, *this, *source); - inst_list.push_back(result); + + if(&pkg==builder.get_main_package() && deflt) + def_tgt->add_depend(result); + else + world->add_depend(result); + if(install) + inst_list.push_back(result); } else {