blob: c959f6acb5e04fb03a3a58a44066dc2b03015b4b [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 = \
96 AllProtocolTests.cpp
97
98AllProtocolsTest_LDADD = libtestgencpp.la
99
100#
David Reiss8180c0c2008-02-04 21:14:14 +0000101# DebugProtoTest
102#
103DebugProtoTest_SOURCES = \
David Reiss8180c0c2008-02-04 21:14:14 +0000104 DebugProtoTest.cpp
105
David Reiss2a4bfd62008-04-07 23:45:00 +0000106DebugProtoTest_LDADD = libtestgencpp.la
David Reiss8180c0c2008-02-04 21:14:14 +0000107
108
109#
David Reissdb0ea152008-02-18 01:49:37 +0000110# JSONProtoTest
111#
112JSONProtoTest_SOURCES = \
David Reissdb0ea152008-02-18 01:49:37 +0000113 JSONProtoTest.cpp
114
David Reiss2a4bfd62008-04-07 23:45:00 +0000115JSONProtoTest_LDADD = libtestgencpp.la
David Reissdb0ea152008-02-18 01:49:37 +0000116
117#
David Reiss8180c0c2008-02-04 21:14:14 +0000118# OptionalRequiredTest
119#
120OptionalRequiredTest_SOURCES = \
David Reiss8180c0c2008-02-04 21:14:14 +0000121 OptionalRequiredTest.cpp
122
David Reiss2a4bfd62008-04-07 23:45:00 +0000123OptionalRequiredTest_LDADD = libtestgencpp.la
David Reiss8180c0c2008-02-04 21:14:14 +0000124
125
126#
David Reiss8180c0c2008-02-04 21:14:14 +0000127# Common thrift code generation rules
128#
David Reissc6c64982008-06-11 01:16:45 +0000129THRIFT = $(top_builddir)/compiler/cpp/thrift
David Reiss8180c0c2008-02-04 21:14:14 +0000130
David Reissade070f2009-03-20 07:02:52 +0000131gen-cpp/DebugProtoTest_types.cpp gen-cpp/DebugProtoTest_types.h: DebugProtoTest.thrift
David Reiss0b7d6fa2009-02-07 02:36:35 +0000132 $(THRIFT) --gen cpp:dense $<
David Reiss8180c0c2008-02-04 21:14:14 +0000133
David Reissade070f2009-03-20 07:02:52 +0000134gen-cpp/OptionalRequiredTest_types.cpp gen-cpp/OptionalRequiredTest_types.h: OptionalRequiredTest.thrift
David Reiss4ce28742008-02-27 07:45:05 +0000135 $(THRIFT) --gen cpp:dense $<
David Reiss8180c0c2008-02-04 21:14:14 +0000136
137gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp: StressTest.thrift
David Reiss0b7d6fa2009-02-07 02:36:35 +0000138 $(THRIFT) --gen cpp:dense $<
David Reiss8180c0c2008-02-04 21:14:14 +0000139
David Reissade070f2009-03-20 07:02:52 +0000140gen-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 +0000141 $(THRIFT) --gen cpp:dense $<
David Reiss8180c0c2008-02-04 21:14:14 +0000142
143INCLUDES = \
144 -I$(top_srcdir)/lib/cpp/src
145
146AM_CPPFLAGS = $(BOOST_CPPFLAGS)
147
148clean-local:
David Reiss2ca456a2008-02-24 16:42:18 +0000149 $(RM) -r gen-cpp
David Reiss48141bf2009-03-18 23:59:56 +0000150
151EXTRA_DIST = \
152 cpp \
153 threads \
154 csharp \
155 py \
156 rb \
157 perl \
158 php \
159 erl \
160 hs \
161 ocaml \
162 AnnotationTest.thrift \
163 BrokenConstants.thrift \
164 ConstantsDemo.thrift \
165 DebugProtoTest.thrift \
166 DenseLinkingTest.thrift \
167 DocTest.thrift \
168 JavaBeansTest.thrift \
169 ManyTypedefs.thrift \
170 OptionalRequiredTest.thrift \
171 SmallTest.thrift \
172 StressTest.thrift \
173 ThriftTest.thrift \
174 ZlibTest.cpp \
175 DenseProtoTest.cpp \
176 FastbinaryTest.py