-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
103 lines (89 loc) · 1.9 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# This doesn't work with `make -j` because `make depend` needs to complete
# before other things. makedepend(1) might help. For now, the recommendation
# is to run `make depend` once before anything else.
all: \
depend \
hello-world \
print-requests \
proxy \
#
depend: fb64 hpack
fb64:
$(MAKE) -j -C dependencies/fb64
hpack:
$(MAKE) -j -C dependencies/hpack
CXX = g++ -std=c++20 -pipe -g -Wall -Werror -fmax-errors=1 -O0 -march=native
CPPFLAGS = -Idependencies
COMPILE_OBJ = $(CXX) $(CPPFLAGS) -c
%.o: %.cpp %.h
$(COMPILE_OBJ) -o $@ $<
OBJS = \
Connection.o \
ConnectionManager.o \
Date.o \
Error.o \
EventReceiver.o \
Headers.o \
http1/ClientTransport.o \
http1/ClientTransportSource.o \
http1/HTTP1.o \
http1/HTTP2Upgrader.o \
http1/ServerTransport.o \
http1/Transport.o \
http1/UpgradeRegistry.o \
http2/Frame.o \
http2/ServerStream.o \
http2/ServerTransport.o \
http2/Settings.o \
Message.o \
ProxyHandler.o \
Request.o \
RequestHandler.o \
Response.o \
Route.o \
Routes.o \
Server.o \
Stream.o \
SignalReceiver.o \
SignalSource.o \
StaticResponder.o \
StatusStrings.o \
StreamBuf.o \
SwitchTransport.o \
UnhandledRequestHandler.o \
#
LDLIBS = \
-Ldependencies/fb64 -lfb64 \
-Ldependencies/hpack -lhpack \
#
hello-world: HelloWorld.cpp $(OBJS)
$(CXX) -I. -o $@ $^ $(LDLIBS)
proxy: ProxyServer.cpp $(OBJS)
$(CXX) -I. -o $@ $^ $(LDLIBS)
print-requests: PrintRequestServer.cpp $(OBJS)
$(CXX) -I. -o $@ $^ $(LDLIBS)
clean:
rm -f \
*.o \
http1/*.o \
http2/*.o \
hello-world \
print-requests \
proxy \
#
$(MAKE) -C dependencies/fb64 clean
$(MAKE) -C dependencies/hpack clean
check:
$(MAKE) -C dependencies/fb64 check
$(MAKE) -C dependencies/hpack check
verify: verify.sh
./verify.sh
.PHONY: \
all \
check \
clean \
depend \
fb64 \
hpack \
verify \
#