blob: e8be80a3a17a45b0fb17a71e57bdf1e6c5409537 [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#
Roger Meier81a1f992014-10-22 14:09:43 +020019AUTOMAKE_OPTIONS = subdir-objects serial-tests
20
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/StressTest_types.cpp \
26 gen-cpp/StressTest_constants.cpp \
27 gen-cpp/Service.cpp
28
Roger Meierd3b9dca2011-06-24 14:01:10 +000029noinst_LTLIBRARIES = libtestgencpp.la libstresstestgencpp.la
30nodist_libtestgencpp_la_SOURCES = \
James E. King, III58402ff2017-11-17 14:41:46 -050031 gen-cpp/SecondService.cpp \
32 gen-cpp/SecondService.h \
33 gen-cpp/SecondService.tcc \
Jens Geyer79f988c2014-10-03 20:42:54 +020034 gen-cpp/ThriftTest_constants.cpp \
35 gen-cpp/ThriftTest_constants.h \
36 gen-cpp/ThriftTest_types.cpp \
37 gen-cpp/ThriftTest_types.h \
38 gen-cpp/ThriftTest_types.tcc \
39 gen-cpp/ThriftTest.cpp \
40 gen-cpp/ThriftTest.h \
41 gen-cpp/ThriftTest.tcc \
42 src/ThriftTest_extras.cpp
Roger Meierd3b9dca2011-06-24 14:01:10 +000043
44libtestgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la
45
46nodist_libstresstestgencpp_la_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020047 gen-cpp/StressTest_constants.cpp \
48 gen-cpp/StressTest_types.cpp \
49 gen-cpp/StressTest_constants.h \
50 gen-cpp/StressTest_types.h \
51 gen-cpp/Service.cpp \
52 gen-cpp/Service.h
Roger Meierd3b9dca2011-06-24 14:01:10 +000053
54libstresstestgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la
55
Roger Meier41ad4342015-03-24 22:30:40 +010056precross: TestServer TestClient
57
Roger Meierd3b9dca2011-06-24 14:01:10 +000058check_PROGRAMS = \
Jens Geyer79f988c2014-10-03 20:42:54 +020059 TestServer \
60 TestClient \
61 StressTest \
62 StressTestNonBlocking
Roger Meierd3b9dca2011-06-24 14:01:10 +000063
64# we currently do not run the testsuite, stop c++ server issue
65# TESTS = \
Jens Geyer79f988c2014-10-03 20:42:54 +020066# $(check_PROGRAMS)
Roger Meierd3b9dca2011-06-24 14:01:10 +000067
68TestServer_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020069 src/TestServer.cpp
Roger Meierd3b9dca2011-06-24 14:01:10 +000070
71TestServer_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +020072 libtestgencpp.la \
73 $(top_builddir)/lib/cpp/libthrift.la \
74 $(top_builddir)/lib/cpp/libthriftz.la \
75 $(top_builddir)/lib/cpp/libthriftnb.la \
Dave Watson792db4e2015-01-16 11:22:01 -080076 -levent -lboost_program_options -lboost_system -lboost_filesystem $(ZLIB_LIBS)
Roger Meierd3b9dca2011-06-24 14:01:10 +000077
78TestClient_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020079 src/TestClient.cpp
Roger Meierd3b9dca2011-06-24 14:01:10 +000080
81TestClient_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +020082 libtestgencpp.la \
83 $(top_builddir)/lib/cpp/libthrift.la \
84 $(top_builddir)/lib/cpp/libthriftz.la \
85 $(top_builddir)/lib/cpp/libthriftnb.la \
Dave Watson792db4e2015-01-16 11:22:01 -080086 -levent -lboost_program_options -lboost_system -lboost_filesystem $(ZLIB_LIBS)
Roger Meierd3b9dca2011-06-24 14:01:10 +000087
88StressTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020089 src/StressTest.cpp
Roger Meierd3b9dca2011-06-24 14:01:10 +000090
91StressTest_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +020092 libstresstestgencpp.la \
93 $(top_builddir)/lib/cpp/libthrift.la
Roger Meierd3b9dca2011-06-24 14:01:10 +000094
95StressTestNonBlocking_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020096 src/StressTestNonBlocking.cpp
Roger Meierd3b9dca2011-06-24 14:01:10 +000097
98StressTestNonBlocking_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +020099 libstresstestgencpp.la \
100 $(top_builddir)/lib/cpp/libthriftnb.la \
101 -levent
Roger Meierd3b9dca2011-06-24 14:01:10 +0000102#
103# Common thrift code generation rules
104#
James E. King, III58402ff2017-11-17 14:41:46 -0500105gen-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/ThriftTest.thrift $(THRIFT)
Jens Geyer79f988c2014-10-03 20:42:54 +0200106 $(THRIFT) --gen cpp:templates,cob_style -r $<
Roger Meierd3b9dca2011-06-24 14:01:10 +0000107
Randy Abernethy983bf7d2015-10-09 12:28:57 -0700108gen-cpp/StressTest_types.cpp gen-cpp/StressTest_constants.cpp gen-cpp/Service.cpp: $(top_srcdir)/test/StressTest.thrift $(THRIFT)
Jens Geyer79f988c2014-10-03 20:42:54 +0200109 $(THRIFT) --gen cpp $<
Roger Meierd3b9dca2011-06-24 14:01:10 +0000110
Konrad Grochowski1ff4a972014-09-19 23:57:57 +0200111AM_CPPFLAGS = $(BOOST_CPPFLAGS) $(LIBEVENT_CPPFLAGS) -I$(top_srcdir)/lib/cpp/src -Igen-cpp
James E. King, IIId7142b72017-09-01 13:00:36 -0700112AM_CXXFLAGS = -Wall -Wextra -pedantic -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
Roger Meier051ea1c2014-12-20 22:43:24 +0100113AM_LDFLAGS = $(BOOST_LDFLAGS) $(LIBEVENT_LDFLAGS) $(ZLIB_LIBS)
Roger Meierd3b9dca2011-06-24 14:01:10 +0000114
115clean-local:
Nobuaki Sukegawad3f7d0e2015-11-03 13:42:00 +0900116 $(RM) gen-cpp/*
Roger Meierd3b9dca2011-06-24 14:01:10 +0000117
Konrad Grochowski16a23a62014-11-13 15:33:38 +0100118style-local:
119 $(CPPSTYLE_CMD)
120
Roger Meierd3b9dca2011-06-24 14:01:10 +0000121EXTRA_DIST = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200122 src/TestClient.cpp \
123 src/TestServer.cpp \
124 src/StressTest.cpp \
James E. King, IIIab8ff1a2017-02-15 14:12:37 -0500125 src/StressTestNonBlocking.cpp