NAME		= ircserv
CXX		= c++
CXXFLAGS	= -Wall -Wextra -Werror -std=c++98
INCLUDES	= -I includes

SRCS		= main.cpp \
		  srcs/Server.cpp \
		  srcs/ParseBuffer.cpp \
		  srcs/IrcParser.cpp \
		  srcs/IrcMessage.cpp \
		  srcs/CommandValidator.cpp

OBJS		= $(SRCS:.cpp=.o)

all:		$(NAME)

$(NAME):	$(OBJS)
		$(CXX) $(CXXFLAGS) $(OBJS) -o $(NAME)

%.o:		%.cpp
		$(CXX) $(CXXFLAGS) $(INCLUDES) -c $< -o $@

clean:
		rm -f $(OBJS)

fclean:		clean
		rm -f $(NAME)

re:		fclean all

.PHONY:		all clean fclean re
