.PHONY: clean,real-clean LD = gcc CC = gcc CFLAGS = -Wall -W SRC=$(wildcard *.c) OBJ=$(SRC:.c=.o) prog : $(OBJ) $(LD) -o $@ $^ %.o : %.c $(CC) $(CFLAGS) -c $^ clean : rm -f *.o real-clean : clean rm -f prog