Dependency management

How to management the dependency between the software modules? Is there any GNU tool to do this?

How can we collect units from some symbol entries together? I mean how can I start with some symbols, collect all the code units that these symbols directly or indirectly depend on, to make a single library file which contains all these symbols and all dependencies.