Skip to content

Commit

Permalink
config: Update src filenames for Makefile to compile program
Browse files Browse the repository at this point in the history
  • Loading branch information
san-ghun committed Jul 18, 2024
1 parent 7a792a2 commit 9e80b49
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ CFLAGS = -Wall -Wextra -Werror -std=c++98
RM = rm -f

SRC_NAME = ./src/main.cpp \
./src/server/Server.cpp \
./src/network/Poller.cpp \
./src/network/Socket.cpp \
./src/server/Server.cpp \
./src/server/RequestHandler.cpp \
./src/server/HttpRequest.cpp \
./src/server/HttpResponse.cpp \
./src/server/StaticFileHandler.cpp
./src/server/StaticFileHandler.cpp \
./src/util/Config.cpp \
./src/util/Location.cpp

# SRC_NAME = $(shell find ./src -iname "*.cpp")
OBJ_NAME = $(SRC_NAME:.cpp=.o)
Expand Down Expand Up @@ -48,7 +50,7 @@ re: fclean all

dev:
@echo "$(YELLOW)Building $@...$(RESET)"
@$(CC) $(CFLAGS) -g3 -o $(NAME) $(SRC_NAME) $(HEADERS)
$(CC) $(CFLAGS) -g3 -o $(NAME) $(SRC_NAME) $(HEADERS)
@echo "$(GREEN)Done.$(RESET)"

$(NAME): $(OBJ_NAME)
Expand Down

0 comments on commit 9e80b49

Please sign in to comment.