blob: 21480aba5bd42130a0939d8807dfad0075e029f1 [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 \
74 src/thrift/transport/TSSLSocket.cpp \
75 src/thrift/transport/TSocketPool.cpp \
76 src/thrift/transport/TServerSocket.cpp \
77 src/thrift/transport/TSSLServerSocket.cpp \
78 src/thrift/transport/TTransportUtils.cpp \
79 src/thrift/transport/TBufferTransports.cpp \
80 src/thrift/server/TServer.cpp \
81 src/thrift/server/TSimpleServer.cpp \
82 src/thrift/server/TThreadPoolServer.cpp \
83 src/thrift/server/TThreadedServer.cpp \
84 src/thrift/async/TAsyncChannel.cpp \
85 src/thrift/processor/PeekProcessor.cpp
Aditya Agarwal000b1112007-08-31 08:03:05 +000086
Roger Meier3faaedf2011-10-02 10:51:45 +000087if WITH_BOOSTTHREADS
Roger Meier49ff8b12012-04-13 09:12:31 +000088libthrift_la_SOURCES += src/thrift/concurrency/BoostThreadFactory.cpp \
89 src/thrift/concurrency/BoostMonitor.cpp \
90 src/thrift/concurrency/BoostMutex.cpp
Roger Meier3faaedf2011-10-02 10:51:45 +000091else
Roger Meier49ff8b12012-04-13 09:12:31 +000092libthrift_la_SOURCES += src/thrift/concurrency/Mutex.cpp \
93 src/thrift/concurrency/Monitor.cpp \
94 src/thrift/concurrency/PosixThreadFactory.cpp
Roger Meier3faaedf2011-10-02 10:51:45 +000095endif
96
Roger Meier49ff8b12012-04-13 09:12:31 +000097libthriftnb_la_SOURCES = src/thrift/server/TNonblockingServer.cpp \
98 src/thrift/async/TAsyncProtocolProcessor.cpp \
99 src/thrift/async/TEvhttpServer.cpp \
100 src/thrift/async/TEvhttpClientChannel.cpp
Marc Slemko9d4a3e22006-07-21 19:53:48 +0000101
Roger Meier49ff8b12012-04-13 09:12:31 +0000102libthriftz_la_SOURCES = src/thrift/transport/TZlibTransport.cpp
David Reissfaebedd2007-09-17 23:20:38 +0000103
Roger Meier33eaa0f2012-04-13 09:13:13 +0000104libthriftqt_la_MOC = src/thrift/qt/moc_TQTcpServer.cpp
Roger Meier86e89862012-02-10 19:53:20 +0000105libthriftqt_la_SOURCES = $(libthriftqt_la_MOC) \
Roger Meier49ff8b12012-04-13 09:12:31 +0000106 src/thrift/qt/TQIODeviceTransport.cpp \
107 src/thrift/qt/TQTcpServer.cpp
Roger Meier86e89862012-02-10 19:53:20 +0000108CLEANFILES = $(libthriftqt_la_MOC)
109
David Reissfaebedd2007-09-17 23:20:38 +0000110# Flags for the various libraries
David Reissc6c64982008-06-11 01:16:45 +0000111libthriftnb_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBEVENT_CPPFLAGS)
112libthriftz_la_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CPPFLAGS)
Roger Meier86e89862012-02-10 19:53:20 +0000113libthriftqt_la_CPPFLAGS = $(AM_CPPFLAGS) $(QT_CFLAGS)
Christian Lavoieaf65f1b2010-11-24 21:58:05 +0000114libthriftnb_la_CXXFLAGS = $(AM_CXXFLAGS)
115libthriftz_la_CXXFLAGS = $(AM_CXXFLAGS)
Roger Meier86e89862012-02-10 19:53:20 +0000116libthriftqt_la_CXXFLAGS = $(AM_CXXFLAGS)
Roger Meier38315782011-11-06 11:29:41 +0000117libthriftnb_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS)
118libthriftz_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS)
Roger Meier86e89862012-02-10 19:53:20 +0000119libthriftqt_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS) $(QT_LIBS)
Roger Meier3faaedf2011-10-02 10:51:45 +0000120
Marc Slemko16698852006-08-04 03:16:10 +0000121include_thriftdir = $(includedir)/thrift
122include_thrift_HEADERS = \
David Reissc6c64982008-06-11 01:16:45 +0000123 $(top_builddir)/config.h \
Roger Meier49ff8b12012-04-13 09:12:31 +0000124 src/thrift/TDispatchProcessor.h \
125 src/thrift/Thrift.h \
126 src/thrift/TReflectionLocal.h \
127 src/thrift/TProcessor.h \
128 src/thrift/TApplicationException.h \
129 src/thrift/TLogging.h
Marc Slemko16698852006-08-04 03:16:10 +0000130
Marc Slemkod42a2c22006-08-10 03:30:18 +0000131include_concurrencydir = $(include_thriftdir)/concurrency
Marc Slemko16698852006-08-04 03:16:10 +0000132include_concurrency_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000133 src/thrift/concurrency/BoostThreadFactory.h \
134 src/thrift/concurrency/Exception.h \
135 src/thrift/concurrency/Mutex.h \
136 src/thrift/concurrency/Monitor.h \
137 src/thrift/concurrency/PlatformThreadFactory.h \
138 src/thrift/concurrency/PosixThreadFactory.h \
139 src/thrift/concurrency/Thread.h \
140 src/thrift/concurrency/ThreadManager.h \
141 src/thrift/concurrency/TimerManager.h \
142 src/thrift/concurrency/FunctionRunner.h \
143 src/thrift/concurrency/Util.h
Marc Slemko16698852006-08-04 03:16:10 +0000144
Marc Slemkod42a2c22006-08-10 03:30:18 +0000145include_protocoldir = $(include_thriftdir)/protocol
Marc Slemko16698852006-08-04 03:16:10 +0000146include_protocol_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000147 src/thrift/protocol/TBinaryProtocol.h \
148 src/thrift/protocol/TBinaryProtocol.tcc \
149 src/thrift/protocol/TCompactProtocol.h \
150 src/thrift/protocol/TCompactProtocol.tcc \
151 src/thrift/protocol/TDenseProtocol.h \
152 src/thrift/protocol/TDebugProtocol.h \
153 src/thrift/protocol/TBase64Utils.h \
154 src/thrift/protocol/TJSONProtocol.h \
155 src/thrift/protocol/TProtocolTap.h \
156 src/thrift/protocol/TProtocolException.h \
157 src/thrift/protocol/TVirtualProtocol.h \
158 src/thrift/protocol/TProtocol.h
Marc Slemko16698852006-08-04 03:16:10 +0000159
Marc Slemkod42a2c22006-08-10 03:30:18 +0000160include_transportdir = $(include_thriftdir)/transport
Marc Slemko16698852006-08-04 03:16:10 +0000161include_transport_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000162 src/thrift/transport/TFDTransport.h \
163 src/thrift/transport/TFileTransport.h \
164 src/thrift/transport/TSimpleFileTransport.h \
165 src/thrift/transport/TServerSocket.h \
166 src/thrift/transport/TSSLServerSocket.h \
167 src/thrift/transport/TServerTransport.h \
168 src/thrift/transport/THttpTransport.h \
169 src/thrift/transport/THttpClient.h \
170 src/thrift/transport/THttpServer.h \
171 src/thrift/transport/TSocket.h \
172 src/thrift/transport/TSSLSocket.h \
173 src/thrift/transport/TSocketPool.h \
174 src/thrift/transport/TVirtualTransport.h \
175 src/thrift/transport/TTransport.h \
176 src/thrift/transport/TTransportException.h \
177 src/thrift/transport/TTransportUtils.h \
178 src/thrift/transport/TBufferTransports.h \
179 src/thrift/transport/TShortReadTransport.h \
180 src/thrift/transport/TZlibTransport.h
Marc Slemko16698852006-08-04 03:16:10 +0000181
Marc Slemkod42a2c22006-08-10 03:30:18 +0000182include_serverdir = $(include_thriftdir)/server
Marc Slemko16698852006-08-04 03:16:10 +0000183include_server_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000184 src/thrift/server/TServer.h \
185 src/thrift/server/TSimpleServer.h \
186 src/thrift/server/TThreadPoolServer.h \
187 src/thrift/server/TThreadedServer.h \
188 src/thrift/server/TNonblockingServer.h
Marc Slemko9d4a3e22006-07-21 19:53:48 +0000189
Aditya Agarwal000b1112007-08-31 08:03:05 +0000190include_processordir = $(include_thriftdir)/processor
191include_processor_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000192 src/thrift/processor/PeekProcessor.h \
193 src/thrift/processor/StatsProcessor.h
Aditya Agarwal000b1112007-08-31 08:03:05 +0000194
David Reiss5ddabb82010-10-06 17:09:37 +0000195include_asyncdir = $(include_thriftdir)/async
196include_async_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000197 src/thrift/async/TAsyncChannel.h \
198 src/thrift/async/TAsyncDispatchProcessor.h \
199 src/thrift/async/TAsyncProcessor.h \
200 src/thrift/async/TAsyncBufferProcessor.h \
201 src/thrift/async/TAsyncProtocolProcessor.h \
202 src/thrift/async/TEvhttpClientChannel.h \
203 src/thrift/async/TEvhttpServer.h
David Reiss5ddabb82010-10-06 17:09:37 +0000204
Roger Meier86e89862012-02-10 19:53:20 +0000205include_qtdir = $(include_thriftdir)/qt
206include_qt_HEADERS = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000207 src/thrift/qt/TQIODeviceTransport.h \
208 src/thrift/qt/TQTcpServer.h
Roger Meier86e89862012-02-10 19:53:20 +0000209
David Reiss5ddabb82010-10-06 17:09:37 +0000210
David Reissb72d19f2007-09-18 19:46:00 +0000211noinst_PROGRAMS = concurrency_test
Marc Slemko9d4a3e22006-07-21 19:53:48 +0000212
Jake Farrelle0c53162011-11-16 12:58:36 +0000213concurrency_test_SOURCES = \
Roger Meier49ff8b12012-04-13 09:12:31 +0000214 src/thrift/concurrency/test/Tests.cpp \
215 src/thrift/concurrency/test/ThreadFactoryTests.h \
216 src/thrift/concurrency/test/ThreadManagerTests.h \
217 src/thrift/concurrency/test/TimerManagerTests.h
Marc Slemko9d4a3e22006-07-21 19:53:48 +0000218
Marc Slemkoc09a65a2006-08-09 01:20:16 +0000219concurrency_test_LDADD = libthrift.la
Marc Slemko9d4a3e22006-07-21 19:53:48 +0000220
Jake Farrelle0c53162011-11-16 12:58:36 +0000221WINDOWS_DIST = \
222 README_WINDOWS \
223 src/windows \
224 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)