blob: 77d4d6c98349b7d398c26c7a385a97c06ba84a79 [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
Roger Meier81a1f992014-10-22 14:09:43 +020020AUTOMAKE_OPTIONS = subdir-objects
21
Roger Meier86e89862012-02-10 19:53:20 +000022moc_%.cpp: %.h
Jens Geyer79f988c2014-10-03 20:42:54 +020023 $(QT_MOC) $(QT_CFLAGS) $< -o $@
Roger Meier86e89862012-02-10 19:53:20 +000024
Nobuaki Sukegawa66228772014-12-07 21:45:33 +090025moc__%.cpp: %.h
26 $(QT5_MOC) $(QT5_CFLAGS) $< -o $@
27
Jake Farrell627f1a02011-09-14 03:43:49 +000028SUBDIRS = .
29
30if WITH_TESTS
Nobuaki Sukegawa11da87e2016-09-10 14:02:19 +090031# This file is needed by compiler with plugin, while test/Makefile.am needs compiler
32# So test directory is directly picked by top level Makefile.am for plugin build
33if !WITH_PLUGIN
Jake Farrell627f1a02011-09-14 03:43:49 +000034SUBDIRS += test
35endif
Nobuaki Sukegawa11da87e2016-09-10 14:02:19 +090036endif
David Reiss351e22b2010-08-31 16:51:19 +000037
Mark Sleeb16074d2007-11-28 05:54:33 +000038pkgconfigdir = $(libdir)/pkgconfig
39
David Reiss79ae0f82007-09-17 21:15:47 +000040lib_LTLIBRARIES = libthrift.la
Mark Sleeb16074d2007-11-28 05:54:33 +000041pkgconfig_DATA = thrift.pc
Nobuaki Sukegawaa8370852016-01-19 00:48:46 +090042libthrift_la_LDFLAGS = -release $(VERSION)
43libthrift_la_LIBADD = $(BOOST_LDFLAGS) $(OPENSSL_LDFLAGS) $(OPENSSL_LIBS)
Mark Sleeb16074d2007-11-28 05:54:33 +000044
David Reiss79ae0f82007-09-17 21:15:47 +000045## We only build the extra libraries if we have the dependencies,
46## but we install all of the headers unconditionally.
47if AMX_HAVE_LIBEVENT
48lib_LTLIBRARIES += libthriftnb.la
Mark Sleeb16074d2007-11-28 05:54:33 +000049pkgconfig_DATA += thrift-nb.pc
David Reiss79ae0f82007-09-17 21:15:47 +000050endif
David Reissfaebedd2007-09-17 23:20:38 +000051if AMX_HAVE_ZLIB
52lib_LTLIBRARIES += libthriftz.la
Mark Sleeb16074d2007-11-28 05:54:33 +000053pkgconfig_DATA += thrift-z.pc
David Reissfaebedd2007-09-17 23:20:38 +000054endif
Roger Meier86e89862012-02-10 19:53:20 +000055if AMX_HAVE_QT
56lib_LTLIBRARIES += libthriftqt.la
57pkgconfig_DATA += thrift-qt.pc
58endif
Nobuaki Sukegawa66228772014-12-07 21:45:33 +090059if AMX_HAVE_QT5
60lib_LTLIBRARIES += libthriftqt5.la
61pkgconfig_DATA += thrift-qt5.pc
62endif
Marc Slemko6f038a72006-08-03 18:58:09 +000063
Roger Meierec300e32014-10-13 02:13:35 +020064AM_CXXFLAGS = -Wall -Wextra -pedantic
Jim King79c99112015-04-30 07:10:08 -040065AM_CPPFLAGS = $(BOOST_CPPFLAGS) $(OPENSSL_INCLUDES) -I$(srcdir)/src -D__STDC_LIMIT_MACROS
Marc Slemko9d4a3e22006-07-21 19:53:48 +000066
David Reissfaebedd2007-09-17 23:20:38 +000067# Define the source files for the module
Marc Slemko9d4a3e22006-07-21 19:53:48 +000068
Konrad Grochowski24ea0bf2015-05-07 14:59:29 +020069libthrift_la_SOURCES = src/thrift/TApplicationException.cpp \
70 src/thrift/TOutput.cpp \
Roger Meier49ff8b12012-04-13 09:12:31 +000071 src/thrift/VirtualProfiling.cpp \
Jim King79c99112015-04-30 07:10:08 -040072 src/thrift/async/TAsyncChannel.cpp \
ben-craig02bade12015-07-17 08:40:48 -050073 src/thrift/async/TConcurrentClientSyncInfo.cpp \
Roger Meier49ff8b12012-04-13 09:12:31 +000074 src/thrift/concurrency/ThreadManager.cpp \
75 src/thrift/concurrency/TimerManager.cpp \
76 src/thrift/concurrency/Util.cpp \
Jim King79c99112015-04-30 07:10:08 -040077 src/thrift/processor/PeekProcessor.cpp \
Roger Meier49ff8b12012-04-13 09:12:31 +000078 src/thrift/protocol/TDebugProtocol.cpp \
Roger Meier49ff8b12012-04-13 09:12:31 +000079 src/thrift/protocol/TJSONProtocol.cpp \
80 src/thrift/protocol/TBase64Utils.cpp \
Roger Meier3a931b52013-03-26 22:14:03 +010081 src/thrift/protocol/TMultiplexedProtocol.cpp \
Ben Craigcfaadcc2015-07-08 20:50:33 -050082 src/thrift/protocol/TProtocol.cpp \
Roger Meier49ff8b12012-04-13 09:12:31 +000083 src/thrift/transport/TTransportException.cpp \
84 src/thrift/transport/TFDTransport.cpp \
85 src/thrift/transport/TFileTransport.cpp \
86 src/thrift/transport/TSimpleFileTransport.cpp \
87 src/thrift/transport/THttpTransport.cpp \
88 src/thrift/transport/THttpClient.cpp \
89 src/thrift/transport/THttpServer.cpp \
90 src/thrift/transport/TSocket.cpp \
Roger Meier7d0a0402012-06-05 19:57:10 +000091 src/thrift/transport/TPipe.cpp \
92 src/thrift/transport/TPipeServer.cpp \
Roger Meier49ff8b12012-04-13 09:12:31 +000093 src/thrift/transport/TSSLSocket.cpp \
94 src/thrift/transport/TSocketPool.cpp \
95 src/thrift/transport/TServerSocket.cpp \
96 src/thrift/transport/TSSLServerSocket.cpp \
Divya Thaluru808d1432017-08-06 16:36:36 -070097 src/thrift/transport/TNonblockingServerSocket.cpp \
98 src/thrift/transport/TNonblockingSSLServerSocket.cpp \
Roger Meier49ff8b12012-04-13 09:12:31 +000099 src/thrift/transport/TTransportUtils.cpp \
100 src/thrift/transport/TBufferTransports.cpp \
Jim King5ec805b2015-04-26 07:52:40 -0400101 src/thrift/server/TConnectedClient.cpp \
Roger Meier49ff8b12012-04-13 09:12:31 +0000102 src/thrift/server/TServer.cpp \
Jim King21b68522015-04-26 18:30:26 -0400103 src/thrift/server/TServerFramework.cpp \
Roger Meier49ff8b12012-04-13 09:12:31 +0000104 src/thrift/server/TSimpleServer.cpp \
105 src/thrift/server/TThreadPoolServer.cpp \
Jim King79c99112015-04-30 07:10:08 -0400106 src/thrift/server/TThreadedServer.cpp
Aditya Agarwal000b1112007-08-31 08:03:05 +0000107
Roger Meier3faaedf2011-10-02 10:51:45 +0000108if WITH_BOOSTTHREADS
Roger Meier49ff8b12012-04-13 09:12:31 +0000109libthrift_la_SOURCES += src/thrift/concurrency/BoostThreadFactory.cpp \
110 src/thrift/concurrency/BoostMonitor.cpp \
111 src/thrift/concurrency/BoostMutex.cpp
Roger Meier3faaedf2011-10-02 10:51:45 +0000112else
Roger Meier49ff8b12012-04-13 09:12:31 +0000113libthrift_la_SOURCES += src/thrift/concurrency/Mutex.cpp \
114 src/thrift/concurrency/Monitor.cpp \
115 src/thrift/concurrency/PosixThreadFactory.cpp
Roger Meier3faaedf2011-10-02 10:51:45 +0000116endif
117
Roger Meier49ff8b12012-04-13 09:12:31 +0000118libthriftnb_la_SOURCES = src/thrift/server/TNonblockingServer.cpp \
119 src/thrift/async/TAsyncProtocolProcessor.cpp \
120 src/thrift/async/TEvhttpServer.cpp \
jfarrell8fd8c632014-07-10 09:14:51 -0400121 src/thrift/async/TEvhttpClientChannel.cpp
Marc Slemko9d4a3e22006-07-21 19:53:48 +0000122
Dave Watson792db4e2015-01-16 11:22:01 -0800123libthriftz_la_SOURCES = src/thrift/transport/TZlibTransport.cpp \
124 src/thrift/transport/THeaderTransport.cpp \
James E. King, III82ae9572017-08-05 12:23:54 -0400125 src/thrift/protocol/THeaderProtocol.cpp
Dave Watson792db4e2015-01-16 11:22:01 -0800126
David Reissfaebedd2007-09-17 23:20:38 +0000127
Roger Meier33eaa0f2012-04-13 09:13:13 +0000128libthriftqt_la_MOC = src/thrift/qt/moc_TQTcpServer.cpp
Jens Geyer2ac3a3c2014-12-23 18:18:58 +0100129nodist_libthriftqt_la_SOURCES = $(libthriftqt_la_MOC)
130libthriftqt_la_SOURCES = src/thrift/qt/TQIODeviceTransport.cpp \
Roger Meier49ff8b12012-04-13 09:12:31 +0000131 src/thrift/qt/TQTcpServer.cpp
Roger Meier86e89862012-02-10 19:53:20 +0000132CLEANFILES = $(libthriftqt_la_MOC)
133
Nobuaki Sukegawa66228772014-12-07 21:45:33 +0900134libthriftqt5_la_MOC = src/thrift/qt/moc__TQTcpServer.cpp
Jens Geyer2ac3a3c2014-12-23 18:18:58 +0100135nodist_libthriftqt5_la_SOURCES = $(libthriftqt5_la_MOC)
136libthriftqt5_la_SOURCES = src/thrift/qt/TQIODeviceTransport.cpp \
137 src/thrift/qt/TQTcpServer.cpp
138CLEANFILES += $(libthriftqt5_la_MOC)
Nobuaki Sukegawa66228772014-12-07 21:45:33 +0900139
David Reissfaebedd2007-09-17 23:20:38 +0000140# Flags for the various libraries
David Reissc6c64982008-06-11 01:16:45 +0000141libthriftnb_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBEVENT_CPPFLAGS)
142libthriftz_la_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CPPFLAGS)
Roger Meier86e89862012-02-10 19:53:20 +0000143libthriftqt_la_CPPFLAGS = $(AM_CPPFLAGS) $(QT_CFLAGS)
Nobuaki Sukegawa66228772014-12-07 21:45:33 +0900144libthriftqt5_la_CPPFLAGS = $(AM_CPPFLAGS) $(QT5_CFLAGS)
145if QT5_REDUCE_RELOCATIONS
146libthriftqt5_la_CPPFLAGS += -fPIC
147endif
Christian Lavoieaf65f1b2010-11-24 21:58:05 +0000148libthriftnb_la_CXXFLAGS = $(AM_CXXFLAGS)
149libthriftz_la_CXXFLAGS = $(AM_CXXFLAGS)
Roger Meier86e89862012-02-10 19:53:20 +0000150libthriftqt_la_CXXFLAGS = $(AM_CXXFLAGS)
Nobuaki Sukegawa66228772014-12-07 21:45:33 +0900151libthriftqt5_la_CXXFLAGS = $(AM_CXXFLAGS)
Roger Meier38315782011-11-06 11:29:41 +0000152libthriftnb_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS)
153libthriftz_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS)
Roger Meier86e89862012-02-10 19:53:20 +0000154libthriftqt_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS) $(QT_LIBS)
Nobuaki Sukegawa66228772014-12-07 21:45:33 +0900155libthriftqt5_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS) $(QT5_LIBS)
Roger Meier3faaedf2011-10-02 10:51:45 +0000156
Marc Slemko16698852006-08-04 03:16:10 +0000157include_thriftdir = $(includedir)/thrift
158include_thrift_HEADERS = \
David Reissc6c64982008-06-11 01:16:45 +0000159 $(top_builddir)/config.h \
Jens Geyer80954472013-06-25 21:36:29 +0200160 src/thrift/thrift-config.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000161 src/thrift/TDispatchProcessor.h \
162 src/thrift/Thrift.h \
Konrad Grochowski24ea0bf2015-05-07 14:59:29 +0200163 src/thrift/TOutput.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000164 src/thrift/TProcessor.h \
165 src/thrift/TApplicationException.h \
Roger Meierd34bea02013-01-22 21:36:42 +0100166 src/thrift/TLogging.h \
Konrad Grochowski673c9412015-11-05 20:06:00 +0100167 src/thrift/TToString.h \
James E. King, III82ae9572017-08-05 12:23:54 -0400168 src/thrift/stdcxx.h \
Konrad Grochowski673c9412015-11-05 20:06:00 +0100169 src/thrift/TBase.h
Marc Slemko16698852006-08-04 03:16:10 +0000170
Marc Slemkod42a2c22006-08-10 03:30:18 +0000171include_concurrencydir = $(include_thriftdir)/concurrency
Marc Slemko16698852006-08-04 03:16:10 +0000172include_concurrency_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000173 src/thrift/concurrency/BoostThreadFactory.h \
174 src/thrift/concurrency/Exception.h \
175 src/thrift/concurrency/Mutex.h \
176 src/thrift/concurrency/Monitor.h \
177 src/thrift/concurrency/PlatformThreadFactory.h \
178 src/thrift/concurrency/PosixThreadFactory.h \
jfarrellb5912032013-08-15 19:21:43 -0400179 src/thrift/concurrency/StdMonitor.cpp \
180 src/thrift/concurrency/StdMutex.cpp \
181 src/thrift/concurrency/StdThreadFactory.cpp \
182 src/thrift/concurrency/StdThreadFactory.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000183 src/thrift/concurrency/Thread.h \
184 src/thrift/concurrency/ThreadManager.h \
185 src/thrift/concurrency/TimerManager.h \
186 src/thrift/concurrency/FunctionRunner.h \
187 src/thrift/concurrency/Util.h
Marc Slemko16698852006-08-04 03:16:10 +0000188
Marc Slemkod42a2c22006-08-10 03:30:18 +0000189include_protocoldir = $(include_thriftdir)/protocol
Marc Slemko16698852006-08-04 03:16:10 +0000190include_protocol_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000191 src/thrift/protocol/TBinaryProtocol.h \
192 src/thrift/protocol/TBinaryProtocol.tcc \
193 src/thrift/protocol/TCompactProtocol.h \
194 src/thrift/protocol/TCompactProtocol.tcc \
Roger Meier49ff8b12012-04-13 09:12:31 +0000195 src/thrift/protocol/TDebugProtocol.h \
Dave Watson792db4e2015-01-16 11:22:01 -0800196 src/thrift/protocol/THeaderProtocol.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000197 src/thrift/protocol/TBase64Utils.h \
198 src/thrift/protocol/TJSONProtocol.h \
Roger Meier3a931b52013-03-26 22:14:03 +0100199 src/thrift/protocol/TMultiplexedProtocol.h \
200 src/thrift/protocol/TProtocolDecorator.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000201 src/thrift/protocol/TProtocolTap.h \
Dave Watson792db4e2015-01-16 11:22:01 -0800202 src/thrift/protocol/TProtocolTypes.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000203 src/thrift/protocol/TProtocolException.h \
204 src/thrift/protocol/TVirtualProtocol.h \
205 src/thrift/protocol/TProtocol.h
Marc Slemko16698852006-08-04 03:16:10 +0000206
Marc Slemkod42a2c22006-08-10 03:30:18 +0000207include_transportdir = $(include_thriftdir)/transport
Marc Slemko16698852006-08-04 03:16:10 +0000208include_transport_HEADERS = \
Jens Geyer80954472013-06-25 21:36:29 +0200209 src/thrift/transport/PlatformSocket.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000210 src/thrift/transport/TFDTransport.h \
211 src/thrift/transport/TFileTransport.h \
Dave Watson792db4e2015-01-16 11:22:01 -0800212 src/thrift/transport/THeaderTransport.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000213 src/thrift/transport/TSimpleFileTransport.h \
214 src/thrift/transport/TServerSocket.h \
215 src/thrift/transport/TSSLServerSocket.h \
216 src/thrift/transport/TServerTransport.h \
Divya Thaluru808d1432017-08-06 16:36:36 -0700217 src/thrift/transport/TNonblockingServerTransport.h \
218 src/thrift/transport/TNonblockingServerSocket.h \
219 src/thrift/transport/TNonblockingSSLServerSocket.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000220 src/thrift/transport/THttpTransport.h \
221 src/thrift/transport/THttpClient.h \
222 src/thrift/transport/THttpServer.h \
223 src/thrift/transport/TSocket.h \
Roger Meier7d0a0402012-06-05 19:57:10 +0000224 src/thrift/transport/TPipe.h \
225 src/thrift/transport/TPipeServer.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000226 src/thrift/transport/TSSLSocket.h \
227 src/thrift/transport/TSocketPool.h \
228 src/thrift/transport/TVirtualTransport.h \
229 src/thrift/transport/TTransport.h \
230 src/thrift/transport/TTransportException.h \
231 src/thrift/transport/TTransportUtils.h \
232 src/thrift/transport/TBufferTransports.h \
233 src/thrift/transport/TShortReadTransport.h \
234 src/thrift/transport/TZlibTransport.h
Marc Slemko16698852006-08-04 03:16:10 +0000235
Marc Slemkod42a2c22006-08-10 03:30:18 +0000236include_serverdir = $(include_thriftdir)/server
Marc Slemko16698852006-08-04 03:16:10 +0000237include_server_HEADERS = \
Roger Meierec847ac2015-05-09 21:33:42 +0200238 src/thrift/server/TConnectedClient.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000239 src/thrift/server/TServer.h \
Roger Meierec847ac2015-05-09 21:33:42 +0200240 src/thrift/server/TServerFramework.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000241 src/thrift/server/TSimpleServer.h \
242 src/thrift/server/TThreadPoolServer.h \
243 src/thrift/server/TThreadedServer.h \
244 src/thrift/server/TNonblockingServer.h
Marc Slemko9d4a3e22006-07-21 19:53:48 +0000245
Aditya Agarwal000b1112007-08-31 08:03:05 +0000246include_processordir = $(include_thriftdir)/processor
247include_processor_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000248 src/thrift/processor/PeekProcessor.h \
Roger Meier3a931b52013-03-26 22:14:03 +0100249 src/thrift/processor/StatsProcessor.h \
250 src/thrift/processor/TMultiplexedProcessor.h
Aditya Agarwal000b1112007-08-31 08:03:05 +0000251
David Reiss5ddabb82010-10-06 17:09:37 +0000252include_asyncdir = $(include_thriftdir)/async
253include_async_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000254 src/thrift/async/TAsyncChannel.h \
255 src/thrift/async/TAsyncDispatchProcessor.h \
256 src/thrift/async/TAsyncProcessor.h \
257 src/thrift/async/TAsyncBufferProcessor.h \
258 src/thrift/async/TAsyncProtocolProcessor.h \
Ben Craigde78b542015-07-22 19:38:08 -0500259 src/thrift/async/TConcurrentClientSyncInfo.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000260 src/thrift/async/TEvhttpClientChannel.h \
261 src/thrift/async/TEvhttpServer.h
David Reiss5ddabb82010-10-06 17:09:37 +0000262
Roger Meier86e89862012-02-10 19:53:20 +0000263include_qtdir = $(include_thriftdir)/qt
264include_qt_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000265 src/thrift/qt/TQIODeviceTransport.h \
266 src/thrift/qt/TQTcpServer.h
Roger Meier86e89862012-02-10 19:53:20 +0000267
Roger Meier2be7f242012-05-10 09:01:45 +0000268THRIFT = $(top_builddir)/compiler/cpp/thrift
269
Jake Farrelle0c53162011-11-16 12:58:36 +0000270WINDOWS_DIST = \
Roger Meier67377e72012-05-10 21:17:53 +0000271 src/thrift/windows \
Jake Farrelle0c53162011-11-16 12:58:36 +0000272 thrift.sln \
273 libthrift.vcxproj \
274 libthrift.vcxproj.filters \
275 libthriftnb.vcxproj \
jfarrell8fd8c632014-07-10 09:14:51 -0400276 libthriftnb.vcxproj.filters \
277 3rdparty.props
Jake Farrelle0c53162011-11-16 12:58:36 +0000278
David Reiss832b2622007-12-28 18:25:33 +0000279EXTRA_DIST = \
jfarrellf13e4312015-08-25 00:39:29 -0400280 CMakeLists.txt \
281 coding_standards.md \
Roger Meier16fcad02014-03-16 21:12:11 +0100282 README.md \
David Reiss0c90f6f2008-02-06 22:18:40 +0000283 thrift-nb.pc.in \
284 thrift.pc.in \
Jake Farrelle0c53162011-11-16 12:58:36 +0000285 thrift-z.pc.in \
Roger Meier86e89862012-02-10 19:53:20 +0000286 thrift-qt.pc.in \
Nobuaki Sukegawa66228772014-12-07 21:45:33 +0900287 thrift-qt5.pc.in \
jfarrellf13e4312015-08-25 00:39:29 -0400288 src/thrift/qt/CMakeLists.txt \
Jake Farrelle0c53162011-11-16 12:58:36 +0000289 $(WINDOWS_DIST)
Konrad Grochowski16a23a62014-11-13 15:33:38 +0100290
291style-local:
292 $(CPPSTYLE_CMD)