example: main.o foo.o $(CC) main.o foo.o -o $@ %.o: %.c $(CC) -c $< -o $@ .PHONY: clean clean: rm -f example *.o