」 feat(ex01): RPN is working :D

This commit is contained in:
2025-08-27 15:58:23 +02:00
parent b9919ed1e6
commit 1458548d67
5 changed files with 145 additions and 0 deletions

58
ex01/Makefile Normal file
View File

@@ -0,0 +1,58 @@
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2024/01/22 07:21:18 by mmoussou #+# #+# #
# Updated: 2025/08/27 14:42:13 by mmoussou ### ########.fr #
# #
# **************************************************************************** #
SHELL = bash
RED = \033[0;31m
GREEN = \033[0;32m
YELLOW = \033[1;33m
PURPLE = \e[0;35m
NC = \033[0m
DELETE = \x1B[2K
CXX = c++
FLAGS = -std=c++98 -Wall -Werror -Wextra
INCLUDES = .
NAME = RPN
SRCS = main.cpp RPN.cpp
OBJSDIR = obj/
OBJS = $(addprefix $(OBJSDIR), $(SRCS:.cpp=.o))
all: $(NAME)
$(NAME): $(OBJS)
@$(CXX) $(FLAGS) -I$(INCLUDES) $(OBJS) -o $(NAME)
@printf "$(NC)$(YELLOW)「✨」 feat($(NAME)): program compiled\n$(NC)"
$(OBJSDIR)%.o: %.cpp
@mkdir -p $(@D)
@$(CXX) $(FLAGS) -I$(INCLUDES) -c $< -o $@
@printf "$(NC)$(GREEN)「🔨」 build($<): object compiled\n$(NC)"
clean:
@rm -f $(OBJS)
@printf "$(NC)$(RED)「🗑️」 clean($(OBJS)): object deleted\n$(NC)"
fclean: clean
@rm -f $(NAME)
@rm -Rf $(OBJSDIR)
@printf "$(NC)$(RED)「🗑️」 fclean($(NAME)): program deleted\n$(NC)"
re: fclean
@$(MAKE) -s all
.PHONY: clean fclean all re