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?