blob: 1226935de3a270c382f19309460e8d829084b367 [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
David Reiss1a140912008-06-11 01:16:37 +000020SUBDIRS =
David Reiss9ff3b9d2008-02-15 01:10:23 +000021
David Reiss82c1bab2008-06-11 01:16:53 +000022if WITH_PYTHON
David Reiss1a140912008-06-11 01:16:37 +000023SUBDIRS += py
24endif
25
David Reiss8d07e1d2008-07-11 08:04:12 +000026if WITH_RUBY
Kevin Clark4bd89162008-07-08 00:47:49 +000027SUBDIRS += rb
28endif
29
David Reiss2a4bfd62008-04-07 23:45:00 +000030noinst_LTLIBRARIES = libtestgencpp.la
31libtestgencpp_la_SOURCES = \
32 gen-cpp/DebugProtoTest_types.cpp \
33 gen-cpp/OptionalRequiredTest_types.cpp \
34 gen-cpp/DebugProtoTest_types.cpp \
Bryan Duxbury50119f12009-01-29 21:31:25 +000035 gen-cpp/ThriftTest_types.cpp \
David Reissade070f2009-03-20 07:02:52 +000036 gen-cpp/DebugProtoTest_types.h \
37 gen-cpp/OptionalRequiredTest_types.h \
38 gen-cpp/ThriftTest_types.h \
David Reiss7d3df422009-02-10 21:38:44 +000039 ThriftTest_extras.cpp \
40 DebugProtoTest_extras.cpp
David Reiss2a4bfd62008-04-07 23:45:00 +000041
David Reissf2422b62009-03-20 07:14:50 +000042ThriftTest_extras.o: gen-cpp/ThriftTest_types.h
43DebugProtoTest_extras.o: gen-cpp/DebugProtoTest_types.h
44
David Reissc6c64982008-06-11 01:16:45 +000045libtestgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la
David Reiss2a4bfd62008-04-07 23:45:00 +000046
47noinst_PROGRAMS = Benchmark
48
49Benchmark_SOURCES = \
50 Benchmark.cpp
51
52Benchmark_LDADD = libtestgencpp.la
53
David Reiss8180c0c2008-02-04 21:14:14 +000054check_PROGRAMS = \
David Reisse4db03d2008-04-08 05:06:59 +000055 TFDTransportTest \
David Reiss1ffb61b2008-04-08 05:07:26 +000056 TPipedTransportTest \
David Reiss8180c0c2008-02-04 21:14:14 +000057 DebugProtoTest \
David Reissdb0ea152008-02-18 01:49:37 +000058 JSONProtoTest \
David Reiss8180c0c2008-02-04 21:14:14 +000059 OptionalRequiredTest \
David Reisse4d4ea02009-04-02 21:37:17 +000060 AllProtocolsTest \
David Reiss2a4bfd62008-04-07 23:45:00 +000061 UnitTests
David Reiss8180c0c2008-02-04 21:14:14 +000062
63TESTS = \
64 $(check_PROGRAMS)
65
David Reiss2a4bfd62008-04-07 23:45:00 +000066UnitTests_SOURCES = \
67 UnitTestMain.cpp \
David Reiss28f298d2008-05-01 06:17:36 +000068 TMemoryBufferTest.cpp \
69 TBufferBaseTest.cpp
David Reiss2a4bfd62008-04-07 23:45:00 +000070
71UnitTests_LDADD = libtestgencpp.la
David Reiss8180c0c2008-02-04 21:14:14 +000072
73#
David Reisse4db03d2008-04-08 05:06:59 +000074# TFDTransportTest
75#
76TFDTransportTest_SOURCES = \
77 TFDTransportTest.cpp
78
79TFDTransportTest_LDADD = \
David Reissc6c64982008-06-11 01:16:45 +000080 $(top_builddir)/lib/cpp/libthrift.la
David Reisse4db03d2008-04-08 05:06:59 +000081
David Reiss1ffb61b2008-04-08 05:07:26 +000082
83#
84# TPipedTransportTest
85#
86TPipedTransportTest_SOURCES = \
87 TPipedTransportTest.cpp
88
89TPipedTransportTest_LDADD = \
David Reissc6c64982008-06-11 01:16:45 +000090 $(top_builddir)/lib/cpp/libthrift.la
David Reiss1ffb61b2008-04-08 05:07:26 +000091
David Reisse4db03d2008-04-08 05:06:59 +000092#
David Reisse4d4ea02009-04-02 21:37:17 +000093# AllProtocolsTest
94#
95AllProtocolsTest_SOURCES = \
David Reiss4b86e622009-05-22 19:52:06 +000096 AllProtocolTests.cpp \
97 AllProtocolTests.tcc \
98 GenericHelpers.h
David Reisse4d4ea02009-04-02 21:37:17 +000099
100AllProtocolsTest_LDADD = libtestgencpp.la
101
102#
David Reiss8180c0c2008-02-04 21:14:14 +0000103# DebugProtoTest
104#
105DebugProtoTest_SOURCES = \
David Reiss8180c0c2008-02-04 21:14:14 +0000106 DebugProtoTest.cpp
107
David Reiss2a4bfd62008-04-07 23:45:00 +0000108DebugProtoTest_LDADD = libtestgencpp.la
David Reiss8180c0c2008-02-04 21:14:14 +0000109
110
111#
David Reissdb0ea152008-02-18 01:49:37 +0000112# JSONProtoTest
113#
114JSONProtoTest_SOURCES = \
David Reissdb0ea152008-02-18 01:49:37 +0000115 JSONProtoTest.cpp
116
David Reiss2a4bfd62008-04-07 23:45:00 +0000117JSONProtoTest_LDADD = libtestgencpp.la
David Reissdb0ea152008-02-18 01:49:37 +0000118
119#
David Reiss8180c0c2008-02-04 21:14:14 +0000120# OptionalRequiredTest
121#
122OptionalRequiredTest_SOURCES = \
David Reiss8180c0c2008-02-04 21:14:14 +0000123 OptionalRequiredTest.cpp
124
David Reiss2a4bfd62008-04-07 23:45:00 +0000125OptionalRequiredTest_LDADD = libtestgencpp.la
David Reiss8180c0c2008-02-04 21:14:14 +0000126
127
128#
David Reiss8180c0c2008-02-04 21:14:14 +0000129# Common thrift code generation rules
130#
David Reissc6c64982008-06-11 01:16:45 +0000131THRIFT = $(top_builddir)/compiler/cpp/thrift
David Reiss8180c0c2008-02-04 21:14:14 +0000132
David Reissade070f2009-03-20 07:02:52 +0000133gen-cpp/DebugProtoTest_types.cpp gen-cpp/DebugProtoTest_types.h: DebugProtoTest.thrift
David Reiss0b7d6fa2009-02-07 02:36:35 +0000134 $(THRIFT) --gen cpp:dense $<
David Reiss8180c0c2008-02-04 21:14:14 +0000135
David Reissade070f2009-03-20 07:02:52 +0000136gen-cpp/OptionalRequiredTest_types.cpp gen-cpp/OptionalRequiredTest_types.h: OptionalRequiredTest.thrift
David Reiss4ce28742008-02-27 07:45:05 +0000137 $(THRIFT) --gen cpp:dense $<
David Reiss8180c0c2008-02-04 21:14:14 +0000138
139gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp: StressTest.thrift
David Reiss0b7d6fa2009-02-07 02:36:35 +0000140 $(THRIFT) --gen cpp:dense $<
David Reiss8180c0c2008-02-04 21:14:14 +0000141
David Reissade070f2009-03-20 07:02:52 +0000142gen-cpp/SecondService.cpp gen-cpp/ThriftTest_constants.cpp gen-cpp/ThriftTest.cpp gen-cpp/ThriftTest_types.cpp gen-cpp/ThriftTest_types.h: ThriftTest.thrift
David Reiss0b7d6fa2009-02-07 02:36:35 +0000143 $(THRIFT) --gen cpp:dense $<
David Reiss8180c0c2008-02-04 21:14:14 +0000144
145INCLUDES = \
146 -I$(top_srcdir)/lib/cpp/src
147
148AM_CPPFLAGS = $(BOOST_CPPFLAGS)
149
150clean-local:
David Reiss2ca456a2008-02-24 16:42:18 +0000151 $(RM) -r gen-cpp
David Reiss48141bf2009-03-18 23:59:56 +0000152
153EXTRA_DIST = \
154 cpp \
155 threads \
156 csharp \
157 py \
158 rb \
159 perl \
160 php \
161 erl \
162 hs \
163 ocaml \
164 AnnotationTest.thrift \
165 BrokenConstants.thrift \
166 ConstantsDemo.thrift \
167 DebugProtoTest.thrift \
168 DenseLinkingTest.thrift \
169 DocTest.thrift \
170 JavaBeansTest.thrift \
171 ManyTypedefs.thrift \
172 OptionalRequiredTest.thrift \
173 SmallTest.thrift \
174 StressTest.thrift \
175 ThriftTest.thrift \
176 ZlibTest.cpp \
177 DenseProtoTest.cpp \
178 FastbinaryTest.py