Skip to content

Commit 5d1040b

Browse files
committed
Add makefile run rule
1 parent 92ca23f commit 5d1040b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
NAME := webserv
2+
CONF := project.conf
23

34
OBJ_DIR := obj
45
SRC_DIR := src
56
INC_DIR := include
67
BIN_DIR := bin
8+
CONF_DIR := conf
79

810
SRC += main.cpp
911
SRC += global.cpp
@@ -105,6 +107,9 @@ fsanitize:
105107
custom:
106108
make CXXFLAGS="$(ARG) $(CXXFLAGS)"
107109

110+
run:
111+
$(BIN_DIR)/$(NAME) $(CONF_DIR)/$(CONF)
112+
108113
lines:
109114
@wc -l $(SRC_DIR)/*.cpp $(INC_DIR)/*.hpp $(SRC_DIR)/*/*.cpp $(INC_DIR)/*/*.hpp | sort
110115

@@ -118,6 +123,7 @@ help:
118123
@echo " performance : Build with optimization flags (-O3)"
119124
@echo " debug : Build with debugging symbols (-g)"
120125
@echo " custom : Build with custom CXXFLAGS (e.g., ARG='-DDEBUG')"
126+
@echo " run : Run webserv binary with project configuration file"
121127
@echo " lines : Count lines of code in source files"
122128

123129
.PHONY: all clean fclean re performance debug fsanitize custom flamegraph jmeter lines help

0 commit comments

Comments
 (0)