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

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

Makefile timestamp rebuild files, howto?


From: Jeff
Subject: Makefile timestamp rebuild files, howto?
Date: Fri, 7 Mar 2008 07:35:34 -0800 (PST)
User-agent: G2/1.0

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?


reply via email to

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