diff --git a/ex03/Log.cpp b/ex03/Log.cpp index 9dbf721..fe8ee18 100644 --- a/ex03/Log.cpp +++ b/ex03/Log.cpp @@ -1,12 +1,12 @@ /* ************************************************************************** */ /* */ /* ::: :::::::: */ -/* log.cpp :+: :+: :+: */ +/* Log.cpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: adjoly +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/11/30 16:30:53 by adjoly #+# #+# */ -/* Updated: 2024/11/30 16:32:37 by adjoly ### ########.fr */ +/* Updated: 2024/12/11 14:09:08 by adjoly ### ########.fr */ /* */ /* ************************************************************************** */ @@ -14,9 +14,13 @@ #include void log(std::string emoji, std::string what, std::string who, std::string str) { +#ifdef VERBOSE if (who.empty()) std::cout << "「" << emoji << "」" << what << ": " << str << std::endl; else std::cout << "「" << emoji << "」" << what << "(" << who << "): " << str << std::endl; +#else + (void)emoji, (void)what, (void)who, (void)str; +#endif } diff --git a/ex03/Makefile b/ex03/Makefile index 34ae06e..09163c8 100644 --- a/ex03/Makefile +++ b/ex03/Makefile @@ -6,7 +6,7 @@ # By: adjoly +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2024/10/25 16:09:27 by adjoly #+# #+# # -# Updated: 2024/12/06 16:28:16 by adjoly ### ########.fr # +# Updated: 2024/12/11 14:08:19 by adjoly ### ########.fr # # # # **************************************************************************** # @@ -31,6 +31,10 @@ PURPLE = \e[0;35m NC = \033[0m DELETE = \x1B[2K\r +ifeq ($(VERBOSE),true) + FLAGS += -D VERBOSE +endif + all: $(NAME) $(NAME): $(OBJS)