I've omitted a few minor details, let me know if I need to explain anything or give more sample code.

Anyway, my question is this: When I link with $(LIBS), the linker (or GNU Make or something...) translates -lmylib and -lmyotherlib to /pathtolib/libmylib.a and /pathtolib/libmyotherlib.a which is good, these are static libraries that I want to link with. There is no libmylib.so or libmyotherlib.so file in that directory (or anywhere else). Now I want to link with libboost_system.a, libboost_thread.a, libvpx.a and librt.a, but the folders where those libraries are located contain both libboost_system.a and libboost_system.so (same with the other libraries) and for some reason specifying -lboost_system always picks the .so file over the .a file.

I want -lboost_system to pick the .a file instead of the .so file without having to specify /usr/lib/libboost_system.a. Is that possible??

Thanks for the suggestion Cubbi. I've tried that, and I've also tried specifying the -Bstatic option for the linker.

The problem I'm seeing is that somewhere between lines 15 and 39 of the code I provided -lboost_thread (for example) gets translated to /usr/lib/libboost_thread.so. Clearly I don't know much about Makefiles and I've been googling around all day trying to figure out how that happens.

TL;DR Something translates -lboost_thread to /usr/lib/libboost_thread.so, I want whatever that thing is to translate it to /usr/lib/libboost_thread.a. Is there an elegant way to do that??