/* $Id$
This file is part of builder
-Copyright © 2006-2009 Mikko Rasa, Mikkosoft Productions
+Copyright © 2006-2010 Mikko Rasa, Mikkosoft Productions
Distributed under the LGPL
*/
else if(comp.get_package().get_library_mode()==ALL_STATIC)
argv.push_back("-static");
+ if(const SharedLibrary *lib = dynamic_cast<const SharedLibrary *>(&bin))
+ if(!lib->get_soname().empty())
+ argv.push_back("-Wl,-soname,"+lib->get_soname());
+
const BuildInfo &binfo = comp.get_build_info();
for(list<string>::const_iterator i=binfo.ldflags.begin(); i!=binfo.ldflags.end(); ++i)
argv.push_back(*i);
const TargetList &deps = bin.get_depends();
for(TargetList::const_iterator i=deps.begin(); i!=deps.end(); ++i)
{
- Target *tgt = *i;
- if(Install *inst = dynamic_cast<Install *>(tgt))
- tgt = &inst->get_source();
+ Target *tgt = (*i)->get_real_target();
if(ObjectFile *obj = dynamic_cast<ObjectFile *>(tgt))
argv.push_back(relative(obj->get_path(), work_dir).str());