forked from eel-moun/HTTP-WebServer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
executable file
·33 lines (20 loc) · 717 Bytes
/
makefile
File metadata and controls
executable file
·33 lines (20 loc) · 717 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
SRC = main.cpp src/ConfigFile.cpp src/Location.cpp src/Server.cpp src/parseConfig.cpp\
src/parseConfigUtils.cpp src/serverUtils.cpp src/RequestUtils.cpp src/setRequest.cpp\
src/sendResponse.cpp src/methods.cpp
HEADERS = headers/ConfigFile.hpp headers/Location.hpp headers/Server.hpp headers/parseConfig.hpp headers/ServerUtils.hpp
NAME = websrv
PATH_OBJ = obj/
CC = c++
FLAGS = -Wall -Wextra -Werror -g -std=c++98
OBJ = $(addprefix $(PATH_OBJ), $(SRC:.cpp=.o))
all: $(NAME)
$(NAME): $(OBJ) $(HEADERS)
$(CC) -g $(FLAGS) -o $(NAME) $(SRC)
$(OBJ) : $(PATH_OBJ)%.o: %.cpp $(HEADERS)
@mkdir -p $(dir $@)
${CC} ${FLAGS} -c $< -o $@
clean:
rm -rf $(PATH_OBJ)
fclean: clean
rm -rf $(NAME)
re: fclean all