CIBLE = calculer CC = gcc #nom du compilateur CFLAGS = -Wall -pedantic -g #-fprofile-arcs -ftest-coverage #options du compilateur LDFLAGS = #options du linker SRCS = $(shell ls *.c) OBJ = $(SRCS:.c=.o) $(CIBLE): $(OBJ) %.d: %.c $(SHELL) -ec '$(CC) -M $(CPPFLAGS) $< \ | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \ [ -s $@ ] || rm -f $@' clean: rm -f *.o *~ *.d $(CIBLE) include $(SRCS:.c=.d)