Makefile timestamp rebuild files, howto?

Jeff <[email protected]>
Newsgroups gmane.comp.gnu.utils
Organization http://groups.google.com
Message-ID <[email protected]>
Ive searched google for this answer as well as the gnu makefile
documentation page and I cant seem to find what Im looking for.

Im using gmake on solaris to build a project.  I know that this would
work for a single file:

file.o: file.cpp
     CC -c  file.cpp -o file.o

But what I want to do is more general, since I have a list of OBJECTS
I want OBJECTS to somehow check all their associated .cpp files
and rebuild if one of them has been changed without having to
list each file seperately as above.

something like:

$(OBJECTS): ($SOURCES)
    CC -c $*.cpp -o $@

How do I make this work?
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.