1# Makefile.am for the traffic/iocore/net hierarchy
2#
3#  Licensed to the Apache Software Foundation (ASF) under one
4#  or more contributor license agreements.  See the NOTICE file
5#  distributed with this work for additional information
6#  regarding copyright ownership.  The ASF licenses this file
7#  to you under the Apache License, Version 2.0 (the
8#  "License"); you may not use this file except in compliance
9#  with the License.  You may obtain a copy of the License at
10#
11#      http://www.apache.org/licenses/LICENSE-2.0
12#
13#  Unless required by applicable law or agreed to in writing, software
14#  distributed under the License is distributed on an "AS IS" BASIS,
15#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16#  See the License for the specific language governing permissions and
17#  limitations under the License.
18
19AM_CPPFLAGS += \
20  $(iocore_include_dirs) \
21  -I$(abs_top_srcdir)/include \
22  -I$(abs_top_srcdir)/lib \
23  -I$(abs_top_srcdir)/lib/records \
24  -I$(abs_top_srcdir)/proxy \
25  -I$(abs_top_srcdir)/proxy/hdrs \
26  -I$(abs_top_srcdir)/proxy/shared \
27  -I$(abs_top_srcdir)/proxy/logging \
28  -I$(abs_top_srcdir)/proxy/http \
29  -I$(abs_top_srcdir)/proxy/http3 \
30  -I$(abs_top_srcdir)/mgmt \
31  -I$(abs_top_srcdir)/mgmt/utils \
32  $(TS_INCLUDES) \
33  @OPENSSL_INCLUDES@ @YAMLCPP_INCLUDES@
34
35noinst_LIBRARIES = libquic.a
36
37if OPENSSL_IS_BORINGSSL
38QUICPHProtector_impl = QUICPacketHeaderProtector_boringssl.cc
39QUICPPProtector_impl = QUICPacketPayloadProtector_boringssl.cc
40QUICTLS_impl = QUICTLS_boringssl.cc
41QUICKeyGenerator_impl = QUICKeyGenerator_boringssl.cc
42else
43if ENABLE_QUIC_OLD_API
44QUICPHProtector_impl = QUICPacketHeaderProtector_legacy.cc
45QUICPPProtector_impl = QUICPacketPayloadProtector_legacy.cc
46QUICTLS_impl = QUICTLS_legacy.cc
47QUICKeyGenerator_impl = QUICKeyGenerator_legacy.cc
48else
49QUICPHProtector_impl = QUICPacketHeaderProtector_openssl.cc
50QUICPPProtector_impl = QUICPacketPayloadProtector_openssl.cc
51QUICTLS_impl = QUICTLS_openssl.cc
52QUICKeyGenerator_impl = QUICKeyGenerator_openssl.cc
53endif
54endif
55
56QLog_impl = qlog/QLogEvent.cc qlog/QLogFrame.cc qlog/QLog.cc
57
58libquic_a_SOURCES = \
59  QUICGlobals.cc \
60  QUICTypes.cc \
61  QUICIntUtil.cc \
62  QUICPacket.cc \
63  QUICPacketFactory.cc \
64  QUICFrame.cc \
65  QUICFrameDispatcher.cc \
66  QUICVersionNegotiator.cc \
67  QUICLossDetector.cc \
68  QUICStreamManager.cc \
69  QUICNewRenoCongestionController.cc \
70  QUICFlowController.cc \
71  QUICStreamState.cc \
72  QUICStream.cc \
73  QUICHandshake.cc \
74  QUICPacketHeaderProtector.cc \
75  $(QUICPHProtector_impl) \
76  QUICPacketPayloadProtector.cc \
77  $(QUICPPProtector_impl) \
78  QUICPacketProtectionKeyInfo.cc \
79  QUICTLS.cc \
80  $(QUICTLS_impl) \
81  $(QUICKeyGenerator_impl) \
82  QUICKeyGenerator.cc \
83  QUICHKDF.cc \
84  QUICTransportParameters.cc \
85  QUICConnectionTable.cc \
86  QUICAltConnectionManager.cc \
87  QUICAckFrameCreator.cc \
88  QUICConfig.cc \
89  QUICDebugNames.cc \
90  QUICApplication.cc \
91  QUICApplicationMap.cc \
92  QUICIncomingFrameBuffer.cc \
93  QUICPacketReceiveQueue.cc \
94  QUICPathManager.cc \
95  QUICPathValidator.cc \
96  QUICPinger.cc \
97  QUICRetryIntegrityTag.cc \
98  QUICResetTokenTable.cc \
99  QUICFrameGenerator.cc \
100  QUICFrameRetransmitter.cc \
101  QUICAddrVerifyState.cc \
102  QUICBidirectionalStream.cc \
103  QUICCryptoStream.cc \
104  QUICUnidirectionalStream.cc \
105  QUICStreamFactory.cc \
106  QUICPadder.cc \
107  QUICContext.cc \
108  QUICTokenCreator.cc \
109  $(QLog_impl)
110
111#
112# Check Programs
113#
114check_PROGRAMS = \
115  test_QUICAckFrameCreator \
116  test_QUICAltConnectionManager \
117  test_QUICFlowController \
118  test_QUICFrame \
119  test_QUICFrameDispatcher \
120  test_QUICLossDetector \
121  test_QUICHandshakeProtocol \
122  test_QUICIncomingFrameBuffer \
123  test_QUICInvariants \
124  test_QUICKeyGenerator \
125  test_QUICPacket \
126  test_QUICPacketHeaderProtector \
127  test_QUICPacketFactory \
128  test_QUICPathValidator \
129  test_QUICStream \
130  test_QUICStreamManager \
131  test_QUICStreamState \
132  test_QUICTransportParameters \
133  test_QUICType \
134  test_QUICTypeUtil \
135  test_QUICVersionNegotiator \
136  test_QUICFrameRetransmitter \
137  test_QUICAddrVerifyState \
138  test_QUICPinger
139
140TESTS = $(check_PROGRAMS)
141
142test_CPPFLAGS = \
143  $(AM_CPPFLAGS) \
144  -I$(abs_top_srcdir)/tests/include -O0
145
146test_LDADD = \
147  libquic.a \
148  $(top_builddir)/lib/records/librecords_p.a \
149  $(top_builddir)/iocore/eventsystem/libinkevent.a \
150  $(top_builddir)/mgmt/libmgmt_p.la \
151  $(top_builddir)/proxy/shared/libUglyLogStubs.a \
152  $(top_builddir)/src/tscore/libtscore.la \
153  $(top_builddir)/src/tscpp/util/libtscpputil.la \
154  $(top_builddir)/proxy/ParentSelectionStrategy.o \
155  @HWLOC_LIBS@ @OPENSSL_LIBS@ @LIBPCRE@ @YAMLCPP_LIBS@
156
157test_event_main_SOURCES = \
158  ./test/event_processor_main.cc
159
160test_main_SOURCES = \
161  ./test/main.cc
162
163test_QUICAckFrameCreator_CPPFLAGS = $(test_CPPFLAGS)
164test_QUICAckFrameCreator_LDFLAGS = @AM_LDFLAGS@
165test_QUICAckFrameCreator_LDADD = $(test_LDADD)
166test_QUICAckFrameCreator_SOURCES = \
167  $(test_main_SOURCES) \
168  ./test/test_QUICAckFrameCreator.cc
169
170test_QUICAltConnectionManager_CPPFLAGS = $(test_CPPFLAGS)
171test_QUICAltConnectionManager_LDFLAGS = @AM_LDFLAGS@
172test_QUICAltConnectionManager_LDADD = $(test_LDADD)
173test_QUICAltConnectionManager_SOURCES = \
174  $(test_main_SOURCES) \
175  ./test/test_QUICAltConnectionManager.cc
176
177test_QUICFlowController_CPPFLAGS = $(test_CPPFLAGS)
178test_QUICFlowController_LDFLAGS = @AM_LDFLAGS@
179test_QUICFlowController_LDADD = $(test_LDADD)
180test_QUICFlowController_SOURCES = \
181  $(test_main_SOURCES) \
182  ./test/test_QUICFlowController.cc
183
184test_QUICFrame_CPPFLAGS = $(test_CPPFLAGS)
185test_QUICFrame_LDFLAGS = @AM_LDFLAGS@
186test_QUICFrame_LDADD = $(test_LDADD)
187test_QUICFrame_SOURCES = \
188  $(test_main_SOURCES) \
189  ./test/test_QUICFrame.cc
190
191test_QUICFrameDispatcher_CPPFLAGS = $(test_CPPFLAGS)
192test_QUICFrameDispatcher_LDFLAGS = @AM_LDFLAGS@
193test_QUICFrameDispatcher_LDADD = $(test_LDADD)
194test_QUICFrameDispatcher_SOURCES = \
195  $(test_event_main_SOURCES) \
196  ./test/test_QUICFrameDispatcher.cc
197
198test_QUICLossDetector_CPPFLAGS = $(test_CPPFLAGS)
199test_QUICLossDetector_LDFLAGS = @AM_LDFLAGS@
200test_QUICLossDetector_LDADD = $(test_LDADD)
201test_QUICLossDetector_SOURCES = \
202  $(test_event_main_SOURCES) \
203  ./test/test_QUICLossDetector.cc
204
205test_QUICHandshakeProtocol_CPPFLAGS = $(test_CPPFLAGS)
206test_QUICHandshakeProtocol_LDFLAGS = @AM_LDFLAGS@
207test_QUICHandshakeProtocol_LDADD = $(test_LDADD)
208test_QUICHandshakeProtocol_SOURCES = \
209  $(test_main_SOURCES) \
210  ./test/test_QUICHandshakeProtocol.cc
211
212test_QUICIncomingFrameBuffer_CPPFLAGS = $(test_CPPFLAGS)
213test_QUICIncomingFrameBuffer_LDFLAGS = @AM_LDFLAGS@
214test_QUICIncomingFrameBuffer_LDADD = $(test_LDADD)
215test_QUICIncomingFrameBuffer_SOURCES = \
216  $(test_event_main_SOURCES) \
217  ./test/test_QUICIncomingFrameBuffer.cc
218
219test_QUICInvariants_CPPFLAGS = $(test_CPPFLAGS)
220test_QUICInvariants_LDFLAGS = @AM_LDFLAGS@
221test_QUICInvariants_LDADD = $(test_LDADD)
222test_QUICInvariants_SOURCES = \
223  $(test_main_SOURCES) \
224  ./test/test_QUICInvariants.cc
225
226test_QUICKeyGenerator_CPPFLAGS = $(test_CPPFLAGS)
227test_QUICKeyGenerator_LDFLAGS = @AM_LDFLAGS@
228test_QUICKeyGenerator_LDADD = $(test_LDADD)
229test_QUICKeyGenerator_SOURCES = \
230  $(test_main_SOURCES) \
231  ./test/test_QUICKeyGenerator.cc
232
233test_QUICPacket_CPPFLAGS = $(test_CPPFLAGS)
234test_QUICPacket_LDFLAGS = @AM_LDFLAGS@
235test_QUICPacket_LDADD = $(test_LDADD)
236test_QUICPacket_SOURCES = \
237  $(test_main_SOURCES) \
238  ./test/test_QUICPacket.cc
239
240test_QUICPacketFactory_CPPFLAGS = $(test_CPPFLAGS)
241test_QUICPacketFactory_LDFLAGS = @AM_LDFLAGS@
242test_QUICPacketFactory_LDADD = $(test_LDADD)
243test_QUICPacketFactory_SOURCES = \
244  $(test_main_SOURCES) \
245  ./test/test_QUICPacketFactory.cc
246
247test_QUICPathValidator_CPPFLAGS = $(test_CPPFLAGS)
248test_QUICPathValidator_LDFLAGS = @AM_LDFLAGS@
249test_QUICPathValidator_LDADD = $(test_LDADD)
250test_QUICPathValidator_SOURCES = \
251  $(test_main_SOURCES) \
252  ./test/test_QUICPathValidator.cc
253
254test_QUICPacketHeaderProtector_CPPFLAGS = $(test_CPPFLAGS)
255test_QUICPacketHeaderProtector_LDFLAGS = @AM_LDFLAGS@
256test_QUICPacketHeaderProtector_LDADD = $(test_LDADD)
257test_QUICPacketHeaderProtector_SOURCES = \
258  $(test_main_SOURCES) \
259  ./test/test_QUICPacketHeaderProtector.cc
260
261test_QUICStream_CPPFLAGS = $(test_CPPFLAGS)
262test_QUICStream_LDFLAGS = @AM_LDFLAGS@
263test_QUICStream_LDADD = $(test_LDADD)
264test_QUICStream_SOURCES = \
265  $(test_event_main_SOURCES) \
266  ./test/test_QUICStream.cc
267
268test_QUICStreamManager_CPPFLAGS = $(test_CPPFLAGS)
269test_QUICStreamManager_LDFLAGS = @AM_LDFLAGS@
270test_QUICStreamManager_LDADD = $(test_LDADD)
271test_QUICStreamManager_SOURCES = \
272  $(test_event_main_SOURCES) \
273  ./test/test_QUICStreamManager.cc
274
275test_QUICStreamState_CPPFLAGS = $(test_CPPFLAGS)
276test_QUICStreamState_LDFLAGS = @AM_LDFLAGS@
277test_QUICStreamState_LDADD = $(test_LDADD)
278test_QUICStreamState_SOURCES = \
279  $(test_main_SOURCES) \
280  ./test/test_QUICStreamState.cc
281
282test_QUICTransportParameters_CPPFLAGS = $(test_CPPFLAGS)
283test_QUICTransportParameters_LDFLAGS = @AM_LDFLAGS@
284test_QUICTransportParameters_LDADD = $(test_LDADD)
285test_QUICTransportParameters_SOURCES = \
286  $(test_main_SOURCES) \
287  ./test/test_QUICTransportParameters.cc
288
289test_QUICType_CPPFLAGS = $(test_CPPFLAGS)
290test_QUICType_LDFLAGS = @AM_LDFLAGS@
291test_QUICType_LDADD = $(test_LDADD)
292test_QUICType_SOURCES = \
293  $(test_main_SOURCES) \
294  ./test/test_QUICType.cc
295
296test_QUICTypeUtil_CPPFLAGS = $(test_CPPFLAGS)
297test_QUICTypeUtil_LDFLAGS = @AM_LDFLAGS@
298test_QUICTypeUtil_LDADD = $(test_LDADD)
299test_QUICTypeUtil_SOURCES = \
300  $(test_main_SOURCES) \
301  ./test/test_QUICTypeUtil.cc
302
303test_QUICVersionNegotiator_CPPFLAGS = $(test_CPPFLAGS)
304test_QUICVersionNegotiator_LDFLAGS = @AM_LDFLAGS@
305test_QUICVersionNegotiator_LDADD = $(test_LDADD)
306test_QUICVersionNegotiator_SOURCES = \
307  $(test_main_SOURCES) \
308  ./test/test_QUICVersionNegotiator.cc
309
310test_QUICFrameRetransmitter_CPPFLAGS = $(test_CPPFLAGS)
311test_QUICFrameRetransmitter_LDFLAGS = @AM_LDFLAGS@
312test_QUICFrameRetransmitter_LDADD = $(test_LDADD)
313test_QUICFrameRetransmitter_SOURCES = \
314  $(test_main_SOURCES) \
315  ./test/test_QUICFrameRetransmitter.cc
316
317test_QUICAddrVerifyState_CPPFLAGS = $(test_CPPFLAGS)
318test_QUICAddrVerifyState_LDFLAGS = @AM_LDFLAGS@
319test_QUICAddrVerifyState_LDADD = $(test_LDADD)
320test_QUICAddrVerifyState_SOURCES = \
321  $(test_main_SOURCES) \
322  ./test/test_QUICAddrVerifyState.cc
323
324test_QUICPinger_CPPFLAGS = $(test_CPPFLAGS)
325test_QUICPinger_LDFLAGS = @AM_LDFLAGS@
326test_QUICPinger_LDADD = $(test_LDADD)
327test_QUICPinger_SOURCES = \
328  $(test_main_SOURCES) \
329  ./test/test_QUICPinger.cc
330
331#
332# clang-tidy
333#
334include $(top_srcdir)/build/tidy.mk
335
336clang-tidy-local: $(DIST_SOURCES)
337	$(CXX_Clang_Tidy)
338