1# **************************************************************************** #
4# Makefile :+: :+: :+: #
6# By: kamitsui <kamitsui@student.42tokyo.jp> +#+ +:+ +#+ #
8# Created: 2025/03/15 19:38:29 by kamitsui #+# #+# #
9# Updated: 2025/05/20 14:58:48 by kamitsui ### ########.fr #
11# **************************************************************************** #
14# @brief This File is a Makefile for building example in ex0X directory.
21SRCS = main.cpp Example.cpp useExampleClass.cpp
23# Object files and dependency files
24OBJS = $(addprefix $(OBJ_DIR)/, $(SRCS:.cpp=.o))
25DEPS = $(addprefix $(DEP_DIR)/, $(SRCS:.cpp=.d))
32CXXFLAGS = -Wall -Wextra -Werror -std=c++98
33CF_DEP = -MMD -MP -MF $(@:$(OBJ_DIR)/%.o=$(DEP_DIR)/%.d)
35# Rules for building object files
39 $(CXX) $(CXXFLAGS) $(CF_DEP) -c $< -o $@
41# Rules for building dependency files
45# Enable dependency file
54 $(CXX) $(CXXFLAGS) $(OBJS) -o $(NAME)
55 $(call ASCII_ART,${NAME})
57# Rule for removing object & dependency files
59 rm -rf $(OBJ_DIR) $(DEP_DIR)
62# Rule for removing Target & others
67# Rule for Clean & Build Target
71# ASCII Art : Display Tips the way to use.
73 @echo " _____________________________________________"
75 @echo "< $$ ./example >"
76 @echo "----------------------------------------------"
78 @echo " \ (oo)\_______"