-
- if(build_exe)
- {
- Executable *exe=0;
- StaticLibrary *slib=0;
- if(type==Component::LIBRARY)
- {
- exe=new SharedLibrary(builder, *this, objs);
- slib=new StaticLibrary(builder, *this, objs);
- }
- else
- exe=new Executable(builder, *this, objs);
-
- if(&pkg==builder.get_default_package() && deflt)
- {
- def_tgt->add_depend(exe);
- if(slib) def_tgt->add_depend(slib);
- }
- else
- {
- world->add_depend(exe);
- if(slib) world->add_depend(slib);
- }
-
- if(install)
- {
- inst_tgts.push_back(exe);
- if(slib)
- inst_tgts.push_back(slib);
- }
- }
-
- Target *inst_tgt=builder.get_target("install");
- for(TargetList::const_iterator i=inst_tgts.begin(); i!=inst_tgts.end(); ++i)
- inst_tgt->add_depend(new Install(builder, pkg, **i));