help-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Avoid relinking when .so file changes


From: variablecloudiness
Subject: Avoid relinking when .so file changes
Date: 1 Jul 2006 10:28:43 -0700
User-agent: G2/0.2

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!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]