Files
42_INT_12_webserv/Makefile
hugogogo 2a70c6b26d Merge branch 'hugo3'
+ script output verification works (field duplicate and status)
+ parsing_message_http :
  - the file is deleted
  - of the three functions it contained, only one still exist
  - 'parse_http_headers' is now in utils
+ changes in utils :
  - http headers parsing doesn't change key case itself
  - a new function change key case tolower case in map<str, str>
  - added split_trim() that perform a split and a trim at once
  - resolved pbm in trim
  - added print_special to print special char '\r' and '\n'
  - del_line became extract_line, because it returns the deleted line
  - added get line, that does the same without deleting
  - moved http_header in utils, and made it more consistent
+ in Client :
  - parse_request is now named parse_request_headers to work with parse body
  - private function _parse_request_headers is then now _parse_request_fields
    (because it doesn't take care of request first line, but only fields)
  - added a debug function 'print_client'
2022-08-12 14:05:11 +02:00

65 lines
1.1 KiB
Makefile

NAME = webserv
CXX = clang++
CXXFLAGS = -Wall -Wextra #-Werror
CXXFLAGS += $(HEADERS_D:%=-I%)
CXXFLAGS += -std=c++98
CXXFLAGS += -g3
CXXFLAGS += -MMD -MP #header dependencie
#CXXFLAGS += -O3
VPATH = $(SRCS_D)
HEADERS_D = srcs \
srcs/webserv \
srcs/config
SRCS_D = srcs \
srcs/webserv \
srcs/config
SRCS = main.cpp \
base.cpp init.cpp close.cpp epoll_update.cpp signal.cpp \
accept.cpp request.cpp response.cpp \
method_get.cpp method_post.cpp method_delete.cpp \
run_loop.cpp timeout.cpp \
parser.cpp \
extraConfig.cpp \
postProcessing.cpp \
utils.cpp \
cgi_script.cpp \
Client.cpp \
OBJS_D = builds
OBJS = $(SRCS:%.cpp=$(OBJS_D)/%.o)
DEPS = $(OBJS:.o=.d) #header dependencie
# --------------------
# ------ RULES -------
# --------------------
all: $(NAME)
$(OBJS_D)/%.o: %.cpp | $(OBJS_D)
$(CXX) $(CXXFLAGS) -c $< -o $@
$(OBJS_D):
mkdir $@
$(NAME): $(OBJS)
$(CXX) $^ -o $(NAME)
clean:
rm -rf $(OBJS_D)
fclean: clean
rm -f $(NAME)
re: fclean all
.PHONY : all clean fclean re
-include $(DEPS) # header dependencie