--- cbf/Makefile 2009-08-31 09:35:06.000000000 +0200 +++ cbf/Makefile.new 2009-08-31 10:44:46.000000000 +0200 @@ -362,6 +362,8 @@ $(EXAMPLES)/img.h \ $(INCLUDE)/md5.h +OBJ = $(subst .c,.o,$(SOURCE)) + # # Compile the library and examples # @@ -379,11 +381,14 @@ $(LIB): mkdir $(LIB) + +.c.o: $(SOURCE) $(HEADERS) + $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -c $< + # # CBF library # -$(LIB)/libcbf.a: $(SOURCE) $(HEADERS) $(COMMONDEP) - $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -c $(SOURCE) +$(LIB)/libcbf.a: $(OBJ) $(COMMONDEP) $(AR) cr $@ *.o rm *.o if [ -f $(RANLIB) ]; then $(RANLIB) $@ ; fi