File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 11obj /
22logs /
3+ bin /
34
45* .log
56
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ NAME := webserv
33OBJ_DIR := obj
44SRC_DIR := src
55INC_DIR := include
6+ BIN_DIR := bin
67
78SRC += main.cpp
89SRC += global.cpp
@@ -65,9 +66,9 @@ DEPS := $(addprefix $(INC_DIR)/, $(HEADERS))
6566CXX := c++
6667CXXFLAGS := -Wall -Wextra -Werror -Wpedantic -std=c++98 -Iinclude -Iinclude/poll -Iinclude/config -Iinclude/http -Iinclude/utils -Iinclude/output
6768
68- all : $(NAME )
69+ all : $(BIN_DIR ) / $( NAME )
6970
70- $(NAME ) : $(OBJ )
71+ $(BIN_DIR ) / $( NAME ) : $(OBJ ) | $( BIN_DIR )
7172 $(CXX ) $(CXXFLAGS ) $^ -o $@
7273
7374$(OBJ_DIR ) /% .o : $(SRC_DIR ) /% .cpp $(DEPS ) | $(OBJ_DIR )
@@ -80,12 +81,15 @@ $(OBJ_DIR):
8081 mkdir -p $(OBJ_DIR ) /utils
8182 mkdir -p $(OBJ_DIR ) /output
8283
84+ $(BIN_DIR ) :
85+ mkdir -p $(BIN_DIR )
86+
8387clean :
8488 $(RM ) -r $(OBJ_DIR )
8589
8690fclean : clean
8791 rm -f tools/transformer
88- $(RM ) $( NAME )
92+ $(RM ) -r $( BIN_DIR )
8993
9094re : fclean all
9195
@@ -114,8 +118,6 @@ help:
114118 @echo " performance : Build with optimization flags (-O3)"
115119 @echo " debug : Build with debugging symbols (-g)"
116120 @echo " custom : Build with custom CXXFLAGS (e.g., ARG='-DDEBUG')"
117- @echo " flamegraph : Generate flamegraph profiling SVG"
118- @echo " jmeter : Download and run Apache JMeter"
119121 @echo " lines : Count lines of code in source files"
120122
121123.PHONY : all clean fclean re performance debug fsanitize custom flamegraph jmeter lines help
You can’t perform that action at this time.
0 commit comments