blob: 595f7a4fc7314cb9d35557941040a741a2cd4844 [file] [log] [blame]
Roger Meierd3b9dca2011-06-24 14:01:10 +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#
Kevin Wojniaka3925662019-07-01 11:07:45 -070019AUTOMAKE_OPTIONS = subdir-objects serial-tests nostdinc
Roger Meier81a1f992014-10-22 14:09:43 +020020
Nobuaki Sukegawaa0c5ab72015-02-01 00:27:12 +090021BUILT_SOURCES = gen-cpp/ThriftTest.cpp \
22 gen-cpp/ThriftTest_types.cpp \
23 gen-cpp/ThriftTest_constants.cpp \
James E. King, III58402ff2017-11-17 14:41:46 -050024 gen-cpp/SecondService.cpp \
Nobuaki Sukegawaa0c5ab72015-02-01 00:27:12 +090025 gen-cpp/Service.cpp
26
Roger Meierd3b9dca2011-06-24 14:01:10 +000027noinst_LTLIBRARIES = libtestgencpp.la libstresstestgencpp.la
28nodist_libtestgencpp_la_SOURCES = \
James E. King, III58402ff2017-11-17 14:41:46 -050029 gen-cpp/SecondService.cpp \
30 gen-cpp/SecondService.h \
31 gen-cpp/SecondService.tcc \
Jens Geyer79f988c2014-10-03 20:42:54 +020032 gen-cpp/ThriftTest_constants.cpp \
33 gen-cpp/ThriftTest_constants.h \
34 gen-cpp/ThriftTest_types.cpp \
35 gen-cpp/ThriftTest_types.h \
36 gen-cpp/ThriftTest_types.tcc \
37 gen-cpp/ThriftTest.cpp \
38 gen-cpp/ThriftTest.h \
39 gen-cpp/ThriftTest.tcc \
40 src/ThriftTest_extras.cpp
Roger Meierd3b9dca2011-06-24 14:01:10 +000041
42libtestgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la
43
44nodist_libstresstestgencpp_la_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020045 gen-cpp/StressTest_types.h \
46 gen-cpp/Service.cpp \
47 gen-cpp/Service.h
Roger Meierd3b9dca2011-06-24 14:01:10 +000048
49libstresstestgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la
50
Roger Meier41ad4342015-03-24 22:30:40 +010051precross: TestServer TestClient
52
Roger Meierd3b9dca2011-06-24 14:01:10 +000053check_PROGRAMS = \
Jens Geyer79f988c2014-10-03 20:42:54 +020054 TestServer \
55 TestClient \
56 StressTest \
57 StressTestNonBlocking
Roger Meierd3b9dca2011-06-24 14:01:10 +000058
59# we currently do not run the testsuite, stop c++ server issue
60# TESTS = \
Jens Geyer79f988c2014-10-03 20:42:54 +020061# $(check_PROGRAMS)
Roger Meierd3b9dca2011-06-24 14:01:10 +000062
63TestServer_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020064 src/TestServer.cpp
Roger Meierd3b9dca2011-06-24 14:01:10 +000065
66TestServer_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +020067 libtestgencpp.la \
68 $(top_builddir)/lib/cpp/libthrift.la \
69 $(top_builddir)/lib/cpp/libthriftz.la \
70 $(top_builddir)/lib/cpp/libthriftnb.la \
Dave Watson792db4e2015-01-16 11:22:01 -080071 -levent -lboost_program_options -lboost_system -lboost_filesystem $(ZLIB_LIBS)
Roger Meierd3b9dca2011-06-24 14:01:10 +000072
73TestClient_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020074 src/TestClient.cpp
Roger Meierd3b9dca2011-06-24 14:01:10 +000075
76TestClient_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +020077 libtestgencpp.la \
78 $(top_builddir)/lib/cpp/libthrift.la \
79 $(top_builddir)/lib/cpp/libthriftz.la \
80 $(top_builddir)/lib/cpp/libthriftnb.la \
Dave Watson792db4e2015-01-16 11:22:01 -080081 -levent -lboost_program_options -lboost_system -lboost_filesystem $(ZLIB_LIBS)
Roger Meierd3b9dca2011-06-24 14:01:10 +000082
83StressTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020084 src/StressTest.cpp
Roger Meierd3b9dca2011-06-24 14:01:10 +000085
86StressTest_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +020087 libstresstestgencpp.la \
88 $(top_builddir)/lib/cpp/libthrift.la
Roger Meierd3b9dca2011-06-24 14:01:10 +000089
90StressTestNonBlocking_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020091 src/StressTestNonBlocking.cpp
Roger Meierd3b9dca2011-06-24 14:01:10 +000092
93StressTestNonBlocking_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +020094 libstresstestgencpp.la \
95 $(top_builddir)/lib/cpp/libthriftnb.la \
96 -levent
Roger Meierd3b9dca2011-06-24 14:01:10 +000097#
98# Common thrift code generation rules
99#
Jens Geyerf066d842022-06-13 23:37:25 +0200100gen-cpp/ThriftTest.cpp gen-cpp/ThriftTest_types.cpp gen-cpp/ThriftTest_constants.cpp gen-cpp/SecondService.cpp gen-cpp/SecondService.h gen-cpp/SecondService.tcc: $(top_srcdir)/test/v0.16/ThriftTest.thrift $(THRIFT)
Jens Geyer79f988c2014-10-03 20:42:54 +0200101 $(THRIFT) --gen cpp:templates,cob_style -r $<
Roger Meierd3b9dca2011-06-24 14:01:10 +0000102
zeshuai00757c25072020-04-09 11:17:05 +0800103gen-cpp/Service.cpp: $(top_srcdir)/test/StressTest.thrift $(THRIFT)
Jens Geyer79f988c2014-10-03 20:42:54 +0200104 $(THRIFT) --gen cpp $<
Roger Meierd3b9dca2011-06-24 14:01:10 +0000105
Zezeng Wang371d92f2020-04-28 14:23:15 +0800106gen-cpp/SpecificNameTest_types.cpp gen-cpp/EchoService.cpp: $(top_srcdir)/test/SpecificName.thrift $(THRIFT)
107 $(THRIFT) --gen cpp $<
108
Kevin Wojniaka3925662019-07-01 11:07:45 -0700109AM_CPPFLAGS = $(BOOST_CPPFLAGS) $(LIBEVENT_CPPFLAGS) -I$(top_srcdir)/lib/cpp/src -Igen-cpp -I.
James E. King, IIId7142b72017-09-01 13:00:36 -0700110AM_CXXFLAGS = -Wall -Wextra -pedantic -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
Roger Meier051ea1c2014-12-20 22:43:24 +0100111AM_LDFLAGS = $(BOOST_LDFLAGS) $(LIBEVENT_LDFLAGS) $(ZLIB_LIBS)
Roger Meierd3b9dca2011-06-24 14:01:10 +0000112
113clean-local:
James E. King IIIb96c4382019-01-24 17:45:07 -0500114 $(RM) -r gen-cpp/
Roger Meierd3b9dca2011-06-24 14:01:10 +0000115
Konrad Grochowski16a23a62014-11-13 15:33:38 +0100116style-local:
117 $(CPPSTYLE_CMD)
118
Thomas63f04582024-03-21 22:51:07 +0900119distdir:
120 $(MAKE) $(AM_MAKEFLAGS) distdir-am
121
Roger Meierd3b9dca2011-06-24 14:01:10 +0000122EXTRA_DIST = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200123 src/TestClient.cpp \
124 src/TestServer.cpp \
125 src/StressTest.cpp \
James E. King, IIIab8ff1a2017-02-15 14:12:37 -0500126 src/StressTestNonBlocking.cpp