Avoid relinking when .so file changes

[email protected]
Newsgroups gmane.comp.gnu.utils
Organization http://groups.google.com
Message-ID <[email protected]>
I have a Makefile (GNU Make 3.80).  Let's say I have a target
for a binary called 'myBinary'.  myBinary depends on a few .so
files.  When I type 'make myBinary', and the files that generate
those .so files change, I want the .so files regenerated.

I don't, however, want 'myBinary' relinked, since the interface to
the .so file hasn't changed--relinking is unnecessary.

So far, my Makefile looks like this:

myBinary: myBinary.o myLibrary.so
        g++ --go-go-gadget-linker

myBinary.o: myBinary.cpp myBinary.h myLibrary.h

myLibrary.so: myLibrary.o

myLibrary.o: myLibrary.cpp myLibrary.h

How do I change this Makefile to keep the relinking from happening?
Dropping the .so dependency creates pain, because then 'make -j'
doesn't work right.

Thanks in advance!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.