Skip to content

Commit 6212778

Browse files
committed
Add bear makefile rule
1 parent 90f8af8 commit 6212778

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@ docker/webserv/source
2424
database/
2525
.env
2626

27-
# Clangd config file
28-
.clangd
27+
.cache/
28+
29+
compile_commands.json

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ docker.build:
117117
docker.run:
118118
docker run --rm -p 8080:80 --name webserv webserv:latest
119119

120+
bear: fclean
121+
bear -- make
122+
120123
lines:
121124
@wc -l $(SRC_DIR)/*.cpp $(INC_DIR)/*.hpp $(SRC_DIR)/*/*.cpp $(INC_DIR)/*/*.hpp | sort
122125

@@ -132,6 +135,7 @@ help:
132135
@echo " run : Run webserv binary with project configuration file"
133136
@echo " docker.build : Build webserv docker image"
134137
@echo " docker.run : Run webserv docker image"
138+
@echo " bear : Use bear to generate compile_commands.json file which can be used by clangd"
135139
@echo " lines : Count lines of code in source files"
136140

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

0 commit comments

Comments
 (0)