-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmakefile
More file actions
25 lines (18 loc) · 879 Bytes
/
makefile
File metadata and controls
25 lines (18 loc) · 879 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
CXX ?= g++
DEBUG ?= 1
ifeq ($(DEBUG), 1)
CXXFLAGS += -g
else
CXXFLAGS += -O2
endif
# centos 和 ubuntu 都可使用
chenWeb: main.cpp webserver/webserver.cpp config/config.cpp utils/utils.cpp global/global.cpp log/log.cpp pool/sqlconnpool.cpp timer/listtimer.cpp http/http_request.cpp http/http_response.cpp http/http_conn.cpp pool/threadpool.cpp
$(CXX) -std=c++11 -o chenWeb $^ $(CXXFLAGS) -lpthread -lyaml-cpp -L/usr/lib64/mysql -lmysqlclient -I/usr/include/mysql
clean:
rm -r bin/chenWeb
## ubuntu 使用
#chenWeb: main.cpp config/config.cpp utils/utils.cpp global/global.cpp log/log.cpp pool/sqlconnpool.cpp timer/listtimer.cpp http/http_request.cpp http/http_response.cpp http/http_conn.cpp pool/threadpool.cpp
# $(CXX) -std=c++11 -o chenWeb $^ $(CXXFLAGS) -lpthread -lyaml-cpp -lmysqlclient
#
#clean:
# rm -r bin/chenWeb