blob: 05caf8cd62ec150aa613a1b51528752a143fcb5b [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 Meier86e89862012-02-10 19:53:20 +000020moc_%.cpp: %.h
21 $(QT_MOC) $(QT_CFLAGS) $< -o $@
22
Jake Farrell627f1a02011-09-14 03:43:49 +000023SUBDIRS = .
24
25if WITH_TESTS
26SUBDIRS += test
27endif
David Reiss351e22b2010-08-31 16:51:19 +000028
Mark Sleeb16074d2007-11-28 05:54:33 +000029pkgconfigdir = $(libdir)/pkgconfig
30
David Reiss79ae0f82007-09-17 21:15:47 +000031lib_LTLIBRARIES = libthrift.la
Mark Sleeb16074d2007-11-28 05:54:33 +000032pkgconfig_DATA = thrift.pc
Roger Meier38315782011-11-06 11:29:41 +000033libthrift_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS)
Mark Sleeb16074d2007-11-28 05:54:33 +000034
David Reiss79ae0f82007-09-17 21:15:47 +000035## We only build the extra libraries if we have the dependencies,
36## but we install all of the headers unconditionally.
37if AMX_HAVE_LIBEVENT
38lib_LTLIBRARIES += libthriftnb.la
Mark Sleeb16074d2007-11-28 05:54:33 +000039pkgconfig_DATA += thrift-nb.pc
David Reiss79ae0f82007-09-17 21:15:47 +000040endif
David Reissfaebedd2007-09-17 23:20:38 +000041if AMX_HAVE_ZLIB
42lib_LTLIBRARIES += libthriftz.la
Mark Sleeb16074d2007-11-28 05:54:33 +000043pkgconfig_DATA += thrift-z.pc
David Reissfaebedd2007-09-17 23:20:38 +000044endif
Roger Meier86e89862012-02-10 19:53:20 +000045if AMX_HAVE_QT
46lib_LTLIBRARIES += libthriftqt.la
47pkgconfig_DATA += thrift-qt.pc
48endif
Marc Slemko6f038a72006-08-03 18:58:09 +000049
Jake Farrellea949fb2011-12-13 20:02:33 +000050AM_CXXFLAGS = -Wall
Roger Meier49ff8b12012-04-13 09:12:31 +000051AM_CPPFLAGS = $(BOOST_CPPFLAGS) -I$(srcdir)/src -I$(srcdir)/src/thrift
Roger Meier3faaedf2011-10-02 10:51:45 +000052AM_LDFLAGS = $(BOOST_LDFLAGS)
Marc Slemko9d4a3e22006-07-21 19:53:48 +000053
David Reissfaebedd2007-09-17 23:20:38 +000054# Define the source files for the module
Marc Slemko9d4a3e22006-07-21 19:53:48 +000055
Roger Meier49ff8b12012-04-13 09:12:31 +000056libthrift_la_SOURCES = src/thrift/Thrift.cpp \
57 src/thrift/TApplicationException.cpp \
58 src/thrift/VirtualProfiling.cpp \
59 src/thrift/concurrency/ThreadManager.cpp \
60 src/thrift/concurrency/TimerManager.cpp \
61 src/thrift/concurrency/Util.cpp \
62 src/thrift/protocol/TDebugProtocol.cpp \
63 src/thrift/protocol/TDenseProtocol.cpp \
64 src/thrift/protocol/TJSONProtocol.cpp \
65 src/thrift/protocol/TBase64Utils.cpp \
Roger Meier3a931b52013-03-26 22:14:03 +010066 src/thrift/protocol/TMultiplexedProtocol.cpp \
Roger Meier49ff8b12012-04-13 09:12:31 +000067 src/thrift/transport/TTransportException.cpp \
68 src/thrift/transport/TFDTransport.cpp \
69 src/thrift/transport/TFileTransport.cpp \
70 src/thrift/transport/TSimpleFileTransport.cpp \
71 src/thrift/transport/THttpTransport.cpp \
72 src/thrift/transport/THttpClient.cpp \
73 src/thrift/transport/THttpServer.cpp \
74 src/thrift/transport/TSocket.cpp \
Roger Meier7d0a0402012-06-05 19:57:10 +000075 src/thrift/transport/TPipe.cpp \
76 src/thrift/transport/TPipeServer.cpp \
Roger Meier49ff8b12012-04-13 09:12:31 +000077 src/thrift/transport/TSSLSocket.cpp \
78 src/thrift/transport/TSocketPool.cpp \
79 src/thrift/transport/TServerSocket.cpp \
80 src/thrift/transport/TSSLServerSocket.cpp \
81 src/thrift/transport/TTransportUtils.cpp \
82 src/thrift/transport/TBufferTransports.cpp \
83 src/thrift/server/TServer.cpp \
84 src/thrift/server/TSimpleServer.cpp \
85 src/thrift/server/TThreadPoolServer.cpp \
86 src/thrift/server/TThreadedServer.cpp \
87 src/thrift/async/TAsyncChannel.cpp \
88 src/thrift/processor/PeekProcessor.cpp
Aditya Agarwal000b1112007-08-31 08:03:05 +000089
Roger Meier3faaedf2011-10-02 10:51:45 +000090if WITH_BOOSTTHREADS
Roger Meier49ff8b12012-04-13 09:12:31 +000091libthrift_la_SOURCES += src/thrift/concurrency/BoostThreadFactory.cpp \
92 src/thrift/concurrency/BoostMonitor.cpp \
93 src/thrift/concurrency/BoostMutex.cpp
Roger Meier3faaedf2011-10-02 10:51:45 +000094else
Roger Meier49ff8b12012-04-13 09:12:31 +000095libthrift_la_SOURCES += src/thrift/concurrency/Mutex.cpp \
96 src/thrift/concurrency/Monitor.cpp \
97 src/thrift/concurrency/PosixThreadFactory.cpp
Roger Meier3faaedf2011-10-02 10:51:45 +000098endif
99
Roger Meier49ff8b12012-04-13 09:12:31 +0000100libthriftnb_la_SOURCES = src/thrift/server/TNonblockingServer.cpp \
101 src/thrift/async/TAsyncProtocolProcessor.cpp \
102 src/thrift/async/TEvhttpServer.cpp \
103 src/thrift/async/TEvhttpClientChannel.cpp
Marc Slemko9d4a3e22006-07-21 19:53:48 +0000104
Roger Meier49ff8b12012-04-13 09:12:31 +0000105libthriftz_la_SOURCES = src/thrift/transport/TZlibTransport.cpp
David Reissfaebedd2007-09-17 23:20:38 +0000106
Roger Meier33eaa0f2012-04-13 09:13:13 +0000107libthriftqt_la_MOC = src/thrift/qt/moc_TQTcpServer.cpp
Roger Meier86e89862012-02-10 19:53:20 +0000108libthriftqt_la_SOURCES = $(libthriftqt_la_MOC) \
Roger Meier49ff8b12012-04-13 09:12:31 +0000109 src/thrift/qt/TQIODeviceTransport.cpp \
110 src/thrift/qt/TQTcpServer.cpp
Roger Meier86e89862012-02-10 19:53:20 +0000111CLEANFILES = $(libthriftqt_la_MOC)
112
David Reissfaebedd2007-09-17 23:20:38 +0000113# Flags for the various libraries
David Reissc6c64982008-06-11 01:16:45 +0000114libthriftnb_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBEVENT_CPPFLAGS)
115libthriftz_la_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CPPFLAGS)
Roger Meier86e89862012-02-10 19:53:20 +0000116libthriftqt_la_CPPFLAGS = $(AM_CPPFLAGS) $(QT_CFLAGS)
Christian Lavoieaf65f1b2010-11-24 21:58:05 +0000117libthriftnb_la_CXXFLAGS = $(AM_CXXFLAGS)
118libthriftz_la_CXXFLAGS = $(AM_CXXFLAGS)
Roger Meier86e89862012-02-10 19:53:20 +0000119libthriftqt_la_CXXFLAGS = $(AM_CXXFLAGS)
Roger Meier38315782011-11-06 11:29:41 +0000120libthriftnb_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS)
121libthriftz_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS)
Roger Meier86e89862012-02-10 19:53:20 +0000122libthriftqt_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS) $(QT_LIBS)
Roger Meier3faaedf2011-10-02 10:51:45 +0000123
Marc Slemko16698852006-08-04 03:16:10 +0000124include_thriftdir = $(includedir)/thrift
125include_thrift_HEADERS = \
David Reissc6c64982008-06-11 01:16:45 +0000126 $(top_builddir)/config.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000127 src/thrift/TDispatchProcessor.h \
128 src/thrift/Thrift.h \
129 src/thrift/TReflectionLocal.h \
130 src/thrift/TProcessor.h \
131 src/thrift/TApplicationException.h \
Roger Meierd34bea02013-01-22 21:36:42 +0100132 src/thrift/TLogging.h \
133 src/thrift/cxxfunctional.h
Marc Slemko16698852006-08-04 03:16:10 +0000134
Marc Slemkod42a2c22006-08-10 03:30:18 +0000135include_concurrencydir = $(include_thriftdir)/concurrency
Marc Slemko16698852006-08-04 03:16:10 +0000136include_concurrency_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000137 src/thrift/concurrency/BoostThreadFactory.h \
138 src/thrift/concurrency/Exception.h \
139 src/thrift/concurrency/Mutex.h \
140 src/thrift/concurrency/Monitor.h \
141 src/thrift/concurrency/PlatformThreadFactory.h \
142 src/thrift/concurrency/PosixThreadFactory.h \
143 src/thrift/concurrency/Thread.h \
144 src/thrift/concurrency/ThreadManager.h \
145 src/thrift/concurrency/TimerManager.h \
146 src/thrift/concurrency/FunctionRunner.h \
147 src/thrift/concurrency/Util.h
Marc Slemko16698852006-08-04 03:16:10 +0000148
Marc Slemkod42a2c22006-08-10 03:30:18 +0000149include_protocoldir = $(include_thriftdir)/protocol
Marc Slemko16698852006-08-04 03:16:10 +0000150include_protocol_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000151 src/thrift/protocol/TBinaryProtocol.h \
152 src/thrift/protocol/TBinaryProtocol.tcc \
153 src/thrift/protocol/TCompactProtocol.h \
154 src/thrift/protocol/TCompactProtocol.tcc \
155 src/thrift/protocol/TDenseProtocol.h \
156 src/thrift/protocol/TDebugProtocol.h \
157 src/thrift/protocol/TBase64Utils.h \
158 src/thrift/protocol/TJSONProtocol.h \
Roger Meier3a931b52013-03-26 22:14:03 +0100159 src/thrift/protocol/TMultiplexedProtocol.h \
160 src/thrift/protocol/TProtocolDecorator.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000161 src/thrift/protocol/TProtocolTap.h \
162 src/thrift/protocol/TProtocolException.h \
163 src/thrift/protocol/TVirtualProtocol.h \
164 src/thrift/protocol/TProtocol.h
Marc Slemko16698852006-08-04 03:16:10 +0000165
Marc Slemkod42a2c22006-08-10 03:30:18 +0000166include_transportdir = $(include_thriftdir)/transport
Marc Slemko16698852006-08-04 03:16:10 +0000167include_transport_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000168 src/thrift/transport/TFDTransport.h \
169 src/thrift/transport/TFileTransport.h \
170 src/thrift/transport/TSimpleFileTransport.h \
171 src/thrift/transport/TServerSocket.h \
172 src/thrift/transport/TSSLServerSocket.h \
173 src/thrift/transport/TServerTransport.h \
174 src/thrift/transport/THttpTransport.h \
175 src/thrift/transport/THttpClient.h \
176 src/thrift/transport/THttpServer.h \
177 src/thrift/transport/TSocket.h \
Roger Meier7d0a0402012-06-05 19:57:10 +0000178 src/thrift/transport/TPipe.h \
179 src/thrift/transport/TPipeServer.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000180 src/thrift/transport/TSSLSocket.h \
181 src/thrift/transport/TSocketPool.h \
182 src/thrift/transport/TVirtualTransport.h \
183 src/thrift/transport/TTransport.h \
184 src/thrift/transport/TTransportException.h \
185 src/thrift/transport/TTransportUtils.h \
186 src/thrift/transport/TBufferTransports.h \
187 src/thrift/transport/TShortReadTransport.h \
188 src/thrift/transport/TZlibTransport.h
Marc Slemko16698852006-08-04 03:16:10 +0000189
Marc Slemkod42a2c22006-08-10 03:30:18 +0000190include_serverdir = $(include_thriftdir)/server
Marc Slemko16698852006-08-04 03:16:10 +0000191include_server_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000192 src/thrift/server/TServer.h \
193 src/thrift/server/TSimpleServer.h \
194 src/thrift/server/TThreadPoolServer.h \
195 src/thrift/server/TThreadedServer.h \
196 src/thrift/server/TNonblockingServer.h
Marc Slemko9d4a3e22006-07-21 19:53:48 +0000197
Aditya Agarwal000b1112007-08-31 08:03:05 +0000198include_processordir = $(include_thriftdir)/processor
199include_processor_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000200 src/thrift/processor/PeekProcessor.h \
Roger Meier3a931b52013-03-26 22:14:03 +0100201 src/thrift/processor/StatsProcessor.h \
202 src/thrift/processor/TMultiplexedProcessor.h
Aditya Agarwal000b1112007-08-31 08:03:05 +0000203
David Reiss5ddabb82010-10-06 17:09:37 +0000204include_asyncdir = $(include_thriftdir)/async
205include_async_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000206 src/thrift/async/TAsyncChannel.h \
207 src/thrift/async/TAsyncDispatchProcessor.h \
208 src/thrift/async/TAsyncProcessor.h \
209 src/thrift/async/TAsyncBufferProcessor.h \
210 src/thrift/async/TAsyncProtocolProcessor.h \
211 src/thrift/async/TEvhttpClientChannel.h \
212 src/thrift/async/TEvhttpServer.h
David Reiss5ddabb82010-10-06 17:09:37 +0000213
Roger Meier86e89862012-02-10 19:53:20 +0000214include_qtdir = $(include_thriftdir)/qt
215include_qt_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000216 src/thrift/qt/TQIODeviceTransport.h \
217 src/thrift/qt/TQTcpServer.h
Roger Meier86e89862012-02-10 19:53:20 +0000218
Roger Meier2be7f242012-05-10 09:01:45 +0000219THRIFT = $(top_builddir)/compiler/cpp/thrift
220
Jake Farrelle0c53162011-11-16 12:58:36 +0000221WINDOWS_DIST = \
222 README_WINDOWS \
Roger Meier67377e72012-05-10 21:17:53 +0000223 src/thrift/windows \
Jake Farrelle0c53162011-11-16 12:58:36 +0000224 thrift.sln \
225 libthrift.vcxproj \
226 libthrift.vcxproj.filters \
227 libthriftnb.vcxproj \
228 libthriftnb.vcxproj.filters
229
David Reiss832b2622007-12-28 18:25:33 +0000230EXTRA_DIST = \
David Reiss0c90f6f2008-02-06 22:18:40 +0000231 README \
Jake Farrelle0c53162011-11-16 12:58:36 +0000232 README.SSL \
David Reiss0c90f6f2008-02-06 22:18:40 +0000233 thrift-nb.pc.in \
234 thrift.pc.in \
Jake Farrelle0c53162011-11-16 12:58:36 +0000235 thrift-z.pc.in \
Roger Meier86e89862012-02-10 19:53:20 +0000236 thrift-qt.pc.in \
Jake Farrelle0c53162011-11-16 12:58:36 +0000237 $(WINDOWS_DIST)