diff --git a/Makefile b/Makefile index 182bdaf..da06c85 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,13 @@ CPP=g++ -EXEC := 00-const-vars/const.o 00-const-vars/no-const.o 01-inline-functions/inline.o 01-inline-functions/no-inline.o +OBJS := 00-const-vars/const.o 00-const-vars/no-const.o 01-inline-functions/inline.o 01-inline-functions/no-inline.o -all: $(EXEC) +all: $(OBJS) %.o: %.cpp - g++ $< -o $@ -c + $(CPP) $< -o $@ -c + +.PHONY: clean all clean: - $(RM) $(EXEC) + $(RM) $(OBJS)