This is less a question about C++ coding, as it is using the GNU Auto build tools with it.
I have my project all set up using these tools, but when I compile I realize that the libraries I need to link with are linking with EVERY source file in my project. Now most of them need to be linked with these libraries, but some source files have no code that needs it, so wouldn't this just be making the file larger than it needs to be?
How can I specify which specific source files need to be linked with the libraries?
I assume this needs to be done in my src/Makefile.am file, but I don't know how exactly. I have all the libraries stored in a Makefile variable, so if I just know the macro or variable I need to use I can easily set it up. Thanks.