From bd77483ed44c37c70e7749bda0e796f5b0605458 Mon Sep 17 00:00:00 2001 From: starnakin Date: Wed, 12 Jul 2023 02:08:59 +0200 Subject: [PATCH] makefile create obj folder --- ex00/Makefile | 3 ++- ex00/obj/.gitkepp | 0 ex01/Makefile | 3 ++- ex01/obj/.gitkeep | 0 4 files changed, 4 insertions(+), 2 deletions(-) delete mode 100644 ex00/obj/.gitkepp delete mode 100644 ex01/obj/.gitkeep diff --git a/ex00/Makefile b/ex00/Makefile index fc264f4..6601adb 100644 --- a/ex00/Makefile +++ b/ex00/Makefile @@ -2,7 +2,7 @@ CXX = c++ CPPFLAGS = -std=c++98 -Wall -Wextra -Werror -g SRCDIR = src OBJDIR = obj -NAME = megaphone +NAME = ex02 SRCS = $(wildcard $(SRCDIR)/*.cpp) OBJS = $(patsubst $(SRCDIR)/%.cpp,$(OBJDIR)/%.o,$(SRCS)) @@ -10,6 +10,7 @@ OBJS = $(patsubst $(SRCDIR)/%.cpp,$(OBJDIR)/%.o,$(SRCS)) all: $(NAME) $(OBJDIR)/%.o: $(SRCDIR)/%.cpp + mkdir -p obj $(CXX) $(CPPFLAGS) -c $< -o $@ $(NAME): $(OBJS) diff --git a/ex00/obj/.gitkepp b/ex00/obj/.gitkepp deleted file mode 100644 index e69de29..0000000 diff --git a/ex01/Makefile b/ex01/Makefile index 783ce99..6601adb 100644 --- a/ex01/Makefile +++ b/ex01/Makefile @@ -2,7 +2,7 @@ CXX = c++ CPPFLAGS = -std=c++98 -Wall -Wextra -Werror -g SRCDIR = src OBJDIR = obj -NAME = contacts +NAME = ex02 SRCS = $(wildcard $(SRCDIR)/*.cpp) OBJS = $(patsubst $(SRCDIR)/%.cpp,$(OBJDIR)/%.o,$(SRCS)) @@ -10,6 +10,7 @@ OBJS = $(patsubst $(SRCDIR)/%.cpp,$(OBJDIR)/%.o,$(SRCS)) all: $(NAME) $(OBJDIR)/%.o: $(SRCDIR)/%.cpp + mkdir -p obj $(CXX) $(CPPFLAGS) -c $< -o $@ $(NAME): $(OBJS) diff --git a/ex01/obj/.gitkeep b/ex01/obj/.gitkeep deleted file mode 100644 index e69de29..0000000