blob: cb30bda4a2ed4884632a59bb32f817dfa82d61c0 [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
31SUBDIRS += test
32endif
David Reiss351e22b2010-08-31 16:51:19 +000033
Mark Sleeb16074d2007-11-28 05:54:33 +000034pkgconfigdir = $(libdir)/pkgconfig
35
David Reiss79ae0f82007-09-17 21:15:47 +000036lib_LTLIBRARIES = libthrift.la
Mark Sleeb16074d2007-11-28 05:54:33 +000037pkgconfig_DATA = thrift.pc
Jon Parisea195a252014-12-11 17:36:12 -080038libthrift_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS) $(OPENSSL_LDFLAGS)
Mark Sleeb16074d2007-11-28 05:54:33 +000039
David Reiss79ae0f82007-09-17 21:15:47 +000040## We only build the extra libraries if we have the dependencies,
41## but we install all of the headers unconditionally.
42if AMX_HAVE_LIBEVENT
43lib_LTLIBRARIES += libthriftnb.la
Mark Sleeb16074d2007-11-28 05:54:33 +000044pkgconfig_DATA += thrift-nb.pc
David Reiss79ae0f82007-09-17 21:15:47 +000045endif
David Reissfaebedd2007-09-17 23:20:38 +000046if AMX_HAVE_ZLIB
47lib_LTLIBRARIES += libthriftz.la
Mark Sleeb16074d2007-11-28 05:54:33 +000048pkgconfig_DATA += thrift-z.pc
David Reissfaebedd2007-09-17 23:20:38 +000049endif
Roger Meier86e89862012-02-10 19:53:20 +000050if AMX_HAVE_QT
51lib_LTLIBRARIES += libthriftqt.la
52pkgconfig_DATA += thrift-qt.pc
53endif
Nobuaki Sukegawa66228772014-12-07 21:45:33 +090054if AMX_HAVE_QT5
55lib_LTLIBRARIES += libthriftqt5.la
56pkgconfig_DATA += thrift-qt5.pc
57endif
Marc Slemko6f038a72006-08-03 18:58:09 +000058
Roger Meierec300e32014-10-13 02:13:35 +020059AM_CXXFLAGS = -Wall -Wextra -pedantic
Jon Parisea195a252014-12-11 17:36:12 -080060AM_CPPFLAGS = $(BOOST_CPPFLAGS) $(OPENSSL_INCLUDES) -I$(srcdir)/src
61AM_LDFLAGS = $(BOOST_LDFLAGS) $(OPENSSL_LDFLAGS)
Marc Slemko9d4a3e22006-07-21 19:53:48 +000062
David Reissfaebedd2007-09-17 23:20:38 +000063# Define the source files for the module
Marc Slemko9d4a3e22006-07-21 19:53:48 +000064
Roger Meier49ff8b12012-04-13 09:12:31 +000065libthrift_la_SOURCES = src/thrift/Thrift.cpp \
66 src/thrift/TApplicationException.cpp \
67 src/thrift/VirtualProfiling.cpp \
68 src/thrift/concurrency/ThreadManager.cpp \
69 src/thrift/concurrency/TimerManager.cpp \
70 src/thrift/concurrency/Util.cpp \
71 src/thrift/protocol/TDebugProtocol.cpp \
72 src/thrift/protocol/TDenseProtocol.cpp \
73 src/thrift/protocol/TJSONProtocol.cpp \
74 src/thrift/protocol/TBase64Utils.cpp \
Roger Meier3a931b52013-03-26 22:14:03 +010075 src/thrift/protocol/TMultiplexedProtocol.cpp \
Roger Meier49ff8b12012-04-13 09:12:31 +000076 src/thrift/transport/TTransportException.cpp \
77 src/thrift/transport/TFDTransport.cpp \
78 src/thrift/transport/TFileTransport.cpp \
79 src/thrift/transport/TSimpleFileTransport.cpp \
80 src/thrift/transport/THttpTransport.cpp \
81 src/thrift/transport/THttpClient.cpp \
82 src/thrift/transport/THttpServer.cpp \
83 src/thrift/transport/TSocket.cpp \
Roger Meier7d0a0402012-06-05 19:57:10 +000084 src/thrift/transport/TPipe.cpp \
85 src/thrift/transport/TPipeServer.cpp \
Roger Meier49ff8b12012-04-13 09:12:31 +000086 src/thrift/transport/TSSLSocket.cpp \
87 src/thrift/transport/TSocketPool.cpp \
88 src/thrift/transport/TServerSocket.cpp \
89 src/thrift/transport/TSSLServerSocket.cpp \
90 src/thrift/transport/TTransportUtils.cpp \
91 src/thrift/transport/TBufferTransports.cpp \
Jim King5ec805b2015-04-26 07:52:40 -040092 src/thrift/server/TConnectedClient.cpp \
Roger Meier49ff8b12012-04-13 09:12:31 +000093 src/thrift/server/TServer.cpp \
94 src/thrift/server/TSimpleServer.cpp \
95 src/thrift/server/TThreadPoolServer.cpp \
96 src/thrift/server/TThreadedServer.cpp \
97 src/thrift/async/TAsyncChannel.cpp \
98 src/thrift/processor/PeekProcessor.cpp
Aditya Agarwal000b1112007-08-31 08:03:05 +000099
Roger Meier3faaedf2011-10-02 10:51:45 +0000100if WITH_BOOSTTHREADS
Roger Meier49ff8b12012-04-13 09:12:31 +0000101libthrift_la_SOURCES += src/thrift/concurrency/BoostThreadFactory.cpp \
102 src/thrift/concurrency/BoostMonitor.cpp \
103 src/thrift/concurrency/BoostMutex.cpp
Roger Meier3faaedf2011-10-02 10:51:45 +0000104else
Roger Meier49ff8b12012-04-13 09:12:31 +0000105libthrift_la_SOURCES += src/thrift/concurrency/Mutex.cpp \
106 src/thrift/concurrency/Monitor.cpp \
107 src/thrift/concurrency/PosixThreadFactory.cpp
Roger Meier3faaedf2011-10-02 10:51:45 +0000108endif
109
Roger Meier49ff8b12012-04-13 09:12:31 +0000110libthriftnb_la_SOURCES = src/thrift/server/TNonblockingServer.cpp \
111 src/thrift/async/TAsyncProtocolProcessor.cpp \
112 src/thrift/async/TEvhttpServer.cpp \
jfarrell8fd8c632014-07-10 09:14:51 -0400113 src/thrift/async/TEvhttpClientChannel.cpp
Marc Slemko9d4a3e22006-07-21 19:53:48 +0000114
Roger Meier49ff8b12012-04-13 09:12:31 +0000115libthriftz_la_SOURCES = src/thrift/transport/TZlibTransport.cpp
David Reissfaebedd2007-09-17 23:20:38 +0000116
Roger Meier33eaa0f2012-04-13 09:13:13 +0000117libthriftqt_la_MOC = src/thrift/qt/moc_TQTcpServer.cpp
Jens Geyer2ac3a3c2014-12-23 18:18:58 +0100118nodist_libthriftqt_la_SOURCES = $(libthriftqt_la_MOC)
119libthriftqt_la_SOURCES = src/thrift/qt/TQIODeviceTransport.cpp \
Roger Meier49ff8b12012-04-13 09:12:31 +0000120 src/thrift/qt/TQTcpServer.cpp
Roger Meier86e89862012-02-10 19:53:20 +0000121CLEANFILES = $(libthriftqt_la_MOC)
122
Nobuaki Sukegawa66228772014-12-07 21:45:33 +0900123libthriftqt5_la_MOC = src/thrift/qt/moc__TQTcpServer.cpp
Jens Geyer2ac3a3c2014-12-23 18:18:58 +0100124nodist_libthriftqt5_la_SOURCES = $(libthriftqt5_la_MOC)
125libthriftqt5_la_SOURCES = src/thrift/qt/TQIODeviceTransport.cpp \
126 src/thrift/qt/TQTcpServer.cpp
127CLEANFILES += $(libthriftqt5_la_MOC)
Nobuaki Sukegawa66228772014-12-07 21:45:33 +0900128
David Reissfaebedd2007-09-17 23:20:38 +0000129# Flags for the various libraries
David Reissc6c64982008-06-11 01:16:45 +0000130libthriftnb_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBEVENT_CPPFLAGS)
131libthriftz_la_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CPPFLAGS)
Roger Meier86e89862012-02-10 19:53:20 +0000132libthriftqt_la_CPPFLAGS = $(AM_CPPFLAGS) $(QT_CFLAGS)
Nobuaki Sukegawa66228772014-12-07 21:45:33 +0900133libthriftqt5_la_CPPFLAGS = $(AM_CPPFLAGS) $(QT5_CFLAGS)
134if QT5_REDUCE_RELOCATIONS
135libthriftqt5_la_CPPFLAGS += -fPIC
136endif
Christian Lavoieaf65f1b2010-11-24 21:58:05 +0000137libthriftnb_la_CXXFLAGS = $(AM_CXXFLAGS)
138libthriftz_la_CXXFLAGS = $(AM_CXXFLAGS)
Roger Meier86e89862012-02-10 19:53:20 +0000139libthriftqt_la_CXXFLAGS = $(AM_CXXFLAGS)
Nobuaki Sukegawa66228772014-12-07 21:45:33 +0900140libthriftqt5_la_CXXFLAGS = $(AM_CXXFLAGS)
Roger Meier38315782011-11-06 11:29:41 +0000141libthriftnb_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS)
142libthriftz_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS)
Roger Meier86e89862012-02-10 19:53:20 +0000143libthriftqt_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS) $(QT_LIBS)
Nobuaki Sukegawa66228772014-12-07 21:45:33 +0900144libthriftqt5_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS) $(QT5_LIBS)
Roger Meier3faaedf2011-10-02 10:51:45 +0000145
Marc Slemko16698852006-08-04 03:16:10 +0000146include_thriftdir = $(includedir)/thrift
147include_thrift_HEADERS = \
David Reissc6c64982008-06-11 01:16:45 +0000148 $(top_builddir)/config.h \
Jens Geyer80954472013-06-25 21:36:29 +0200149 src/thrift/thrift-config.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000150 src/thrift/TDispatchProcessor.h \
151 src/thrift/Thrift.h \
152 src/thrift/TReflectionLocal.h \
153 src/thrift/TProcessor.h \
154 src/thrift/TApplicationException.h \
Roger Meierd34bea02013-01-22 21:36:42 +0100155 src/thrift/TLogging.h \
Konrad Grochowskib3f6ea12014-09-02 16:00:47 +0200156 src/thrift/cxxfunctional.h \
157 src/thrift/TToString.h
Marc Slemko16698852006-08-04 03:16:10 +0000158
Marc Slemkod42a2c22006-08-10 03:30:18 +0000159include_concurrencydir = $(include_thriftdir)/concurrency
Marc Slemko16698852006-08-04 03:16:10 +0000160include_concurrency_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000161 src/thrift/concurrency/BoostThreadFactory.h \
162 src/thrift/concurrency/Exception.h \
163 src/thrift/concurrency/Mutex.h \
164 src/thrift/concurrency/Monitor.h \
165 src/thrift/concurrency/PlatformThreadFactory.h \
166 src/thrift/concurrency/PosixThreadFactory.h \
jfarrellb5912032013-08-15 19:21:43 -0400167 src/thrift/concurrency/StdMonitor.cpp \
168 src/thrift/concurrency/StdMutex.cpp \
169 src/thrift/concurrency/StdThreadFactory.cpp \
170 src/thrift/concurrency/StdThreadFactory.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000171 src/thrift/concurrency/Thread.h \
172 src/thrift/concurrency/ThreadManager.h \
173 src/thrift/concurrency/TimerManager.h \
174 src/thrift/concurrency/FunctionRunner.h \
175 src/thrift/concurrency/Util.h
Marc Slemko16698852006-08-04 03:16:10 +0000176
Marc Slemkod42a2c22006-08-10 03:30:18 +0000177include_protocoldir = $(include_thriftdir)/protocol
Marc Slemko16698852006-08-04 03:16:10 +0000178include_protocol_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000179 src/thrift/protocol/TBinaryProtocol.h \
180 src/thrift/protocol/TBinaryProtocol.tcc \
181 src/thrift/protocol/TCompactProtocol.h \
182 src/thrift/protocol/TCompactProtocol.tcc \
183 src/thrift/protocol/TDenseProtocol.h \
184 src/thrift/protocol/TDebugProtocol.h \
185 src/thrift/protocol/TBase64Utils.h \
186 src/thrift/protocol/TJSONProtocol.h \
Roger Meier3a931b52013-03-26 22:14:03 +0100187 src/thrift/protocol/TMultiplexedProtocol.h \
188 src/thrift/protocol/TProtocolDecorator.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000189 src/thrift/protocol/TProtocolTap.h \
190 src/thrift/protocol/TProtocolException.h \
191 src/thrift/protocol/TVirtualProtocol.h \
192 src/thrift/protocol/TProtocol.h
Marc Slemko16698852006-08-04 03:16:10 +0000193
Marc Slemkod42a2c22006-08-10 03:30:18 +0000194include_transportdir = $(include_thriftdir)/transport
Marc Slemko16698852006-08-04 03:16:10 +0000195include_transport_HEADERS = \
Jens Geyer80954472013-06-25 21:36:29 +0200196 src/thrift/transport/PlatformSocket.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000197 src/thrift/transport/TFDTransport.h \
198 src/thrift/transport/TFileTransport.h \
199 src/thrift/transport/TSimpleFileTransport.h \
200 src/thrift/transport/TServerSocket.h \
201 src/thrift/transport/TSSLServerSocket.h \
202 src/thrift/transport/TServerTransport.h \
203 src/thrift/transport/THttpTransport.h \
204 src/thrift/transport/THttpClient.h \
205 src/thrift/transport/THttpServer.h \
206 src/thrift/transport/TSocket.h \
Roger Meier7d0a0402012-06-05 19:57:10 +0000207 src/thrift/transport/TPipe.h \
208 src/thrift/transport/TPipeServer.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000209 src/thrift/transport/TSSLSocket.h \
210 src/thrift/transport/TSocketPool.h \
211 src/thrift/transport/TVirtualTransport.h \
212 src/thrift/transport/TTransport.h \
213 src/thrift/transport/TTransportException.h \
214 src/thrift/transport/TTransportUtils.h \
215 src/thrift/transport/TBufferTransports.h \
216 src/thrift/transport/TShortReadTransport.h \
217 src/thrift/transport/TZlibTransport.h
Marc Slemko16698852006-08-04 03:16:10 +0000218
Marc Slemkod42a2c22006-08-10 03:30:18 +0000219include_serverdir = $(include_thriftdir)/server
Marc Slemko16698852006-08-04 03:16:10 +0000220include_server_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000221 src/thrift/server/TServer.h \
222 src/thrift/server/TSimpleServer.h \
223 src/thrift/server/TThreadPoolServer.h \
224 src/thrift/server/TThreadedServer.h \
225 src/thrift/server/TNonblockingServer.h
Marc Slemko9d4a3e22006-07-21 19:53:48 +0000226
Aditya Agarwal000b1112007-08-31 08:03:05 +0000227include_processordir = $(include_thriftdir)/processor
228include_processor_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000229 src/thrift/processor/PeekProcessor.h \
Roger Meier3a931b52013-03-26 22:14:03 +0100230 src/thrift/processor/StatsProcessor.h \
231 src/thrift/processor/TMultiplexedProcessor.h
Aditya Agarwal000b1112007-08-31 08:03:05 +0000232
David Reiss5ddabb82010-10-06 17:09:37 +0000233include_asyncdir = $(include_thriftdir)/async
234include_async_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000235 src/thrift/async/TAsyncChannel.h \
236 src/thrift/async/TAsyncDispatchProcessor.h \
237 src/thrift/async/TAsyncProcessor.h \
238 src/thrift/async/TAsyncBufferProcessor.h \
239 src/thrift/async/TAsyncProtocolProcessor.h \
240 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
Roger Meier2be7f242012-05-10 09:01:45 +0000248THRIFT = $(top_builddir)/compiler/cpp/thrift
249
Jake Farrelle0c53162011-11-16 12:58:36 +0000250WINDOWS_DIST = \
Roger Meier67377e72012-05-10 21:17:53 +0000251 src/thrift/windows \
Jake Farrelle0c53162011-11-16 12:58:36 +0000252 thrift.sln \
253 libthrift.vcxproj \
254 libthrift.vcxproj.filters \
255 libthriftnb.vcxproj \
jfarrell8fd8c632014-07-10 09:14:51 -0400256 libthriftnb.vcxproj.filters \
257 3rdparty.props
Jake Farrelle0c53162011-11-16 12:58:36 +0000258
David Reiss832b2622007-12-28 18:25:33 +0000259EXTRA_DIST = \
Roger Meier16fcad02014-03-16 21:12:11 +0100260 README.md \
David Reiss0c90f6f2008-02-06 22:18:40 +0000261 thrift-nb.pc.in \
262 thrift.pc.in \
Jake Farrelle0c53162011-11-16 12:58:36 +0000263 thrift-z.pc.in \
Roger Meier86e89862012-02-10 19:53:20 +0000264 thrift-qt.pc.in \
Nobuaki Sukegawa66228772014-12-07 21:45:33 +0900265 thrift-qt5.pc.in \
Jake Farrelle0c53162011-11-16 12:58:36 +0000266 $(WINDOWS_DIST)
Konrad Grochowski16a23a62014-11-13 15:33:38 +0100267
268style-local:
269 $(CPPSTYLE_CMD)