How do you statically link an external DLL/dylib to your project?

Also, if this does what I think it does, it shouldn’t be static linking only. It should link to shared libs as well. Both are “compile time” linkage but one copies code and the other just links it.