blob: f5264793ab6ac39c781f6f3192261128b437057c [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
Jake Farrell627f1a02011-09-14 03:43:49 +000020SUBDIRS = .
21
22if WITH_TESTS
23SUBDIRS += test
24endif
David Reiss351e22b2010-08-31 16:51:19 +000025
Mark Sleeb16074d2007-11-28 05:54:33 +000026pkgconfigdir = $(libdir)/pkgconfig
27
David Reiss79ae0f82007-09-17 21:15:47 +000028lib_LTLIBRARIES = libthrift.la
Mark Sleeb16074d2007-11-28 05:54:33 +000029pkgconfig_DATA = thrift.pc
Roger Meier38315782011-11-06 11:29:41 +000030libthrift_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS)
Mark Sleeb16074d2007-11-28 05:54:33 +000031
David Reiss79ae0f82007-09-17 21:15:47 +000032## We only build the extra libraries if we have the dependencies,
33## but we install all of the headers unconditionally.
34if AMX_HAVE_LIBEVENT
35lib_LTLIBRARIES += libthriftnb.la
Mark Sleeb16074d2007-11-28 05:54:33 +000036pkgconfig_DATA += thrift-nb.pc
David Reiss79ae0f82007-09-17 21:15:47 +000037endif
David Reissfaebedd2007-09-17 23:20:38 +000038if AMX_HAVE_ZLIB
39lib_LTLIBRARIES += libthriftz.la
Mark Sleeb16074d2007-11-28 05:54:33 +000040pkgconfig_DATA += thrift-z.pc
David Reissfaebedd2007-09-17 23:20:38 +000041endif
Marc Slemko6f038a72006-08-03 18:58:09 +000042
David Reissc6c64982008-06-11 01:16:45 +000043AM_CXXFLAGS = -Wall
44AM_CPPFLAGS = $(BOOST_CPPFLAGS) -I$(srcdir)/src
Roger Meier3faaedf2011-10-02 10:51:45 +000045AM_LDFLAGS = $(BOOST_LDFLAGS)
Marc Slemko9d4a3e22006-07-21 19:53:48 +000046
David Reissfaebedd2007-09-17 23:20:38 +000047# Define the source files for the module
Marc Slemko9d4a3e22006-07-21 19:53:48 +000048
David Reiss79ae0f82007-09-17 21:15:47 +000049libthrift_la_SOURCES = src/Thrift.cpp \
David Reiss5f013bb2010-03-10 22:11:26 +000050 src/TApplicationException.cpp \
Jake Farrelle0c53162011-11-16 12:58:36 +000051 src/VirtualProfiling.cpp \
David Reiss79ae0f82007-09-17 21:15:47 +000052 src/concurrency/ThreadManager.cpp \
53 src/concurrency/TimerManager.cpp \
David Reiss53f18f02008-07-11 00:45:29 +000054 src/concurrency/Util.cpp \
David Reiss79ae0f82007-09-17 21:15:47 +000055 src/protocol/TDebugProtocol.cpp \
56 src/protocol/TDenseProtocol.cpp \
David Reissdb0ea152008-02-18 01:49:37 +000057 src/protocol/TJSONProtocol.cpp \
58 src/protocol/TBase64Utils.cpp \
David Reiss79ae0f82007-09-17 21:15:47 +000059 src/transport/TTransportException.cpp \
David Reisse4db03d2008-04-08 05:06:59 +000060 src/transport/TFDTransport.cpp \
David Reiss79ae0f82007-09-17 21:15:47 +000061 src/transport/TFileTransport.cpp \
David Reissabb56a42009-03-26 06:23:57 +000062 src/transport/TSimpleFileTransport.cpp \
David Reiss112e3092010-08-12 23:03:29 +000063 src/transport/THttpTransport.cpp \
David Reiss79ae0f82007-09-17 21:15:47 +000064 src/transport/THttpClient.cpp \
David Reiss112e3092010-08-12 23:03:29 +000065 src/transport/THttpServer.cpp \
David Reiss79ae0f82007-09-17 21:15:47 +000066 src/transport/TSocket.cpp \
Bryan Duxburycd9aea12011-02-22 18:12:06 +000067 src/transport/TSSLSocket.cpp \
David Reiss79ae0f82007-09-17 21:15:47 +000068 src/transport/TSocketPool.cpp \
69 src/transport/TServerSocket.cpp \
Bryan Duxburycd9aea12011-02-22 18:12:06 +000070 src/transport/TSSLServerSocket.cpp \
David Reiss79ae0f82007-09-17 21:15:47 +000071 src/transport/TTransportUtils.cpp \
David Reiss28f298d2008-05-01 06:17:36 +000072 src/transport/TBufferTransports.cpp \
veeve01d187c2008-02-26 05:12:08 +000073 src/server/TServer.cpp \
David Reiss79ae0f82007-09-17 21:15:47 +000074 src/server/TSimpleServer.cpp \
75 src/server/TThreadPoolServer.cpp \
76 src/server/TThreadedServer.cpp \
Roger Meier7e056e72011-07-17 07:28:28 +000077 src/async/TAsyncChannel.cpp \
David Reiss79ae0f82007-09-17 21:15:47 +000078 src/processor/PeekProcessor.cpp
Aditya Agarwal000b1112007-08-31 08:03:05 +000079
Roger Meier3faaedf2011-10-02 10:51:45 +000080if WITH_BOOSTTHREADS
81libthrift_la_SOURCES += src/concurrency/BoostThreadFactory.cpp \
82 src/concurrency/BoostMonitor.cpp \
83 src/concurrency/BoostMutex.cpp
84else
85libthrift_la_SOURCES += src/concurrency/Mutex.cpp \
86 src/concurrency/Monitor.cpp \
87 src/concurrency/PosixThreadFactory.cpp
88endif
89
David Reiss5ddabb82010-10-06 17:09:37 +000090libthriftnb_la_SOURCES = src/server/TNonblockingServer.cpp \
Roger Meier7e056e72011-07-17 07:28:28 +000091 src/async/TAsyncProtocolProcessor.cpp \
92 src/async/TEvhttpServer.cpp \
93 src/async/TEvhttpClientChannel.cpp
Marc Slemko9d4a3e22006-07-21 19:53:48 +000094
David Reissfaebedd2007-09-17 23:20:38 +000095libthriftz_la_SOURCES = src/transport/TZlibTransport.cpp
96
David Reissfaebedd2007-09-17 23:20:38 +000097# Flags for the various libraries
David Reissc6c64982008-06-11 01:16:45 +000098libthriftnb_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBEVENT_CPPFLAGS)
99libthriftz_la_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CPPFLAGS)
Christian Lavoieaf65f1b2010-11-24 21:58:05 +0000100libthriftnb_la_CXXFLAGS = $(AM_CXXFLAGS)
101libthriftz_la_CXXFLAGS = $(AM_CXXFLAGS)
Roger Meier38315782011-11-06 11:29:41 +0000102libthriftnb_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS)
103libthriftz_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS)
Roger Meier3faaedf2011-10-02 10:51:45 +0000104
Marc Slemko16698852006-08-04 03:16:10 +0000105include_thriftdir = $(includedir)/thrift
106include_thrift_HEADERS = \
David Reissc6c64982008-06-11 01:16:45 +0000107 $(top_builddir)/config.h \
James Wang3e9d1772007-03-27 23:17:34 +0000108 src/Thrift.h \
David Reiss0c90f6f2008-02-06 22:18:40 +0000109 src/TReflectionLocal.h \
James Wang3e9d1772007-03-27 23:17:34 +0000110 src/TProcessor.h \
David Reiss5f013bb2010-03-10 22:11:26 +0000111 src/TApplicationException.h \
James Wang3e9d1772007-03-27 23:17:34 +0000112 src/TLogging.h
Marc Slemko16698852006-08-04 03:16:10 +0000113
Marc Slemkod42a2c22006-08-10 03:30:18 +0000114include_concurrencydir = $(include_thriftdir)/concurrency
Marc Slemko16698852006-08-04 03:16:10 +0000115include_concurrency_HEADERS = \
Jake Farrelle0c53162011-11-16 12:58:36 +0000116 src/concurrency/BoostThreadFactory.h \
James Wang3e9d1772007-03-27 23:17:34 +0000117 src/concurrency/Exception.h \
Mark Slee0f70d772006-10-28 00:51:14 +0000118 src/concurrency/Mutex.h \
Marc Slemko6f038a72006-08-03 18:58:09 +0000119 src/concurrency/Monitor.h \
Jake Farrelle0c53162011-11-16 12:58:36 +0000120 src/concurrency/PlatformThreadFactory.h \
Marc Slemko6f038a72006-08-03 18:58:09 +0000121 src/concurrency/PosixThreadFactory.h \
122 src/concurrency/Thread.h \
123 src/concurrency/ThreadManager.h \
Marc Slemkoe18890f2006-08-17 01:23:12 +0000124 src/concurrency/TimerManager.h \
David Reiss48141bf2009-03-18 23:59:56 +0000125 src/concurrency/FunctionRunner.h \
Mark Sleeb16074d2007-11-28 05:54:33 +0000126 src/concurrency/Util.h
Marc Slemko16698852006-08-04 03:16:10 +0000127
Marc Slemkod42a2c22006-08-10 03:30:18 +0000128include_protocoldir = $(include_thriftdir)/protocol
Marc Slemko16698852006-08-04 03:16:10 +0000129include_protocol_HEADERS = \
Marc Slemko6f038a72006-08-03 18:58:09 +0000130 src/protocol/TBinaryProtocol.h \
David Reisse71115b2010-10-06 17:09:56 +0000131 src/protocol/TBinaryProtocol.tcc \
David Reisse4d4ea02009-04-02 21:37:17 +0000132 src/protocol/TCompactProtocol.h \
David Reisse71115b2010-10-06 17:09:56 +0000133 src/protocol/TCompactProtocol.tcc \
David Reissb72d19f2007-09-18 19:46:00 +0000134 src/protocol/TDenseProtocol.h \
David Reiss00dcccf2007-07-21 01:18:10 +0000135 src/protocol/TDebugProtocol.h \
David Reiss94058452008-04-21 18:07:58 +0000136 src/protocol/TBase64Utils.h \
137 src/protocol/TJSONProtocol.h \
David Reisse0e3d1b2008-04-08 05:06:45 +0000138 src/protocol/TProtocolTap.h \
Mark Sleef9831082007-02-20 20:59:21 +0000139 src/protocol/TProtocolException.h \
David Reiss6806fb82010-10-06 17:09:52 +0000140 src/protocol/TVirtualProtocol.h \
Marc Slemko16698852006-08-04 03:16:10 +0000141 src/protocol/TProtocol.h
142
Marc Slemkod42a2c22006-08-10 03:30:18 +0000143include_transportdir = $(include_thriftdir)/transport
Marc Slemko16698852006-08-04 03:16:10 +0000144include_transport_HEADERS = \
David Reisse4db03d2008-04-08 05:06:59 +0000145 src/transport/TFDTransport.h \
Aditya Agarwal25b29362006-12-09 00:58:15 +0000146 src/transport/TFileTransport.h \
David Reissabb56a42009-03-26 06:23:57 +0000147 src/transport/TSimpleFileTransport.h \
Marc Slemko9d4a3e22006-07-21 19:53:48 +0000148 src/transport/TServerSocket.h \
Bryan Duxburycd9aea12011-02-22 18:12:06 +0000149 src/transport/TSSLServerSocket.h \
Marc Slemko9d4a3e22006-07-21 19:53:48 +0000150 src/transport/TServerTransport.h \
David Reiss112e3092010-08-12 23:03:29 +0000151 src/transport/THttpTransport.h \
Mark Slee8a98e1b2007-02-27 05:16:23 +0000152 src/transport/THttpClient.h \
David Reiss112e3092010-08-12 23:03:29 +0000153 src/transport/THttpServer.h \
Marc Slemko9d4a3e22006-07-21 19:53:48 +0000154 src/transport/TSocket.h \
Bryan Duxburycd9aea12011-02-22 18:12:06 +0000155 src/transport/TSSLSocket.h \
jsobele02e4242007-05-08 17:51:49 +0000156 src/transport/TSocketPool.h \
David Reisse879c2f2010-10-06 17:09:50 +0000157 src/transport/TVirtualTransport.h \
Marc Slemko9d4a3e22006-07-21 19:53:48 +0000158 src/transport/TTransport.h \
Mark Sleed788b2e2006-09-07 01:26:35 +0000159 src/transport/TTransportException.h \
David Reissfaebedd2007-09-17 23:20:38 +0000160 src/transport/TTransportUtils.h \
David Reiss28f298d2008-05-01 06:17:36 +0000161 src/transport/TBufferTransports.h \
David Reiss48141bf2009-03-18 23:59:56 +0000162 src/transport/TShortReadTransport.h \
David Reissfaebedd2007-09-17 23:20:38 +0000163 src/transport/TZlibTransport.h
Marc Slemko16698852006-08-04 03:16:10 +0000164
Marc Slemkod42a2c22006-08-10 03:30:18 +0000165include_serverdir = $(include_thriftdir)/server
Marc Slemko16698852006-08-04 03:16:10 +0000166include_server_HEADERS = \
167 src/server/TServer.h \
Marc Slemko6f038a72006-08-03 18:58:09 +0000168 src/server/TSimpleServer.h \
Mark Slee2f6404d2006-10-10 01:37:40 +0000169 src/server/TThreadPoolServer.h \
Mark Sleeb3cb6292007-02-01 22:55:00 +0000170 src/server/TThreadedServer.h \
Mark Slee2f6404d2006-10-10 01:37:40 +0000171 src/server/TNonblockingServer.h
Marc Slemko9d4a3e22006-07-21 19:53:48 +0000172
Aditya Agarwal000b1112007-08-31 08:03:05 +0000173include_processordir = $(include_thriftdir)/processor
174include_processor_HEADERS = \
175 src/processor/PeekProcessor.h \
176 src/processor/StatsProcessor.h
177
David Reiss5ddabb82010-10-06 17:09:37 +0000178include_asyncdir = $(include_thriftdir)/async
179include_async_HEADERS = \
180 src/async/TAsyncChannel.h \
181 src/async/TAsyncProcessor.h \
182 src/async/TAsyncBufferProcessor.h \
183 src/async/TAsyncProtocolProcessor.h \
184 src/async/TEvhttpClientChannel.h \
Bryan Duxbury82dc2e22011-06-28 17:43:30 +0000185 src/async/TEvhttpServer.h
David Reiss5ddabb82010-10-06 17:09:37 +0000186
187
David Reissb72d19f2007-09-18 19:46:00 +0000188noinst_PROGRAMS = concurrency_test
Marc Slemko9d4a3e22006-07-21 19:53:48 +0000189
Jake Farrelle0c53162011-11-16 12:58:36 +0000190concurrency_test_SOURCES = \
191 src/concurrency/test/Tests.cpp \
Marc Slemko9d4a3e22006-07-21 19:53:48 +0000192 src/concurrency/test/ThreadFactoryTests.h \
193 src/concurrency/test/ThreadManagerTests.h \
194 src/concurrency/test/TimerManagerTests.h
195
Marc Slemkoc09a65a2006-08-09 01:20:16 +0000196concurrency_test_LDADD = libthrift.la
Marc Slemko9d4a3e22006-07-21 19:53:48 +0000197
Jake Farrelle0c53162011-11-16 12:58:36 +0000198WINDOWS_DIST = \
199 README_WINDOWS \
200 src/windows \
201 thrift.sln \
202 libthrift.vcxproj \
203 libthrift.vcxproj.filters \
204 libthriftnb.vcxproj \
205 libthriftnb.vcxproj.filters
206
David Reiss832b2622007-12-28 18:25:33 +0000207EXTRA_DIST = \
David Reiss0c90f6f2008-02-06 22:18:40 +0000208 README \
Jake Farrelle0c53162011-11-16 12:58:36 +0000209 README.SSL \
David Reiss0c90f6f2008-02-06 22:18:40 +0000210 thrift-nb.pc.in \
211 thrift.pc.in \
Jake Farrelle0c53162011-11-16 12:58:36 +0000212 thrift-z.pc.in \
213 $(WINDOWS_DIST)