blob: 1226935de3a270c382f19309460e8d829084b367 [file] [log] [blame]
Gavin McDonald0b75e1a2010-10-28 02:12:01 +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
20SUBDIRS =
21
22if WITH_PYTHON
23SUBDIRS += py
24endif
25
26if WITH_RUBY
27SUBDIRS += rb
28endif
29
30noinst_LTLIBRARIES = libtestgencpp.la
31libtestgencpp_la_SOURCES = \
32 gen-cpp/DebugProtoTest_types.cpp \
33 gen-cpp/OptionalRequiredTest_types.cpp \
34 gen-cpp/DebugProtoTest_types.cpp \
35 gen-cpp/ThriftTest_types.cpp \
36 gen-cpp/DebugProtoTest_types.h \
37 gen-cpp/OptionalRequiredTest_types.h \
38 gen-cpp/ThriftTest_types.h \
39 ThriftTest_extras.cpp \
40 DebugProtoTest_extras.cpp
41
42ThriftTest_extras.o: gen-cpp/ThriftTest_types.h
43DebugProtoTest_extras.o: gen-cpp/DebugProtoTest_types.h
44
45libtestgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la
46
47noinst_PROGRAMS = Benchmark
48
49Benchmark_SOURCES = \
50 Benchmark.cpp
51
52Benchmark_LDADD = libtestgencpp.la
53
54check_PROGRAMS = \
55 TFDTransportTest \
56 TPipedTransportTest \
57 DebugProtoTest \
58 JSONProtoTest \
59 OptionalRequiredTest \
60 AllProtocolsTest \
61 UnitTests
62
63TESTS = \
64 $(check_PROGRAMS)
65
66UnitTests_SOURCES = \
67 UnitTestMain.cpp \
68 TMemoryBufferTest.cpp \
69 TBufferBaseTest.cpp
70
71UnitTests_LDADD = libtestgencpp.la
72
73#
74# TFDTransportTest
75#
76TFDTransportTest_SOURCES = \
77 TFDTransportTest.cpp
78
79TFDTransportTest_LDADD = \
80 $(top_builddir)/lib/cpp/libthrift.la
81
82
83#
84# TPipedTransportTest
85#
86TPipedTransportTest_SOURCES = \
87 TPipedTransportTest.cpp
88
89TPipedTransportTest_LDADD = \
90 $(top_builddir)/lib/cpp/libthrift.la
91
92#
93# AllProtocolsTest
94#
95AllProtocolsTest_SOURCES = \
96 AllProtocolTests.cpp \
97 AllProtocolTests.tcc \
98 GenericHelpers.h
99
100AllProtocolsTest_LDADD = libtestgencpp.la
101
102#
103# DebugProtoTest
104#
105DebugProtoTest_SOURCES = \
106 DebugProtoTest.cpp
107
108DebugProtoTest_LDADD = libtestgencpp.la
109
110
111#
112# JSONProtoTest
113#
114JSONProtoTest_SOURCES = \
115 JSONProtoTest.cpp
116
117JSONProtoTest_LDADD = libtestgencpp.la
118
119#
120# OptionalRequiredTest
121#
122OptionalRequiredTest_SOURCES = \
123 OptionalRequiredTest.cpp
124
125OptionalRequiredTest_LDADD = libtestgencpp.la
126
127
128#
129# Common thrift code generation rules
130#
131THRIFT = $(top_builddir)/compiler/cpp/thrift
132
133gen-cpp/DebugProtoTest_types.cpp gen-cpp/DebugProtoTest_types.h: DebugProtoTest.thrift
134 $(THRIFT) --gen cpp:dense $<
135
136gen-cpp/OptionalRequiredTest_types.cpp gen-cpp/OptionalRequiredTest_types.h: OptionalRequiredTest.thrift
137 $(THRIFT) --gen cpp:dense $<
138
139gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp: StressTest.thrift
140 $(THRIFT) --gen cpp:dense $<
141
142gen-cpp/SecondService.cpp gen-cpp/ThriftTest_constants.cpp gen-cpp/ThriftTest.cpp gen-cpp/ThriftTest_types.cpp gen-cpp/ThriftTest_types.h: ThriftTest.thrift
143 $(THRIFT) --gen cpp:dense $<
144
145INCLUDES = \
146 -I$(top_srcdir)/lib/cpp/src
147
148AM_CPPFLAGS = $(BOOST_CPPFLAGS)
149
150clean-local:
151 $(RM) -r gen-cpp
152
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