blob: 5206db8e94414c2a5a21b794efdbe8bf8bac14d9 [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
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
Roger Meier38315782011-11-06 11:29:41 +000035libthrift_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS)
Mark Sleeb16074d2007-11-28 05:54:33 +000036
David Reiss79ae0f82007-09-17 21:15:47 +000037## We only build the extra libraries if we have the dependencies,
38## but we install all of the headers unconditionally.
39if AMX_HAVE_LIBEVENT
40lib_LTLIBRARIES += libthriftnb.la
Mark Sleeb16074d2007-11-28 05:54:33 +000041pkgconfig_DATA += thrift-nb.pc
David Reiss79ae0f82007-09-17 21:15:47 +000042endif
David Reissfaebedd2007-09-17 23:20:38 +000043if AMX_HAVE_ZLIB
44lib_LTLIBRARIES += libthriftz.la
Mark Sleeb16074d2007-11-28 05:54:33 +000045pkgconfig_DATA += thrift-z.pc
David Reissfaebedd2007-09-17 23:20:38 +000046endif
Roger Meier86e89862012-02-10 19:53:20 +000047if AMX_HAVE_QT
48lib_LTLIBRARIES += libthriftqt.la
49pkgconfig_DATA += thrift-qt.pc
50endif
Marc Slemko6f038a72006-08-03 18:58:09 +000051
Roger Meierec300e32014-10-13 02:13:35 +020052AM_CXXFLAGS = -Wall -Wextra -pedantic
Roger Meier16ee0d12013-05-30 09:57:00 +020053AM_CPPFLAGS = $(BOOST_CPPFLAGS) -I$(srcdir)/src
Roger Meier3faaedf2011-10-02 10:51:45 +000054AM_LDFLAGS = $(BOOST_LDFLAGS)
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
Roger Meier49ff8b12012-04-13 09:12:31 +000058libthrift_la_SOURCES = src/thrift/Thrift.cpp \
59 src/thrift/TApplicationException.cpp \
60 src/thrift/VirtualProfiling.cpp \
61 src/thrift/concurrency/ThreadManager.cpp \
62 src/thrift/concurrency/TimerManager.cpp \
63 src/thrift/concurrency/Util.cpp \
64 src/thrift/protocol/TDebugProtocol.cpp \
65 src/thrift/protocol/TDenseProtocol.cpp \
66 src/thrift/protocol/TJSONProtocol.cpp \
67 src/thrift/protocol/TBase64Utils.cpp \
Roger Meier3a931b52013-03-26 22:14:03 +010068 src/thrift/protocol/TMultiplexedProtocol.cpp \
Roger Meier49ff8b12012-04-13 09:12:31 +000069 src/thrift/transport/TTransportException.cpp \
70 src/thrift/transport/TFDTransport.cpp \
71 src/thrift/transport/TFileTransport.cpp \
72 src/thrift/transport/TSimpleFileTransport.cpp \
73 src/thrift/transport/THttpTransport.cpp \
74 src/thrift/transport/THttpClient.cpp \
75 src/thrift/transport/THttpServer.cpp \
76 src/thrift/transport/TSocket.cpp \
Roger Meier7d0a0402012-06-05 19:57:10 +000077 src/thrift/transport/TPipe.cpp \
78 src/thrift/transport/TPipeServer.cpp \
Roger Meier49ff8b12012-04-13 09:12:31 +000079 src/thrift/transport/TSSLSocket.cpp \
80 src/thrift/transport/TSocketPool.cpp \
81 src/thrift/transport/TServerSocket.cpp \
82 src/thrift/transport/TSSLServerSocket.cpp \
83 src/thrift/transport/TTransportUtils.cpp \
84 src/thrift/transport/TBufferTransports.cpp \
85 src/thrift/server/TServer.cpp \
86 src/thrift/server/TSimpleServer.cpp \
87 src/thrift/server/TThreadPoolServer.cpp \
88 src/thrift/server/TThreadedServer.cpp \
89 src/thrift/async/TAsyncChannel.cpp \
90 src/thrift/processor/PeekProcessor.cpp
Aditya Agarwal000b1112007-08-31 08:03:05 +000091
Roger Meier3faaedf2011-10-02 10:51:45 +000092if WITH_BOOSTTHREADS
Roger Meier49ff8b12012-04-13 09:12:31 +000093libthrift_la_SOURCES += src/thrift/concurrency/BoostThreadFactory.cpp \
94 src/thrift/concurrency/BoostMonitor.cpp \
95 src/thrift/concurrency/BoostMutex.cpp
Roger Meier3faaedf2011-10-02 10:51:45 +000096else
Roger Meier49ff8b12012-04-13 09:12:31 +000097libthrift_la_SOURCES += src/thrift/concurrency/Mutex.cpp \
98 src/thrift/concurrency/Monitor.cpp \
99 src/thrift/concurrency/PosixThreadFactory.cpp
Roger Meier3faaedf2011-10-02 10:51:45 +0000100endif
101
Roger Meier49ff8b12012-04-13 09:12:31 +0000102libthriftnb_la_SOURCES = src/thrift/server/TNonblockingServer.cpp \
103 src/thrift/async/TAsyncProtocolProcessor.cpp \
104 src/thrift/async/TEvhttpServer.cpp \
jfarrell8fd8c632014-07-10 09:14:51 -0400105 src/thrift/async/TEvhttpClientChannel.cpp
Marc Slemko9d4a3e22006-07-21 19:53:48 +0000106
Roger Meier49ff8b12012-04-13 09:12:31 +0000107libthriftz_la_SOURCES = src/thrift/transport/TZlibTransport.cpp
David Reissfaebedd2007-09-17 23:20:38 +0000108
Roger Meier33eaa0f2012-04-13 09:13:13 +0000109libthriftqt_la_MOC = src/thrift/qt/moc_TQTcpServer.cpp
Roger Meier86e89862012-02-10 19:53:20 +0000110libthriftqt_la_SOURCES = $(libthriftqt_la_MOC) \
Roger Meier49ff8b12012-04-13 09:12:31 +0000111 src/thrift/qt/TQIODeviceTransport.cpp \
112 src/thrift/qt/TQTcpServer.cpp
Roger Meier86e89862012-02-10 19:53:20 +0000113CLEANFILES = $(libthriftqt_la_MOC)
114
David Reissfaebedd2007-09-17 23:20:38 +0000115# Flags for the various libraries
David Reissc6c64982008-06-11 01:16:45 +0000116libthriftnb_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBEVENT_CPPFLAGS)
117libthriftz_la_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CPPFLAGS)
Roger Meier86e89862012-02-10 19:53:20 +0000118libthriftqt_la_CPPFLAGS = $(AM_CPPFLAGS) $(QT_CFLAGS)
Christian Lavoieaf65f1b2010-11-24 21:58:05 +0000119libthriftnb_la_CXXFLAGS = $(AM_CXXFLAGS)
120libthriftz_la_CXXFLAGS = $(AM_CXXFLAGS)
Roger Meier86e89862012-02-10 19:53:20 +0000121libthriftqt_la_CXXFLAGS = $(AM_CXXFLAGS)
Roger Meier38315782011-11-06 11:29:41 +0000122libthriftnb_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS)
123libthriftz_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS)
Roger Meier86e89862012-02-10 19:53:20 +0000124libthriftqt_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS) $(QT_LIBS)
Roger Meier3faaedf2011-10-02 10:51:45 +0000125
Marc Slemko16698852006-08-04 03:16:10 +0000126include_thriftdir = $(includedir)/thrift
127include_thrift_HEADERS = \
David Reissc6c64982008-06-11 01:16:45 +0000128 $(top_builddir)/config.h \
Jens Geyer80954472013-06-25 21:36:29 +0200129 src/thrift/thrift-config.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000130 src/thrift/TDispatchProcessor.h \
131 src/thrift/Thrift.h \
132 src/thrift/TReflectionLocal.h \
133 src/thrift/TProcessor.h \
134 src/thrift/TApplicationException.h \
Roger Meierd34bea02013-01-22 21:36:42 +0100135 src/thrift/TLogging.h \
Konrad Grochowskib3f6ea12014-09-02 16:00:47 +0200136 src/thrift/cxxfunctional.h \
137 src/thrift/TToString.h
Marc Slemko16698852006-08-04 03:16:10 +0000138
Marc Slemkod42a2c22006-08-10 03:30:18 +0000139include_concurrencydir = $(include_thriftdir)/concurrency
Marc Slemko16698852006-08-04 03:16:10 +0000140include_concurrency_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000141 src/thrift/concurrency/BoostThreadFactory.h \
142 src/thrift/concurrency/Exception.h \
143 src/thrift/concurrency/Mutex.h \
144 src/thrift/concurrency/Monitor.h \
145 src/thrift/concurrency/PlatformThreadFactory.h \
146 src/thrift/concurrency/PosixThreadFactory.h \
jfarrellb5912032013-08-15 19:21:43 -0400147 src/thrift/concurrency/StdMonitor.cpp \
148 src/thrift/concurrency/StdMutex.cpp \
149 src/thrift/concurrency/StdThreadFactory.cpp \
150 src/thrift/concurrency/StdThreadFactory.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000151 src/thrift/concurrency/Thread.h \
152 src/thrift/concurrency/ThreadManager.h \
153 src/thrift/concurrency/TimerManager.h \
154 src/thrift/concurrency/FunctionRunner.h \
155 src/thrift/concurrency/Util.h
Marc Slemko16698852006-08-04 03:16:10 +0000156
Marc Slemkod42a2c22006-08-10 03:30:18 +0000157include_protocoldir = $(include_thriftdir)/protocol
Marc Slemko16698852006-08-04 03:16:10 +0000158include_protocol_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000159 src/thrift/protocol/TBinaryProtocol.h \
160 src/thrift/protocol/TBinaryProtocol.tcc \
161 src/thrift/protocol/TCompactProtocol.h \
162 src/thrift/protocol/TCompactProtocol.tcc \
163 src/thrift/protocol/TDenseProtocol.h \
164 src/thrift/protocol/TDebugProtocol.h \
165 src/thrift/protocol/TBase64Utils.h \
166 src/thrift/protocol/TJSONProtocol.h \
Roger Meier3a931b52013-03-26 22:14:03 +0100167 src/thrift/protocol/TMultiplexedProtocol.h \
168 src/thrift/protocol/TProtocolDecorator.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000169 src/thrift/protocol/TProtocolTap.h \
170 src/thrift/protocol/TProtocolException.h \
171 src/thrift/protocol/TVirtualProtocol.h \
172 src/thrift/protocol/TProtocol.h
Marc Slemko16698852006-08-04 03:16:10 +0000173
Marc Slemkod42a2c22006-08-10 03:30:18 +0000174include_transportdir = $(include_thriftdir)/transport
Marc Slemko16698852006-08-04 03:16:10 +0000175include_transport_HEADERS = \
Jens Geyer80954472013-06-25 21:36:29 +0200176 src/thrift/transport/PlatformSocket.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000177 src/thrift/transport/TFDTransport.h \
178 src/thrift/transport/TFileTransport.h \
179 src/thrift/transport/TSimpleFileTransport.h \
180 src/thrift/transport/TServerSocket.h \
181 src/thrift/transport/TSSLServerSocket.h \
182 src/thrift/transport/TServerTransport.h \
183 src/thrift/transport/THttpTransport.h \
184 src/thrift/transport/THttpClient.h \
185 src/thrift/transport/THttpServer.h \
186 src/thrift/transport/TSocket.h \
Roger Meier7d0a0402012-06-05 19:57:10 +0000187 src/thrift/transport/TPipe.h \
188 src/thrift/transport/TPipeServer.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000189 src/thrift/transport/TSSLSocket.h \
190 src/thrift/transport/TSocketPool.h \
191 src/thrift/transport/TVirtualTransport.h \
192 src/thrift/transport/TTransport.h \
193 src/thrift/transport/TTransportException.h \
194 src/thrift/transport/TTransportUtils.h \
195 src/thrift/transport/TBufferTransports.h \
196 src/thrift/transport/TShortReadTransport.h \
197 src/thrift/transport/TZlibTransport.h
Marc Slemko16698852006-08-04 03:16:10 +0000198
Marc Slemkod42a2c22006-08-10 03:30:18 +0000199include_serverdir = $(include_thriftdir)/server
Marc Slemko16698852006-08-04 03:16:10 +0000200include_server_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000201 src/thrift/server/TServer.h \
202 src/thrift/server/TSimpleServer.h \
203 src/thrift/server/TThreadPoolServer.h \
204 src/thrift/server/TThreadedServer.h \
205 src/thrift/server/TNonblockingServer.h
Marc Slemko9d4a3e22006-07-21 19:53:48 +0000206
Aditya Agarwal000b1112007-08-31 08:03:05 +0000207include_processordir = $(include_thriftdir)/processor
208include_processor_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000209 src/thrift/processor/PeekProcessor.h \
Roger Meier3a931b52013-03-26 22:14:03 +0100210 src/thrift/processor/StatsProcessor.h \
211 src/thrift/processor/TMultiplexedProcessor.h
Aditya Agarwal000b1112007-08-31 08:03:05 +0000212
David Reiss5ddabb82010-10-06 17:09:37 +0000213include_asyncdir = $(include_thriftdir)/async
214include_async_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000215 src/thrift/async/TAsyncChannel.h \
216 src/thrift/async/TAsyncDispatchProcessor.h \
217 src/thrift/async/TAsyncProcessor.h \
218 src/thrift/async/TAsyncBufferProcessor.h \
219 src/thrift/async/TAsyncProtocolProcessor.h \
220 src/thrift/async/TEvhttpClientChannel.h \
221 src/thrift/async/TEvhttpServer.h
David Reiss5ddabb82010-10-06 17:09:37 +0000222
Roger Meier86e89862012-02-10 19:53:20 +0000223include_qtdir = $(include_thriftdir)/qt
224include_qt_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000225 src/thrift/qt/TQIODeviceTransport.h \
226 src/thrift/qt/TQTcpServer.h
Roger Meier86e89862012-02-10 19:53:20 +0000227
Roger Meier2be7f242012-05-10 09:01:45 +0000228THRIFT = $(top_builddir)/compiler/cpp/thrift
229
Jake Farrelle0c53162011-11-16 12:58:36 +0000230WINDOWS_DIST = \
Roger Meier67377e72012-05-10 21:17:53 +0000231 src/thrift/windows \
Jake Farrelle0c53162011-11-16 12:58:36 +0000232 thrift.sln \
233 libthrift.vcxproj \
234 libthrift.vcxproj.filters \
235 libthriftnb.vcxproj \
jfarrell8fd8c632014-07-10 09:14:51 -0400236 libthriftnb.vcxproj.filters \
237 3rdparty.props
Jake Farrelle0c53162011-11-16 12:58:36 +0000238
David Reiss832b2622007-12-28 18:25:33 +0000239EXTRA_DIST = \
Roger Meier16fcad02014-03-16 21:12:11 +0100240 README.md \
David Reiss0c90f6f2008-02-06 22:18:40 +0000241 thrift-nb.pc.in \
242 thrift.pc.in \
Jake Farrelle0c53162011-11-16 12:58:36 +0000243 thrift-z.pc.in \
Roger Meier86e89862012-02-10 19:53:20 +0000244 thrift-qt.pc.in \
Jake Farrelle0c53162011-11-16 12:58:36 +0000245 $(WINDOWS_DIST)