2023-05-22 08:04:39 -04:00
|
|
|
CXX = c++
|
2023-06-15 08:28:47 -04:00
|
|
|
CPPFLAGS = -std=c++98 -Wall -Wextra -Werror -g
|
2023-05-22 08:04:39 -04:00
|
|
|
SRCDIR = src
|
|
|
|
OBJDIR = obj
|
2023-06-15 08:28:47 -04:00
|
|
|
NAME = contacts
|
2023-05-22 08:04:39 -04:00
|
|
|
|
|
|
|
SRCS = $(wildcard $(SRCDIR)/*.cpp)
|
|
|
|
OBJS = $(patsubst $(SRCDIR)/%.cpp,$(OBJDIR)/%.o,$(SRCS))
|
|
|
|
|
2023-06-15 08:28:47 -04:00
|
|
|
all: $(NAME)
|
2023-05-22 08:04:39 -04:00
|
|
|
|
|
|
|
$(OBJDIR)/%.o: $(SRCDIR)/%.cpp
|
2023-06-15 08:28:47 -04:00
|
|
|
$(CXX) $(CPPFLAGS) -c $< -o $@
|
2023-05-22 08:04:39 -04:00
|
|
|
|
2023-06-15 08:28:47 -04:00
|
|
|
$(NAME): $(OBJS)
|
|
|
|
$(CXX) $(CPPFLAGS) $^ -o $@
|
2023-05-22 08:04:39 -04:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf $(OBJDIR)/*.o
|
|
|
|
|
|
|
|
fclean: clean
|
2023-06-15 08:28:47 -04:00
|
|
|
rm -fr $(NAME)
|
2023-05-22 08:04:39 -04:00
|
|
|
|
2023-06-15 08:28:47 -04:00
|
|
|
re: fclean all
|