CC = g++ CFLAGS = OBJECTS := %.o list.o EXECUTE := main.out .PHONY: all clean all: $(EXECUTE) clean: rm $(EXECUTE) %.out: $(OBJECTS) $(CC) $(CFLAGS) -o $@ $^ %.o: %.cpp $(CC) $(CFLAGS) -c $<