blob: 90ebfcd94061f2a65cb3694af21597d0451fdb38 [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 Reiss2a4bfd62008-04-07 23:45:00 +000060 UnitTests
David Reiss8180c0c2008-02-04 21:14:14 +000061
62TESTS = \
63 $(check_PROGRAMS)
64
David Reiss2a4bfd62008-04-07 23:45:00 +000065UnitTests_SOURCES = \
66 UnitTestMain.cpp \
David Reiss28f298d2008-05-01 06:17:36 +000067 TMemoryBufferTest.cpp \
68 TBufferBaseTest.cpp
David Reiss2a4bfd62008-04-07 23:45:00 +000069
70UnitTests_LDADD = libtestgencpp.la
David Reiss8180c0c2008-02-04 21:14:14 +000071
72#
David Reisse4db03d2008-04-08 05:06:59 +000073# TFDTransportTest
74#
75TFDTransportTest_SOURCES = \
76 TFDTransportTest.cpp
77
78TFDTransportTest_LDADD = \
David Reissc6c64982008-06-11 01:16:45 +000079 $(top_builddir)/lib/cpp/libthrift.la
David Reisse4db03d2008-04-08 05:06:59 +000080
David Reiss1ffb61b2008-04-08 05:07:26 +000081
82#
83# TPipedTransportTest
84#
85TPipedTransportTest_SOURCES = \
86 TPipedTransportTest.cpp
87
88TPipedTransportTest_LDADD = \
David Reissc6c64982008-06-11 01:16:45 +000089 $(top_builddir)/lib/cpp/libthrift.la
David Reiss1ffb61b2008-04-08 05:07:26 +000090
David Reisse4db03d2008-04-08 05:06:59 +000091#
David Reiss8180c0c2008-02-04 21:14:14 +000092# DebugProtoTest
93#
94DebugProtoTest_SOURCES = \
David Reiss8180c0c2008-02-04 21:14:14 +000095 DebugProtoTest.cpp
96
David Reiss2a4bfd62008-04-07 23:45:00 +000097DebugProtoTest_LDADD = libtestgencpp.la
David Reiss8180c0c2008-02-04 21:14:14 +000098
99
100#
David Reissdb0ea152008-02-18 01:49:37 +0000101# JSONProtoTest
102#
103JSONProtoTest_SOURCES = \
David Reissdb0ea152008-02-18 01:49:37 +0000104 JSONProtoTest.cpp
105
David Reiss2a4bfd62008-04-07 23:45:00 +0000106JSONProtoTest_LDADD = libtestgencpp.la
David Reissdb0ea152008-02-18 01:49:37 +0000107
108#
David Reiss8180c0c2008-02-04 21:14:14 +0000109# OptionalRequiredTest
110#
111OptionalRequiredTest_SOURCES = \
David Reiss8180c0c2008-02-04 21:14:14 +0000112 OptionalRequiredTest.cpp
113
David Reiss2a4bfd62008-04-07 23:45:00 +0000114OptionalRequiredTest_LDADD = libtestgencpp.la
David Reiss8180c0c2008-02-04 21:14:14 +0000115
116
117#
David Reiss8180c0c2008-02-04 21:14:14 +0000118# Common thrift code generation rules
119#
David Reissc6c64982008-06-11 01:16:45 +0000120THRIFT = $(top_builddir)/compiler/cpp/thrift
David Reiss8180c0c2008-02-04 21:14:14 +0000121
David Reissade070f2009-03-20 07:02:52 +0000122gen-cpp/DebugProtoTest_types.cpp gen-cpp/DebugProtoTest_types.h: DebugProtoTest.thrift
David Reiss0b7d6fa2009-02-07 02:36:35 +0000123 $(THRIFT) --gen cpp:dense $<
David Reiss8180c0c2008-02-04 21:14:14 +0000124
David Reissade070f2009-03-20 07:02:52 +0000125gen-cpp/OptionalRequiredTest_types.cpp gen-cpp/OptionalRequiredTest_types.h: OptionalRequiredTest.thrift
David Reiss4ce28742008-02-27 07:45:05 +0000126 $(THRIFT) --gen cpp:dense $<
David Reiss8180c0c2008-02-04 21:14:14 +0000127
128gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp: StressTest.thrift
David Reiss0b7d6fa2009-02-07 02:36:35 +0000129 $(THRIFT) --gen cpp:dense $<
David Reiss8180c0c2008-02-04 21:14:14 +0000130
David Reissade070f2009-03-20 07:02:52 +0000131gen-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 +0000132 $(THRIFT) --gen cpp:dense $<
David Reiss8180c0c2008-02-04 21:14:14 +0000133
134INCLUDES = \
135 -I$(top_srcdir)/lib/cpp/src
136
137AM_CPPFLAGS = $(BOOST_CPPFLAGS)
138
139clean-local:
David Reiss2ca456a2008-02-24 16:42:18 +0000140 $(RM) -r gen-cpp
David Reiss48141bf2009-03-18 23:59:56 +0000141
142EXTRA_DIST = \
143 cpp \
144 threads \
145 csharp \
146 py \
147 rb \
148 perl \
149 php \
150 erl \
151 hs \
152 ocaml \
153 AnnotationTest.thrift \
154 BrokenConstants.thrift \
155 ConstantsDemo.thrift \
156 DebugProtoTest.thrift \
157 DenseLinkingTest.thrift \
158 DocTest.thrift \
159 JavaBeansTest.thrift \
160 ManyTypedefs.thrift \
161 OptionalRequiredTest.thrift \
162 SmallTest.thrift \
163 StressTest.thrift \
164 ThriftTest.thrift \
165 ZlibTest.cpp \
166 DenseProtoTest.cpp \
167 FastbinaryTest.py