separate main tests in differents files and added comparison in readme

This commit is contained in:
hugogogo
2022-07-20 14:34:16 +02:00
parent 726bf36b17
commit fecf5411bc
10 changed files with 1145 additions and 130 deletions

View File

@@ -1,3 +1,30 @@
## VARIABLES
#NAME = my_program
#VPATH = srcs
#CXX = c++
#CXXFLAGS = -I ./srcs
#OBJS = $(SRCS:%.cpp=%.o)
#
#MAIN = main.cpp
#SRCS = $(MAIN) Webserv.cpp
#
## RULES
#all: $(NAME)
#
#hugo: MAIN = main_hugo.cpp
#hugo: re
#
#$(NAME) : $(OBJS)
# $(CXX) $(OBJS) -o $(NAME)
#clean:
# rm -f $(OBJS)
#fclean: clean
# rm -f $(NAME)
#re: fclean all
#.PHONY : all clean fclean re
NAME = webserv
CXX = c++
@@ -10,14 +37,19 @@ CXXFLAGS += -g
#SHELL = /bin/zsh
VPATH = $(DIR_SRCS)
DIR_SRCS = srcs
DIR_SRCS = srcs
HEADERS_D = ./srcs
HEADERS = Webserv.hpp
DEPENDENCIES = $(HEADERS:%=$(HEADERS_D)/%)
DEPENDENCIES = $(HEADERS:%=$(HEADERS_D)/%)
SRCS = main.cpp Webserv.cpp
SRCS = $(MAIN) Webserv.cpp
#MAIN = main.cpp
#MAIN = main_luke.cpp
#MAIN = main_hugo.cpp
#MAIN = main_poll.cpp
MAIN = main_select.cpp
DIR_OBJS = builds
OBJS = $(SRCS:%.cpp=$(DIR_OBJS)/%.o)
@@ -27,6 +59,8 @@ OBJS = $(SRCS:%.cpp=$(DIR_OBJS)/%.o)
# --------------------
all: $(NAME)
luke: Webserv.cpp main_luke.cpp
luke: re
$(DIR_OBJS)/%.o: %.cpp | $(DIR_OBJS)
$(CXX) $(CXXFLAGS) -c $< -o $@
@@ -51,3 +85,4 @@ re: fclean all
#run: all
.PHONY : all clean fclean re run