This commit is contained in:
Camille Chauvet 2023-08-03 14:10:21 +02:00
parent 8521c2ffc0
commit fd281ea056
3 changed files with 24 additions and 24 deletions

View File

@ -1,25 +1,25 @@
CXX = c++
CXXFLAGS = -std=c++98 -Wall -Wextra -Werror -g -O0
CPPFLAGS = -std=c++98 -Wall -Wextra -Werror -g
SRCDIR = src
OBJDIR = obj
EXECUTABLE = fixed
NAME = ex00
SRCS = $(wildcard $(SRCDIR)/*.cpp)
OBJS = $(patsubst $(SRCDIR)/%.cpp,$(OBJDIR)/%.o,$(SRCS))
all: $(EXECUTABLE)
all: $(NAME)
$(OBJDIR)/%.o: $(SRCDIR)/%.cpp
$(CXX) $(CXXFLAGS) -c $< -o $@
mkdir -p obj
$(CXX) $(CPPFLAGS) -c $< -o $@
$(EXECUTABLE): $(OBJS)
$(CXX) $(CXXFLAGS) $^ -o $@
$(NAME): $(OBJS)
$(CXX) $(CPPFLAGS) $^ -o $@
clean:
rm -rf $(OBJDIR)/*.o
fclean: clean
rm -fr $(EXECUTABLE)
rm -fr $(NAME)
re: fclean all

View File

@ -1,25 +1,25 @@
CXX = c++
CXXFLAGS = -std=c++98 -Wall -Wextra -Werror -g -O0
CPPFLAGS = -std=c++98 -Wall -Wextra -Werror -g
SRCDIR = src
OBJDIR = obj
EXECUTABLE = fixed
NAME = ex01
SRCS = $(wildcard $(SRCDIR)/*.cpp)
OBJS = $(patsubst $(SRCDIR)/%.cpp,$(OBJDIR)/%.o,$(SRCS))
all: $(EXECUTABLE)
all: $(NAME)
$(OBJDIR)/%.o: $(SRCDIR)/%.cpp
$(CXX) $(CXXFLAGS) -c $< -o $@
mkdir -p obj
$(CXX) $(CPPFLAGS) -c $< -o $@
$(EXECUTABLE): $(OBJS)
$(CXX) $(CXXFLAGS) $^ -o $@
$(NAME): $(OBJS)
$(CXX) $(CPPFLAGS) $^ -o $@
clean:
rm -rf $(OBJDIR)/*.o
fclean: clean
rm -fr $(EXECUTABLE)
rm -fr $(NAME)
re: fclean all

View File

@ -1,25 +1,25 @@
CXX = c++
CXXFLAGS = -std=c++98 -Wall -Wextra -Werror -g -O0
CPPFLAGS = -std=c++98 -Wall -Wextra -Werror -g
SRCDIR = src
OBJDIR = obj
EXECUTABLE = fixed
NAME = ex02
SRCS = $(wildcard $(SRCDIR)/*.cpp)
OBJS = $(patsubst $(SRCDIR)/%.cpp,$(OBJDIR)/%.o,$(SRCS))
all: $(EXECUTABLE)
all: $(NAME)
$(OBJDIR)/%.o: $(SRCDIR)/%.cpp
$(CXX) $(CXXFLAGS) -c $< -o $@
mkdir -p obj
$(CXX) $(CPPFLAGS) -c $< -o $@
$(EXECUTABLE): $(OBJS)
$(CXX) $(CXXFLAGS) $^ -o $@
$(NAME): $(OBJS)
$(CXX) $(CPPFLAGS) $^ -o $@
clean:
rm -rf $(OBJDIR)/*.o
fclean: clean
rm -fr $(EXECUTABLE)
rm -fr $(NAME)
re: fclean all