blob: 3d7beab68ae1962429a2d8da1af639c18a387819 [file] [log] [blame]
David Reissea2cba82009-03-30 21:35:00 +00001#
2# Licensed to the Apache Software Foundation (ASF) under one
3# or more contributor license agreements. See the NOTICE file
4# distributed with this work for additional information
5# regarding copyright ownership. The ASF licenses this file
6# to you under the Apache License, Version 2.0 (the
7# "License"); you may not use this file except in compliance
8# with the License. You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing,
13# software distributed under the License is distributed on an
14# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15# KIND, either express or implied. See the License for the
16# specific language governing permissions and limitations
17# under the License.
18#
19
Kevin Wojniaka3925662019-07-01 11:07:45 -070020AUTOMAKE_OPTIONS = subdir-objects nostdinc
Roger Meier81a1f992014-10-22 14:09:43 +020021
Nobuaki Sukegawa66228772014-12-07 21:45:33 +090022moc__%.cpp: %.h
23 $(QT5_MOC) $(QT5_CFLAGS) $< -o $@
24
Jake Farrell627f1a02011-09-14 03:43:49 +000025SUBDIRS = .
26
27if WITH_TESTS
28SUBDIRS += test
29endif
David Reiss351e22b2010-08-31 16:51:19 +000030
Mark Sleeb16074d2007-11-28 05:54:33 +000031pkgconfigdir = $(libdir)/pkgconfig
32
David Reiss79ae0f82007-09-17 21:15:47 +000033lib_LTLIBRARIES = libthrift.la
Mark Sleeb16074d2007-11-28 05:54:33 +000034pkgconfig_DATA = thrift.pc
Nobuaki Sukegawaa8370852016-01-19 00:48:46 +090035libthrift_la_LDFLAGS = -release $(VERSION)
36libthrift_la_LIBADD = $(BOOST_LDFLAGS) $(OPENSSL_LDFLAGS) $(OPENSSL_LIBS)
Mark Sleeb16074d2007-11-28 05:54:33 +000037
David Reiss79ae0f82007-09-17 21:15:47 +000038## We only build the extra libraries if we have the dependencies,
39## but we install all of the headers unconditionally.
40if AMX_HAVE_LIBEVENT
41lib_LTLIBRARIES += libthriftnb.la
Mark Sleeb16074d2007-11-28 05:54:33 +000042pkgconfig_DATA += thrift-nb.pc
David Reiss79ae0f82007-09-17 21:15:47 +000043endif
David Reissfaebedd2007-09-17 23:20:38 +000044if AMX_HAVE_ZLIB
45lib_LTLIBRARIES += libthriftz.la
Mark Sleeb16074d2007-11-28 05:54:33 +000046pkgconfig_DATA += thrift-z.pc
David Reissfaebedd2007-09-17 23:20:38 +000047endif
Nobuaki Sukegawa66228772014-12-07 21:45:33 +090048if AMX_HAVE_QT5
49lib_LTLIBRARIES += libthriftqt5.la
50pkgconfig_DATA += thrift-qt5.pc
51endif
Marc Slemko6f038a72006-08-03 18:58:09 +000052
Roger Meierec300e32014-10-13 02:13:35 +020053AM_CXXFLAGS = -Wall -Wextra -pedantic
James E. King, IIId7142b72017-09-01 13:00:36 -070054AM_CPPFLAGS = $(BOOST_CPPFLAGS) $(OPENSSL_INCLUDES) -I$(srcdir)/src -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
Marc Slemko9d4a3e22006-07-21 19:53:48 +000055
David Reissfaebedd2007-09-17 23:20:38 +000056# Define the source files for the module
Marc Slemko9d4a3e22006-07-21 19:53:48 +000057
Konrad Grochowski24ea0bf2015-05-07 14:59:29 +020058libthrift_la_SOURCES = src/thrift/TApplicationException.cpp \
59 src/thrift/TOutput.cpp \
CJCombrink4b909092024-04-27 19:51:39 +020060 src/thrift/TUuid.cpp \
Roger Meier49ff8b12012-04-13 09:12:31 +000061 src/thrift/VirtualProfiling.cpp \
Jim King79c99112015-04-30 07:10:08 -040062 src/thrift/async/TAsyncChannel.cpp \
Stefan Bolus9edecce2018-06-06 20:32:52 +020063 src/thrift/async/TAsyncProtocolProcessor.cpp \
ben-craig02bade12015-07-17 08:40:48 -050064 src/thrift/async/TConcurrentClientSyncInfo.cpp \
Roger Meier49ff8b12012-04-13 09:12:31 +000065 src/thrift/concurrency/ThreadManager.cpp \
66 src/thrift/concurrency/TimerManager.cpp \
Jim King79c99112015-04-30 07:10:08 -040067 src/thrift/processor/PeekProcessor.cpp \
Roger Meier49ff8b12012-04-13 09:12:31 +000068 src/thrift/protocol/TDebugProtocol.cpp \
Roger Meier49ff8b12012-04-13 09:12:31 +000069 src/thrift/protocol/TJSONProtocol.cpp \
70 src/thrift/protocol/TBase64Utils.cpp \
Roger Meier3a931b52013-03-26 22:14:03 +010071 src/thrift/protocol/TMultiplexedProtocol.cpp \
Ben Craigcfaadcc2015-07-08 20:50:33 -050072 src/thrift/protocol/TProtocol.cpp \
Roger Meier49ff8b12012-04-13 09:12:31 +000073 src/thrift/transport/TTransportException.cpp \
74 src/thrift/transport/TFDTransport.cpp \
75 src/thrift/transport/TFileTransport.cpp \
76 src/thrift/transport/TSimpleFileTransport.cpp \
77 src/thrift/transport/THttpTransport.cpp \
78 src/thrift/transport/THttpClient.cpp \
79 src/thrift/transport/THttpServer.cpp \
80 src/thrift/transport/TSocket.cpp \
Roger Meier7d0a0402012-06-05 19:57:10 +000081 src/thrift/transport/TPipe.cpp \
82 src/thrift/transport/TPipeServer.cpp \
Roger Meier49ff8b12012-04-13 09:12:31 +000083 src/thrift/transport/TSSLSocket.cpp \
84 src/thrift/transport/TSocketPool.cpp \
85 src/thrift/transport/TServerSocket.cpp \
86 src/thrift/transport/TSSLServerSocket.cpp \
Divya Thaluru808d1432017-08-06 16:36:36 -070087 src/thrift/transport/TNonblockingServerSocket.cpp \
88 src/thrift/transport/TNonblockingSSLServerSocket.cpp \
Roger Meier49ff8b12012-04-13 09:12:31 +000089 src/thrift/transport/TTransportUtils.cpp \
90 src/thrift/transport/TBufferTransports.cpp \
penenin1ab096c2020-05-18 12:27:31 -070091 src/thrift/transport/TWebSocketServer.cpp \
David Suárez4750f362020-09-09 15:49:37 +020092 src/thrift/transport/SocketCommon.cpp \
Jim King5ec805b2015-04-26 07:52:40 -040093 src/thrift/server/TConnectedClient.cpp \
Roger Meier49ff8b12012-04-13 09:12:31 +000094 src/thrift/server/TServer.cpp \
Jim King21b68522015-04-26 18:30:26 -040095 src/thrift/server/TServerFramework.cpp \
Roger Meier49ff8b12012-04-13 09:12:31 +000096 src/thrift/server/TSimpleServer.cpp \
97 src/thrift/server/TThreadPoolServer.cpp \
Jim King79c99112015-04-30 07:10:08 -040098 src/thrift/server/TThreadedServer.cpp
Aditya Agarwal000b1112007-08-31 08:03:05 +000099
Roger Meier49ff8b12012-04-13 09:12:31 +0000100libthrift_la_SOURCES += src/thrift/concurrency/Mutex.cpp \
cyyca8af9b2019-01-11 22:13:12 +0800101 src/thrift/concurrency/ThreadFactory.cpp \
102 src/thrift/concurrency/Thread.cpp \
103 src/thrift/concurrency/Monitor.cpp
Roger Meier3faaedf2011-10-02 10:51:45 +0000104
Roger Meier49ff8b12012-04-13 09:12:31 +0000105libthriftnb_la_SOURCES = src/thrift/server/TNonblockingServer.cpp \
Roger Meier49ff8b12012-04-13 09:12:31 +0000106 src/thrift/async/TEvhttpServer.cpp \
jfarrell8fd8c632014-07-10 09:14:51 -0400107 src/thrift/async/TEvhttpClientChannel.cpp
Marc Slemko9d4a3e22006-07-21 19:53:48 +0000108
Dave Watson792db4e2015-01-16 11:22:01 -0800109libthriftz_la_SOURCES = src/thrift/transport/TZlibTransport.cpp \
110 src/thrift/transport/THeaderTransport.cpp \
James E. King, III82ae9572017-08-05 12:23:54 -0400111 src/thrift/protocol/THeaderProtocol.cpp
Dave Watson792db4e2015-01-16 11:22:01 -0800112
David Reissfaebedd2007-09-17 23:20:38 +0000113
Nobuaki Sukegawa66228772014-12-07 21:45:33 +0900114libthriftqt5_la_MOC = src/thrift/qt/moc__TQTcpServer.cpp
Jens Geyer2ac3a3c2014-12-23 18:18:58 +0100115nodist_libthriftqt5_la_SOURCES = $(libthriftqt5_la_MOC)
116libthriftqt5_la_SOURCES = src/thrift/qt/TQIODeviceTransport.cpp \
117 src/thrift/qt/TQTcpServer.cpp
James E. King III17355422019-01-11 23:06:08 -0500118CLEANFILES = $(libthriftqt5_la_MOC)
Nobuaki Sukegawa66228772014-12-07 21:45:33 +0900119
David Reissfaebedd2007-09-17 23:20:38 +0000120# Flags for the various libraries
David Reissc6c64982008-06-11 01:16:45 +0000121libthriftnb_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBEVENT_CPPFLAGS)
122libthriftz_la_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CPPFLAGS)
Nobuaki Sukegawa66228772014-12-07 21:45:33 +0900123libthriftqt5_la_CPPFLAGS = $(AM_CPPFLAGS) $(QT5_CFLAGS)
124if QT5_REDUCE_RELOCATIONS
125libthriftqt5_la_CPPFLAGS += -fPIC
126endif
Christian Lavoieaf65f1b2010-11-24 21:58:05 +0000127libthriftnb_la_CXXFLAGS = $(AM_CXXFLAGS)
128libthriftz_la_CXXFLAGS = $(AM_CXXFLAGS)
Nobuaki Sukegawa66228772014-12-07 21:45:33 +0900129libthriftqt5_la_CXXFLAGS = $(AM_CXXFLAGS)
Roger Meier38315782011-11-06 11:29:41 +0000130libthriftnb_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS)
rel1vedd34c522020-03-11 22:17:57 +0800131libthriftz_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS) $(ZLIB_LDFLAGS) $(ZLIB_LIBS)
Nobuaki Sukegawa66228772014-12-07 21:45:33 +0900132libthriftqt5_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS) $(QT5_LIBS)
Roger Meier3faaedf2011-10-02 10:51:45 +0000133
Marc Slemko16698852006-08-04 03:16:10 +0000134include_thriftdir = $(includedir)/thrift
135include_thrift_HEADERS = \
David Reissc6c64982008-06-11 01:16:45 +0000136 $(top_builddir)/config.h \
Jens Geyer80954472013-06-25 21:36:29 +0200137 src/thrift/thrift-config.h \
cyy8fdb7582019-02-05 02:57:21 +0800138 src/thrift/thrift_export.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000139 src/thrift/TDispatchProcessor.h \
CJCombrink4b909092024-04-27 19:51:39 +0200140 src/thrift/TUuid.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000141 src/thrift/Thrift.h \
Konrad Grochowski24ea0bf2015-05-07 14:59:29 +0200142 src/thrift/TOutput.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000143 src/thrift/TProcessor.h \
144 src/thrift/TApplicationException.h \
Roger Meierd34bea02013-01-22 21:36:42 +0100145 src/thrift/TLogging.h \
Konrad Grochowski673c9412015-11-05 20:06:00 +0100146 src/thrift/TToString.h \
zeshuai00786352b42020-06-15 17:00:33 +0800147 src/thrift/TBase.h \
Mario Emmenlauerd270b352020-11-19 09:43:34 +0100148 src/thrift/TConfiguration.h \
149 src/thrift/TNonCopyable.h
Marc Slemko16698852006-08-04 03:16:10 +0000150
Marc Slemkod42a2c22006-08-10 03:30:18 +0000151include_concurrencydir = $(include_thriftdir)/concurrency
Marc Slemko16698852006-08-04 03:16:10 +0000152include_concurrency_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000153 src/thrift/concurrency/Exception.h \
154 src/thrift/concurrency/Mutex.h \
155 src/thrift/concurrency/Monitor.h \
cyyca8af9b2019-01-11 22:13:12 +0800156 src/thrift/concurrency/ThreadFactory.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000157 src/thrift/concurrency/Thread.h \
158 src/thrift/concurrency/ThreadManager.h \
159 src/thrift/concurrency/TimerManager.h \
cyybfdbd032019-01-12 14:38:28 +0800160 src/thrift/concurrency/FunctionRunner.h
Marc Slemko16698852006-08-04 03:16:10 +0000161
Marc Slemkod42a2c22006-08-10 03:30:18 +0000162include_protocoldir = $(include_thriftdir)/protocol
Marc Slemko16698852006-08-04 03:16:10 +0000163include_protocol_HEADERS = \
zeshuai00786352b42020-06-15 17:00:33 +0800164 src/thrift/protocol/TEnum.h \
165 src/thrift/protocol/TList.h \
166 src/thrift/protocol/TSet.h \
167 src/thrift/protocol/TMap.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000168 src/thrift/protocol/TBinaryProtocol.h \
169 src/thrift/protocol/TBinaryProtocol.tcc \
170 src/thrift/protocol/TCompactProtocol.h \
171 src/thrift/protocol/TCompactProtocol.tcc \
Roger Meier49ff8b12012-04-13 09:12:31 +0000172 src/thrift/protocol/TDebugProtocol.h \
Dave Watson792db4e2015-01-16 11:22:01 -0800173 src/thrift/protocol/THeaderProtocol.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000174 src/thrift/protocol/TBase64Utils.h \
175 src/thrift/protocol/TJSONProtocol.h \
Roger Meier3a931b52013-03-26 22:14:03 +0100176 src/thrift/protocol/TMultiplexedProtocol.h \
177 src/thrift/protocol/TProtocolDecorator.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000178 src/thrift/protocol/TProtocolTap.h \
Dave Watson792db4e2015-01-16 11:22:01 -0800179 src/thrift/protocol/TProtocolTypes.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000180 src/thrift/protocol/TProtocolException.h \
181 src/thrift/protocol/TVirtualProtocol.h \
182 src/thrift/protocol/TProtocol.h
Marc Slemko16698852006-08-04 03:16:10 +0000183
Marc Slemkod42a2c22006-08-10 03:30:18 +0000184include_transportdir = $(include_thriftdir)/transport
Marc Slemko16698852006-08-04 03:16:10 +0000185include_transport_HEADERS = \
Jens Geyer80954472013-06-25 21:36:29 +0200186 src/thrift/transport/PlatformSocket.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000187 src/thrift/transport/TFDTransport.h \
188 src/thrift/transport/TFileTransport.h \
Dave Watson792db4e2015-01-16 11:22:01 -0800189 src/thrift/transport/THeaderTransport.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000190 src/thrift/transport/TSimpleFileTransport.h \
191 src/thrift/transport/TServerSocket.h \
192 src/thrift/transport/TSSLServerSocket.h \
193 src/thrift/transport/TServerTransport.h \
Divya Thaluru808d1432017-08-06 16:36:36 -0700194 src/thrift/transport/TNonblockingServerTransport.h \
195 src/thrift/transport/TNonblockingServerSocket.h \
196 src/thrift/transport/TNonblockingSSLServerSocket.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000197 src/thrift/transport/THttpTransport.h \
198 src/thrift/transport/THttpClient.h \
199 src/thrift/transport/THttpServer.h \
200 src/thrift/transport/TSocket.h \
max ulidtkodabfea22020-05-19 21:44:46 +0300201 src/thrift/transport/TSocketUtils.h \
Roger Meier7d0a0402012-06-05 19:57:10 +0000202 src/thrift/transport/TPipe.h \
203 src/thrift/transport/TPipeServer.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000204 src/thrift/transport/TSSLSocket.h \
205 src/thrift/transport/TSocketPool.h \
206 src/thrift/transport/TVirtualTransport.h \
207 src/thrift/transport/TTransport.h \
208 src/thrift/transport/TTransportException.h \
209 src/thrift/transport/TTransportUtils.h \
210 src/thrift/transport/TBufferTransports.h \
211 src/thrift/transport/TShortReadTransport.h \
penenin1ab096c2020-05-18 12:27:31 -0700212 src/thrift/transport/TZlibTransport.h \
David Suárez4750f362020-09-09 15:49:37 +0200213 src/thrift/transport/TWebSocketServer.h \
214 src/thrift/transport/SocketCommon.h
Marc Slemko16698852006-08-04 03:16:10 +0000215
Marc Slemkod42a2c22006-08-10 03:30:18 +0000216include_serverdir = $(include_thriftdir)/server
Marc Slemko16698852006-08-04 03:16:10 +0000217include_server_HEADERS = \
Roger Meierec847ac2015-05-09 21:33:42 +0200218 src/thrift/server/TConnectedClient.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000219 src/thrift/server/TServer.h \
Roger Meierec847ac2015-05-09 21:33:42 +0200220 src/thrift/server/TServerFramework.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000221 src/thrift/server/TSimpleServer.h \
222 src/thrift/server/TThreadPoolServer.h \
223 src/thrift/server/TThreadedServer.h \
224 src/thrift/server/TNonblockingServer.h
Marc Slemko9d4a3e22006-07-21 19:53:48 +0000225
Aditya Agarwal000b1112007-08-31 08:03:05 +0000226include_processordir = $(include_thriftdir)/processor
227include_processor_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000228 src/thrift/processor/PeekProcessor.h \
Roger Meier3a931b52013-03-26 22:14:03 +0100229 src/thrift/processor/StatsProcessor.h \
230 src/thrift/processor/TMultiplexedProcessor.h
Aditya Agarwal000b1112007-08-31 08:03:05 +0000231
David Reiss5ddabb82010-10-06 17:09:37 +0000232include_asyncdir = $(include_thriftdir)/async
233include_async_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000234 src/thrift/async/TAsyncChannel.h \
235 src/thrift/async/TAsyncDispatchProcessor.h \
236 src/thrift/async/TAsyncProcessor.h \
237 src/thrift/async/TAsyncBufferProcessor.h \
238 src/thrift/async/TAsyncProtocolProcessor.h \
Ben Craigde78b542015-07-22 19:38:08 -0500239 src/thrift/async/TConcurrentClientSyncInfo.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000240 src/thrift/async/TEvhttpClientChannel.h \
241 src/thrift/async/TEvhttpServer.h
David Reiss5ddabb82010-10-06 17:09:37 +0000242
Roger Meier86e89862012-02-10 19:53:20 +0000243include_qtdir = $(include_thriftdir)/qt
244include_qt_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000245 src/thrift/qt/TQIODeviceTransport.h \
246 src/thrift/qt/TQTcpServer.h
Roger Meier86e89862012-02-10 19:53:20 +0000247
Jake Farrelle0c53162011-11-16 12:58:36 +0000248WINDOWS_DIST = \
Roger Meier67377e72012-05-10 21:17:53 +0000249 src/thrift/windows \
Jake Farrelle0c53162011-11-16 12:58:36 +0000250 thrift.sln \
251 libthrift.vcxproj \
252 libthrift.vcxproj.filters \
253 libthriftnb.vcxproj \
jfarrell8fd8c632014-07-10 09:14:51 -0400254 libthriftnb.vcxproj.filters \
255 3rdparty.props
Jake Farrelle0c53162011-11-16 12:58:36 +0000256
Thomas63f04582024-03-21 22:51:07 +0900257distdir:
258 $(MAKE) $(AM_MAKEFLAGS) distdir-am
259
David Reiss832b2622007-12-28 18:25:33 +0000260EXTRA_DIST = \
jfarrellf13e4312015-08-25 00:39:29 -0400261 CMakeLists.txt \
262 coding_standards.md \
Roger Meier16fcad02014-03-16 21:12:11 +0100263 README.md \
David Reiss0c90f6f2008-02-06 22:18:40 +0000264 thrift-nb.pc.in \
265 thrift.pc.in \
Jake Farrelle0c53162011-11-16 12:58:36 +0000266 thrift-z.pc.in \
Nobuaki Sukegawa66228772014-12-07 21:45:33 +0900267 thrift-qt5.pc.in \
jfarrellf13e4312015-08-25 00:39:29 -0400268 src/thrift/qt/CMakeLists.txt \
Jake Farrelle0c53162011-11-16 12:58:36 +0000269 $(WINDOWS_DIST)
Konrad Grochowski16a23a62014-11-13 15:33:38 +0100270
271style-local:
272 $(CPPSTYLE_CMD)