blob: f40cdb12f0632a1e9d7703e250f14cd335181df5 [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 \
66 src/thrift/transport/TTransportException.cpp \
67 src/thrift/transport/TFDTransport.cpp \
68 src/thrift/transport/TFileTransport.cpp \
69 src/thrift/transport/TSimpleFileTransport.cpp \
70 src/thrift/transport/THttpTransport.cpp \
71 src/thrift/transport/THttpClient.cpp \
72 src/thrift/transport/THttpServer.cpp \
73 src/thrift/transport/TSocket.cpp \
Roger Meier7d0a0402012-06-05 19:57:10 +000074 src/thrift/transport/TPipe.cpp \
75 src/thrift/transport/TPipeServer.cpp \
Roger Meier49ff8b12012-04-13 09:12:31 +000076 src/thrift/transport/TSSLSocket.cpp \
77 src/thrift/transport/TSocketPool.cpp \
78 src/thrift/transport/TServerSocket.cpp \
79 src/thrift/transport/TSSLServerSocket.cpp \
80 src/thrift/transport/TTransportUtils.cpp \
81 src/thrift/transport/TBufferTransports.cpp \
82 src/thrift/server/TServer.cpp \
83 src/thrift/server/TSimpleServer.cpp \
84 src/thrift/server/TThreadPoolServer.cpp \
85 src/thrift/server/TThreadedServer.cpp \
86 src/thrift/async/TAsyncChannel.cpp \
87 src/thrift/processor/PeekProcessor.cpp
Aditya Agarwal000b1112007-08-31 08:03:05 +000088
Roger Meier3faaedf2011-10-02 10:51:45 +000089if WITH_BOOSTTHREADS
Roger Meier49ff8b12012-04-13 09:12:31 +000090libthrift_la_SOURCES += src/thrift/concurrency/BoostThreadFactory.cpp \
91 src/thrift/concurrency/BoostMonitor.cpp \
92 src/thrift/concurrency/BoostMutex.cpp
Roger Meier3faaedf2011-10-02 10:51:45 +000093else
Roger Meier49ff8b12012-04-13 09:12:31 +000094libthrift_la_SOURCES += src/thrift/concurrency/Mutex.cpp \
95 src/thrift/concurrency/Monitor.cpp \
96 src/thrift/concurrency/PosixThreadFactory.cpp
Roger Meier3faaedf2011-10-02 10:51:45 +000097endif
98
Roger Meier49ff8b12012-04-13 09:12:31 +000099libthriftnb_la_SOURCES = src/thrift/server/TNonblockingServer.cpp \
100 src/thrift/async/TAsyncProtocolProcessor.cpp \
101 src/thrift/async/TEvhttpServer.cpp \
102 src/thrift/async/TEvhttpClientChannel.cpp
Marc Slemko9d4a3e22006-07-21 19:53:48 +0000103
Roger Meier49ff8b12012-04-13 09:12:31 +0000104libthriftz_la_SOURCES = src/thrift/transport/TZlibTransport.cpp
David Reissfaebedd2007-09-17 23:20:38 +0000105
Roger Meier33eaa0f2012-04-13 09:13:13 +0000106libthriftqt_la_MOC = src/thrift/qt/moc_TQTcpServer.cpp
Roger Meier86e89862012-02-10 19:53:20 +0000107libthriftqt_la_SOURCES = $(libthriftqt_la_MOC) \
Roger Meier49ff8b12012-04-13 09:12:31 +0000108 src/thrift/qt/TQIODeviceTransport.cpp \
109 src/thrift/qt/TQTcpServer.cpp
Roger Meier86e89862012-02-10 19:53:20 +0000110CLEANFILES = $(libthriftqt_la_MOC)
111
David Reissfaebedd2007-09-17 23:20:38 +0000112# Flags for the various libraries
David Reissc6c64982008-06-11 01:16:45 +0000113libthriftnb_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBEVENT_CPPFLAGS)
114libthriftz_la_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CPPFLAGS)
Roger Meier86e89862012-02-10 19:53:20 +0000115libthriftqt_la_CPPFLAGS = $(AM_CPPFLAGS) $(QT_CFLAGS)
Christian Lavoieaf65f1b2010-11-24 21:58:05 +0000116libthriftnb_la_CXXFLAGS = $(AM_CXXFLAGS)
117libthriftz_la_CXXFLAGS = $(AM_CXXFLAGS)
Roger Meier86e89862012-02-10 19:53:20 +0000118libthriftqt_la_CXXFLAGS = $(AM_CXXFLAGS)
Roger Meier38315782011-11-06 11:29:41 +0000119libthriftnb_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS)
120libthriftz_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS)
Roger Meier86e89862012-02-10 19:53:20 +0000121libthriftqt_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS) $(QT_LIBS)
Roger Meier3faaedf2011-10-02 10:51:45 +0000122
Marc Slemko16698852006-08-04 03:16:10 +0000123include_thriftdir = $(includedir)/thrift
124include_thrift_HEADERS = \
David Reissc6c64982008-06-11 01:16:45 +0000125 $(top_builddir)/config.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000126 src/thrift/TDispatchProcessor.h \
127 src/thrift/Thrift.h \
128 src/thrift/TReflectionLocal.h \
129 src/thrift/TProcessor.h \
130 src/thrift/TApplicationException.h \
Roger Meierd34bea02013-01-22 21:36:42 +0100131 src/thrift/TLogging.h \
132 src/thrift/cxxfunctional.h
Marc Slemko16698852006-08-04 03:16:10 +0000133
Marc Slemkod42a2c22006-08-10 03:30:18 +0000134include_concurrencydir = $(include_thriftdir)/concurrency
Marc Slemko16698852006-08-04 03:16:10 +0000135include_concurrency_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000136 src/thrift/concurrency/BoostThreadFactory.h \
137 src/thrift/concurrency/Exception.h \
138 src/thrift/concurrency/Mutex.h \
139 src/thrift/concurrency/Monitor.h \
140 src/thrift/concurrency/PlatformThreadFactory.h \
141 src/thrift/concurrency/PosixThreadFactory.h \
142 src/thrift/concurrency/Thread.h \
143 src/thrift/concurrency/ThreadManager.h \
144 src/thrift/concurrency/TimerManager.h \
145 src/thrift/concurrency/FunctionRunner.h \
146 src/thrift/concurrency/Util.h
Marc Slemko16698852006-08-04 03:16:10 +0000147
Marc Slemkod42a2c22006-08-10 03:30:18 +0000148include_protocoldir = $(include_thriftdir)/protocol
Marc Slemko16698852006-08-04 03:16:10 +0000149include_protocol_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000150 src/thrift/protocol/TBinaryProtocol.h \
151 src/thrift/protocol/TBinaryProtocol.tcc \
152 src/thrift/protocol/TCompactProtocol.h \
153 src/thrift/protocol/TCompactProtocol.tcc \
154 src/thrift/protocol/TDenseProtocol.h \
155 src/thrift/protocol/TDebugProtocol.h \
156 src/thrift/protocol/TBase64Utils.h \
157 src/thrift/protocol/TJSONProtocol.h \
158 src/thrift/protocol/TProtocolTap.h \
159 src/thrift/protocol/TProtocolException.h \
160 src/thrift/protocol/TVirtualProtocol.h \
161 src/thrift/protocol/TProtocol.h
Marc Slemko16698852006-08-04 03:16:10 +0000162
Marc Slemkod42a2c22006-08-10 03:30:18 +0000163include_transportdir = $(include_thriftdir)/transport
Marc Slemko16698852006-08-04 03:16:10 +0000164include_transport_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000165 src/thrift/transport/TFDTransport.h \
166 src/thrift/transport/TFileTransport.h \
167 src/thrift/transport/TSimpleFileTransport.h \
168 src/thrift/transport/TServerSocket.h \
169 src/thrift/transport/TSSLServerSocket.h \
170 src/thrift/transport/TServerTransport.h \
171 src/thrift/transport/THttpTransport.h \
172 src/thrift/transport/THttpClient.h \
173 src/thrift/transport/THttpServer.h \
174 src/thrift/transport/TSocket.h \
Roger Meier7d0a0402012-06-05 19:57:10 +0000175 src/thrift/transport/TPipe.h \
176 src/thrift/transport/TPipeServer.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000177 src/thrift/transport/TSSLSocket.h \
178 src/thrift/transport/TSocketPool.h \
179 src/thrift/transport/TVirtualTransport.h \
180 src/thrift/transport/TTransport.h \
181 src/thrift/transport/TTransportException.h \
182 src/thrift/transport/TTransportUtils.h \
183 src/thrift/transport/TBufferTransports.h \
184 src/thrift/transport/TShortReadTransport.h \
185 src/thrift/transport/TZlibTransport.h
Marc Slemko16698852006-08-04 03:16:10 +0000186
Marc Slemkod42a2c22006-08-10 03:30:18 +0000187include_serverdir = $(include_thriftdir)/server
Marc Slemko16698852006-08-04 03:16:10 +0000188include_server_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000189 src/thrift/server/TServer.h \
190 src/thrift/server/TSimpleServer.h \
191 src/thrift/server/TThreadPoolServer.h \
192 src/thrift/server/TThreadedServer.h \
193 src/thrift/server/TNonblockingServer.h
Marc Slemko9d4a3e22006-07-21 19:53:48 +0000194
Aditya Agarwal000b1112007-08-31 08:03:05 +0000195include_processordir = $(include_thriftdir)/processor
196include_processor_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000197 src/thrift/processor/PeekProcessor.h \
198 src/thrift/processor/StatsProcessor.h
Aditya Agarwal000b1112007-08-31 08:03:05 +0000199
David Reiss5ddabb82010-10-06 17:09:37 +0000200include_asyncdir = $(include_thriftdir)/async
201include_async_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000202 src/thrift/async/TAsyncChannel.h \
203 src/thrift/async/TAsyncDispatchProcessor.h \
204 src/thrift/async/TAsyncProcessor.h \
205 src/thrift/async/TAsyncBufferProcessor.h \
206 src/thrift/async/TAsyncProtocolProcessor.h \
207 src/thrift/async/TEvhttpClientChannel.h \
208 src/thrift/async/TEvhttpServer.h
David Reiss5ddabb82010-10-06 17:09:37 +0000209
Roger Meier86e89862012-02-10 19:53:20 +0000210include_qtdir = $(include_thriftdir)/qt
211include_qt_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000212 src/thrift/qt/TQIODeviceTransport.h \
213 src/thrift/qt/TQTcpServer.h
Roger Meier86e89862012-02-10 19:53:20 +0000214
Roger Meier2be7f242012-05-10 09:01:45 +0000215THRIFT = $(top_builddir)/compiler/cpp/thrift
216
Jake Farrelle0c53162011-11-16 12:58:36 +0000217WINDOWS_DIST = \
218 README_WINDOWS \
Roger Meier67377e72012-05-10 21:17:53 +0000219 src/thrift/windows \
Jake Farrelle0c53162011-11-16 12:58:36 +0000220 thrift.sln \
221 libthrift.vcxproj \
222 libthrift.vcxproj.filters \
223 libthriftnb.vcxproj \
224 libthriftnb.vcxproj.filters
225
David Reiss832b2622007-12-28 18:25:33 +0000226EXTRA_DIST = \
David Reiss0c90f6f2008-02-06 22:18:40 +0000227 README \
Jake Farrelle0c53162011-11-16 12:58:36 +0000228 README.SSL \
David Reiss0c90f6f2008-02-06 22:18:40 +0000229 thrift-nb.pc.in \
230 thrift.pc.in \
Jake Farrelle0c53162011-11-16 12:58:36 +0000231 thrift-z.pc.in \
Roger Meier86e89862012-02-10 19:53:20 +0000232 thrift-qt.pc.in \
Jake Farrelle0c53162011-11-16 12:58:36 +0000233 $(WINDOWS_DIST)