-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmakefile
80 lines (55 loc) · 2.14 KB
/
makefile
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
CC = g++
FLAG = -g -c
all: Swan
MysqlConnectionPool/MysqlConnectionPool.o: MysqlConnectionPool/MysqlConnectionPool.cpp
$(CC) $(FLAG) $^ -o $@
Redis/Redis.o: Redis/Redis.cpp
$(CC) $(FLAG) $^ -o $@
Config/Config.o: Config/Config.cpp
$(CC) $(FLAG) $^ -o $@
Utils/base64.o: Utils/base64.cpp
$(CC) $(FLAG) $^ -o $@
Utils/sha1.o: Utils/sha1.cpp
$(CC) $(FLAG) $^ -o $@
TcpConnection/Response.o: TcpConnection/Response.cpp
$(CC) $(FLAG) $^ -o $@
TcpConnection/Request.o: TcpConnection/Request.cpp
$(CC) $(FLAG) $^ -o $@
TcpConnection/Address.o: TcpConnection/Address.cpp
$(CC) $(FLAG) $^ -o $@
Acceptor/Acceptor.o: Acceptor/Acceptor.cpp
$(CC) $(FLAG) $^ -o $@
Monitor/Monitor.o: Monitor/Monitor.cpp
$(CC) $(FLAG) $^ -o $@
TcpServer/TcpServer.o: TcpServer/TcpServer.cpp
$(CC) $(FLAG) $^ -o $@
Channel/Channel.o: Channel/Channel.cpp
$(CC) $(FLAG) $^ -o $@
Poller/Poller.o: Poller/Poller.cpp
$(CC) $(FLAG) $^ -o $@
TcpConnection/TcpConnection.o: TcpConnection/TcpConnection.cpp
$(CC) $(FLAG) $^ -o $@
TaskScheduler/Timer.o: TaskScheduler/Timer.cpp
$(CC) $(FLAG) $^ -o $@
TaskScheduler/TimerQueue.o: TaskScheduler/TimerQueue.cpp
$(CC) $(FLAG) $^ -o $@
TaskScheduler/TaskScheduler.o: TaskScheduler/TaskScheduler.cpp
$(CC) $(FLAG) $^ -o $@
Logger/LogFile.o: Logger/LogFile.cpp
$(CC) $(FLAG) $^ -o $@
Thread/Thread.o: Thread/Thread.cpp
$(CC) $(FLAG) $^ -o $@
Logger/AsyncLog.o: Logger/AsyncLog.cpp
$(CC) $(FLAG) $^ -o $@
Logger/LogStream.o: Logger/LogStream.cpp
$(CC) $(FLAG) $^ -o $@
main.o: main.cpp
$(CC) $(FLAG) $^ -o $@
Swan: main.o Logger/LogStream.o Logger/AsyncLog.o Logger/AsyncLog.o Thread/Thread.o Logger/LogFile.o TaskScheduler/TaskScheduler.o TaskScheduler/TimerQueue.o TaskScheduler/Timer.o TcpConnection/TcpConnection.o Poller/Poller.o Channel/Channel.o TcpConnection/Address.o Acceptor/Acceptor.o Monitor/Monitor.o TcpServer/TcpServer.o TcpConnection/Request.o TcpConnection/Response.o Utils/sha1.o Utils/base64.o Config/Config.o MysqlConnectionPool/MysqlConnectionPool.o Redis/Redis.o
$(CC) -g $^ -o $@ -lpthread -lmysqlclient -lhiredis
.PHONY:clean
clean:
rm -rf `find . -name "*.o"`
rm -rf `find . -name "core*"`
rm -rf Other
rm Swan