You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

47 lines
1.3 KiB

# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: hroussea <hroussea@student.42lyon.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/03/17 03:41:53 by hroussea #+# #+# #
# Updated: 2022/05/02 14:10:42 by hroussea ### ########lyon.fr #
# #
# **************************************************************************** #
CXX = c++
TARGET = ex00
OBJDIR = obj
SOURCES = main.cpp
OBJECTS = $(addprefix obj/,$(SOURCES:.cpp=.o))
DEPENDENCIES = $(OBJECTS:.o=.d)
CXXFLAGS = -Wall -Wextra -Werror -std=c++98
all: $(TARGET)
clean:
rm -rf $(OBJDIR)
fclean: clean
rm -rf $(TARGET)
re:
$(MAKE) fclean
$(MAKE) all
$(TARGET): $(OBJECTS)
$(CXX) $^ -o $@
$(OBJDIR):
mkdir -p $@
$(OBJDIR)/%.o: %.cpp | obj
$(CXX) $(CXXFLAGS) -MMD -Iinclude -c $< -o $@
.PHONY: all clean fclean re
-include $(DEPENDENCIES)