From 1d752c591b4f4533d05ca05ec2b4f24fd39bdb36 Mon Sep 17 00:00:00 2001 From: Camille Chauvet Date: Thu, 3 Aug 2023 14:29:03 +0200 Subject: [PATCH] remove fuxk --- ex02/Makefile | 16 ++++++++-------- ex02/obj/.gitkeep | 0 ex02/src/Fixed.cpp | 1 + 3 files changed, 9 insertions(+), 8 deletions(-) delete mode 100644 ex02/obj/.gitkeep diff --git a/ex02/Makefile b/ex02/Makefile index e79f471..6601adb 100644 --- a/ex02/Makefile +++ b/ex02/Makefile @@ -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 - diff --git a/ex02/obj/.gitkeep b/ex02/obj/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/ex02/src/Fixed.cpp b/ex02/src/Fixed.cpp index 1a1c929..df0adc3 100644 --- a/ex02/src/Fixed.cpp +++ b/ex02/src/Fixed.cpp @@ -10,6 +10,7 @@ Fixed::~Fixed() Fixed::Fixed() { + ths->_value = 0; std::cout << "Default constructor called" << std::endl; }