diff --git a/ex00/Makefile b/ex00/Makefile index be748c8..1154551 100644 --- a/ex00/Makefile +++ b/ex00/Makefile @@ -16,6 +16,8 @@ main_objs = main.o $(srcs:.cpp=.o) all_objs = $(main_objs) deps = $(all_objs:.o=.d) +.PHONY: all clean fclean re run + all: $(NAME) -include $(deps) @@ -37,3 +39,6 @@ fclean: clean re: +make fclean +make all + +run: $(NAME) + ./$(NAME) diff --git a/ex01/Makefile b/ex01/Makefile index 6c8c45f..4866aa6 100644 --- a/ex01/Makefile +++ b/ex01/Makefile @@ -17,6 +17,8 @@ main_objs = main.o $(srcs:.cpp=.o) all_objs = $(main_objs) deps = $(all_objs:.o=.d) +.PHONY: all clean fclean re run + all: $(NAME) -include $(deps) @@ -38,3 +40,6 @@ fclean: clean re: +make fclean +make all + +run: $(NAME) + ./$(NAME) diff --git a/ex02/Makefile b/ex02/Makefile index c2202fe..3f440d3 100644 --- a/ex02/Makefile +++ b/ex02/Makefile @@ -18,6 +18,8 @@ main_objs = main.o $(srcs:.cpp=.o) all_objs = $(main_objs) deps = $(all_objs:.o=.d) +.PHONY: all clean fclean re run + all: $(NAME) -include $(deps) @@ -39,3 +41,6 @@ fclean: clean re: +make fclean +make all + +run: $(NAME) + ./$(NAME) diff --git a/ex03/Makefile b/ex03/Makefile index 10f3b80..cda03f3 100644 --- a/ex03/Makefile +++ b/ex03/Makefile @@ -19,6 +19,8 @@ main_objs = main.o $(srcs:.cpp=.o) all_objs = $(main_objs) deps = $(all_objs:.o=.d) +.PHONY: all clean fclean re run + all: $(NAME) -include $(deps) @@ -40,3 +42,6 @@ fclean: clean re: +make fclean +make all + +run: $(NAME) + ./$(NAME)