Diff of /Makefile.rules.in [886a70] .. [7d8e10]  Maximize  Restore

Switch to side-by-side view

--- a/Makefile.rules.in
+++ b/Makefile.rules.in
@@ -15,22 +15,28 @@
 
 include $(REL_ADDR)Makefile.flags
 
+# All files which might have an impact on compilation
+# Makefile.flags and Makefile.rules are generated by configure so 
+# they should be definitely here.
+# Specific makefiles can define their specific files by means of 
+# EXTRA_REBUILD_FORCE_FILES variable
+REBUILD_FORCE_FILES = $(REL_ADDR)Makefile.flags \
+	$(REL_ADDR)Makefile.rules $(EXTRA_REBUILD_FORCE_FILES)
+
 ####### Implicit rules
 
-.SUFFIXES: .c .o .cpp .cc .cxx .C
-
-.cpp.o:
+%.o: %.cpp $(REBUILD_FORCE_FILES)
 	$(CXX) -c $(CXXFLAGS) $(MANDATORY_INCPATH) -o $@ $<
 
-.cc.o:
+%.o: %.cc $(REBUILD_FORCE_FILES)
 	$(CXX) -c $(CXXFLAGS) $(MANDATORY_INCPATH) -o $@ $<
 
-.cxx.o:
+%.o: .cxx $(REBUILD_FORCE_FILES)
 	$(CXX) -c $(CXXFLAGS) $(MANDATORY_INCPATH) -o $@ $<
 
-.C.o:
+%.o: %.C $(REBUILD_FORCE_FILES)
 	$(CXX) -c $(CXXFLAGS) $(MANDATORY_INCPATH) -o $@ $<
 
-.c.o:
+%.o: %.c $(REBUILD_FORCE_FILES)
 	$(CC) -c $(CFLAGS) $(MANDATORY_INCPATH) -o $@ $<